AccessibilityRecordCompat.java revision 9648c538bac4f04145c118cc41168d1d7a536312
19648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov/* 29648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Copyright (C) 2011 The Android Open Source Project 39648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 49648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Licensed under the Apache License, Version 2.0 (the "License"); 59648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * you may not use this file except in compliance with the License. 69648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * You may obtain a copy of the License at 79648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 89648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * http://www.apache.org/licenses/LICENSE-2.0 99648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Unless required by applicable law or agreed to in writing, software 119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * distributed under the License is distributed on an "AS IS" BASIS, 129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * See the License for the specific language governing permissions and 149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * limitations under the License. 159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovpackage android.support.v4.view.accessibility; 189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovimport android.os.Build; 209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovimport android.os.Parcelable; 219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovimport android.view.View; 229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovimport java.util.List; 249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov/** 269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Helper for accessing AccessibilityRecord from newer platform versions. 279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganovpublic class AccessibilityRecordCompat { 299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov static interface AccessibilityRecordImpl { 319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain(); 329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain(Object record); 339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setSource(Object record, View source); 349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object getSource(Object record); 359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getWindowId(Object record); 369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isChecked(Object record); 379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setChecked(Object record, boolean isChecked); 389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isEnabled(Object record); 399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setEnabled(Object record, boolean isEnabled); 409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isPassword(Object record); 419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setPassword(Object record, boolean isPassword); 429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isFullScreen(Object record); 439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFullScreen(Object record, boolean isFullScreen); 449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isScrollable(Object record); 459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollable(Object record, boolean scrollable); 469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getItemCount(Object record); 479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setItemCount(Object record, int itemCount); 489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getCurrentItemIndex(Object record); 499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setCurrentItemIndex(Object record, int currentItemIndex); 509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getFromIndex(Object record); 519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFromIndex(Object record, int fromIndex); 529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getToIndex(Object record); 539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setToIndex(Object record, int toIndex); 549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollX(Object record); 559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollX(Object record, int scrollX); 569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollY(Object record); 579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollY(Object record, int scrollY); 589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollX(Object record); 599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollX(Object record, int maxScrollX); 609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollY(Object record); 619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollY(Object record, int maxScrollY); 629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getAddedCount(Object record); 639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setAddedCount(Object record, int addedCount); 649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getRemovedCount(Object record); 659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setRemovedCount(Object record, int removedCount); 669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getClassName(Object record); 679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setClassName(Object record, CharSequence className); 689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public List<CharSequence> getText(Object record); 699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getBeforeText(Object record); 709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setBeforeText(Object record, CharSequence beforeText); 719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getContentDescription(Object record); 729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setContentDescription(Object record, CharSequence contentDescription); 739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Parcelable getParcelableData(Object record); 749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setParcelableData(Object record, Parcelable parcelableData); 759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void recycle(Object record); 769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov static class AccessibilityRecordStubImpl implements AccessibilityRecordImpl { 799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain() { 809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain(Object record) { 849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getAddedCount(Object record) { 889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getBeforeText(Object record) { 929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getClassName(Object record) { 969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getContentDescription(Object record) { 1009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 1019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getCurrentItemIndex(Object record) { 1049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getFromIndex(Object record) { 1089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getItemCount(Object record) { 1129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollX(Object record) { 1169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollY(Object record) { 1209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Parcelable getParcelableData(Object record) { 1249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 1259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getRemovedCount(Object record) { 1289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollX(Object record) { 1329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollY(Object record) { 1369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object getSource(Object record) { 1409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 1419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public List<CharSequence> getText(Object record) { 1449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return null; 1459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getToIndex(Object record) { 1489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getWindowId(Object record) { 1529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0; 1539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isChecked(Object record) { 1569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 1579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isEnabled(Object record) { 1609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 1619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isFullScreen(Object record) { 1649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 1659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isPassword(Object record) { 1689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 1699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isScrollable(Object record) { 1729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 1739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void recycle(Object record) { 1769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setAddedCount(Object record, int addedCount) { 1809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setBeforeText(Object record, CharSequence beforeText) { 1849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setChecked(Object record, boolean isChecked) { 1889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setClassName(Object record, CharSequence className) { 1929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setContentDescription(Object record, CharSequence contentDescription) { 1969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 1989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 1999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setCurrentItemIndex(Object record, int currentItemIndex) { 2009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setEnabled(Object record, boolean isEnabled) { 2049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFromIndex(Object record, int fromIndex) { 2089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFullScreen(Object record, boolean isFullScreen) { 2129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setItemCount(Object record, int itemCount) { 2169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollX(Object record, int maxScrollX) { 2209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollY(Object record, int maxScrollY) { 2249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setParcelableData(Object record, Parcelable parcelableData) { 2289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setPassword(Object record, boolean isPassword) { 2329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setRemovedCount(Object record, int removedCount) { 2369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollX(Object record, int scrollX) { 2409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollY(Object record, int scrollY) { 2449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollable(Object record, boolean scrollable) { 2489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setSource(Object record, View source) { 2529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setToIndex(Object record, int toIndex) { 2569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov static class AccessibilityRecordIcsImpl implements AccessibilityRecordImpl { 2619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain() { 2629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.obtain(); 2639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object obtain(Object record) { 2669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.obtain(record); 2679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getAddedCount(Object record) { 2709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getAddedCount(record); 2719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getBeforeText(Object record) { 2749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getBeforeText(record); 2759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getClassName(Object record) { 2789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getClassName(record); 2799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getContentDescription(Object record) { 2829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getContentDescription(record); 2839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getCurrentItemIndex(Object record) { 2869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getCurrentItemIndex(record); 2879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getFromIndex(Object record) { 2909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getFromIndex(record); 2919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getItemCount(Object record) { 2949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getItemCount(record); 2959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 2969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 2979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollX(Object record) { 2989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov // TODO: Uncomment when these APIs become public 2999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0;//AccessibilityRecordCompatIcs.getMaxScrollX(record); 3009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getMaxScrollY(Object record) { 3039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov // TODO: Uncomment when these APIs become public 3049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return 0;//AccessibilityRecordCompatIcs.getMaxScrollY(record); 3059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Parcelable getParcelableData(Object record) { 3089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getParcelableData(record); 3099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getRemovedCount(Object record) { 3129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getRemovedCount(record); 3139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollX(Object record) { 3169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getScrollX(record); 3179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollY(Object record) { 3209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getScrollY(record); 3219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object getSource(Object record) { 3249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getSource(record); 3259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public List<CharSequence> getText(Object record) { 3289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getText(record); 3299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getToIndex(Object record) { 3329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getToIndex(record); 3339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getWindowId(Object record) { 3369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.getWindowId(record); 3379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isChecked(Object record) { 3409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.isChecked(record); 3419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isEnabled(Object record) { 3449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.isEnabled(record); 3459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isFullScreen(Object record) { 3489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.isFullScreen(record); 3499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isPassword(Object record) { 3529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.isPassword(record); 3539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isScrollable(Object record) { 3569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return AccessibilityRecordCompatIcs.isScrollable(record); 3579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void recycle(Object record) { 3609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.recycle(record); 3619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setAddedCount(Object record, int addedCount) { 3649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setAddedCount(record, addedCount); 3659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setBeforeText(Object record, CharSequence beforeText) { 3689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setBeforeText(record, beforeText); 3699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setChecked(Object record, boolean isChecked) { 3729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setChecked(record, isChecked); 3739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setClassName(Object record, CharSequence className) { 3769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setClassName(record, className); 3779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setContentDescription(Object record, CharSequence contentDescription) { 3809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setContentDescription(record, contentDescription); 3819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setCurrentItemIndex(Object record, int currentItemIndex) { 3849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setCurrentItemIndex(record, currentItemIndex); 3859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setEnabled(Object record, boolean isEnabled) { 3889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setEnabled(record, isEnabled); 3899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFromIndex(Object record, int fromIndex) { 3929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setFromIndex(record, fromIndex); 3939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFullScreen(Object record, boolean isFullScreen) { 3969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setFullScreen(record, isFullScreen); 3979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 3989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 3999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setItemCount(Object record, int itemCount) { 4009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setItemCount(record, itemCount); 4019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollX(Object record, int maxScrollX) { 4049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// TODO: Uncomment when these APIs become public 4059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// AccessibilityRecordCompatIcs.setMaxScrollX(record, maxScrollX); 4069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setMaxScrollY(Object record, int maxScrollY) { 4099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// TODO: Uncomment when these APIs become public 4109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// AccessibilityRecordCompatIcs.setMaxScrollY(record, maxScrollY); 4119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setParcelableData(Object record, Parcelable parcelableData) { 4149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setParcelableData(record, parcelableData); 4159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setPassword(Object record, boolean isPassword) { 4189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setPassword(record, isPassword); 4199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setRemovedCount(Object record, int removedCount) { 4229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setRemovedCount(record, removedCount); 4239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollX(Object record, int scrollX) { 4269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setScrollX(record, scrollX); 4279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollY(Object record, int scrollY) { 4309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setScrollY(record, scrollY); 4319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollable(Object record, boolean scrollable) { 4349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setScrollable(record, scrollable); 4359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setSource(Object record, View source) { 4389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setSource(record, source); 4399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setToIndex(Object record, int toIndex) { 4429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompatIcs.setToIndex(record, toIndex); 4439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov static { 4479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (Build.VERSION.SDK_INT >= 14) { // ICS 4489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL = new AccessibilityRecordIcsImpl(); 4499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } else { 4509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL = new AccessibilityRecordStubImpl(); 4519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov private static final AccessibilityRecordImpl IMPL; 4559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov private final Object mRecord; 4579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /* 4599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Hide constructor from clients. 4609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 4619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public AccessibilityRecordCompat(Object record) { 4629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov mRecord = record; 4639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 4669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The wrapped implementation. 4679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 4689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Object getImpl() { 4699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return mRecord; 4709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 4739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Returns a cached instance if such is available or a new one is 4749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * instantiated. The instance is initialized with data from the 4759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * given record. 4769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 4779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return An instance. 4789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 4799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public static AccessibilityRecordCompat obtain(AccessibilityRecordCompat record) { 4809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return new AccessibilityRecordCompat(IMPL.obtain(record.mRecord)); 4819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 4849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Returns a cached instance if such is available or a new one is 4859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * instantiated. 4869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 4879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return An instance. 4889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 4899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public static AccessibilityRecordCompat obtain() { 4909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return new AccessibilityRecordCompat(IMPL.obtain()); 4919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 4929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 4939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 4949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the event source. 4959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 4969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param source The source. 4979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 4989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 4999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setSource(View source) { 5019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setSource(mRecord, source); 5029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the {@link android.view.accessibility.AccessibilityNodeInfo} of 5069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * the event source. 5079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * <p> 5089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * <strong>Note:</strong> It is a client responsibility to recycle the 5099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * received info by calling 5109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * {@link android.view.accessibility.AccessibilityNodeInfo#recycle() 5119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * AccessibilityNodeInfo#recycle()} to avoid creating of multiple instances. 5129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov *</p> 5139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The info of the source. 5159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public AccessibilityNodeInfoCompat getSource() { 5179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return new AccessibilityNodeInfoCompat(IMPL.getSource(mRecord)); 5189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the id of the window from which the event comes from. 5229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The window id. 5249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getWindowId() { 5269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getWindowId(mRecord); 5279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets if the source is checked. 5319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return True if the view is checked, false otherwise. 5339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isChecked() { 5359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.isChecked(mRecord); 5369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets if the source is checked. 5409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param isChecked True if the view is checked, false otherwise. 5429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 5449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setChecked(boolean isChecked) { 5469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setChecked(mRecord, isChecked); 5479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets if the source is enabled. 5519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return True if the view is enabled, false otherwise. 5539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isEnabled() { 5559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.isEnabled(mRecord); 5569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets if the source is enabled. 5609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param isEnabled True if the view is enabled, false otherwise. 5629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 5649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setEnabled(boolean isEnabled) { 5669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setEnabled(mRecord, isEnabled); 5679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets if the source is a password field. 5719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return True if the view is a password field, false otherwise. 5739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isPassword() { 5759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.isPassword(mRecord); 5769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets if the source is a password field. 5809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param isPassword True if the view is a password field, false otherwise. 5829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 5849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setPassword(boolean isPassword) { 5869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setPassword(mRecord, isPassword); 5879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets if the source is taking the entire screen. 5919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 5929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return True if the source is full screen, false otherwise. 5939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 5949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isFullScreen() { 5959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.isFullScreen(mRecord); 5969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 5979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 5989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 5999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets if the source is taking the entire screen. 6009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param isFullScreen True if the source is full screen, false otherwise. 6029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 6049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFullScreen(boolean isFullScreen) { 6069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setFullScreen(mRecord, isFullScreen); 6079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets if the source is scrollable. 6119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return True if the source is scrollable, false otherwise. 6139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean isScrollable() { 6159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.isScrollable(mRecord); 6169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets if the source is scrollable. 6209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param scrollable True if the source is scrollable, false otherwise. 6229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 6249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollable(boolean scrollable) { 6269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setScrollable(mRecord, scrollable); 6279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the number of items that can be visited. 6319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The number of items. 6339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getItemCount() { 6359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getItemCount(mRecord); 6369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the number of items that can be visited. 6409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param itemCount The number of items. 6429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 6449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setItemCount(int itemCount) { 6469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setItemCount(mRecord, itemCount); 6479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the index of the source in the list of items the can be visited. 6519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The current item index. 6539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getCurrentItemIndex() { 6559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getCurrentItemIndex(mRecord); 6569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the index of the source in the list of items that can be visited. 6609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param currentItemIndex The current item index. 6629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 6649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setCurrentItemIndex(int currentItemIndex) { 6669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setCurrentItemIndex(mRecord, currentItemIndex); 6679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the index of the first character of the changed sequence, 6719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * or the beginning of a text selection or the index of the first 6729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * visible item when scrolling. 6739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The index of the first character or selection 6759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * start or the first visible item. 6769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getFromIndex() { 6789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getFromIndex(mRecord); 6799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the index of the first character of the changed sequence 6839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * or the beginning of a text selection or the index of the first 6849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * visible item when scrolling. 6859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param fromIndex The index of the first character or selection 6879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * start or the first visible item. 6889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 6909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 6919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setFromIndex(int fromIndex) { 6929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setFromIndex(mRecord, fromIndex); 6939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 6949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 6959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 6969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the index of text selection end or the index of the last 6979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * visible item when scrolling. 6989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 6999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The index of selection end or last item index. 7009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getToIndex() { 7029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getToIndex(mRecord); 7039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the index of text selection end or the index of the last 7079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * visible item when scrolling. 7089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param toIndex The index of selection end or last item index. 7109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setToIndex(int toIndex) { 7129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setToIndex(mRecord, toIndex); 7139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the scroll offset of the source left edge in pixels. 7179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The scroll. 7199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollX() { 7219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getScrollX(mRecord); 7229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the scroll offset of the source left edge in pixels. 7269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param scrollX The scroll. 7289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollX(int scrollX) { 7309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setScrollX(mRecord, scrollX); 7319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the scroll offset of the source top edge in pixels. 7359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The scroll. 7379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getScrollY() { 7399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getScrollY(mRecord); 7409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the scroll offset of the source top edge in pixels. 7449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param scrollY The scroll. 7469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setScrollY(int scrollY) { 7489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setScrollY(mRecord, scrollY); 7499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// TODO: Uncomment when these APIs become public 7529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// /** 7539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * Gets the max scroll offset of the source left edge in pixels. 7549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * 7559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * @return The max scroll. 7569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// */ 7579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// public int getMaxScrollX() { 7589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// return IMPL.getMaxScrollX(mRecord); 7599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// } 7609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// /** 7619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * Sets the max scroll offset of the source left edge in pixels. 7629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * 7639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * @param maxScrollX The max scroll. 7649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// */ 7659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// public void setMaxScrollX(int maxScrollX) { 7669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// IMPL.setMaxScrollX(mRecord, maxScrollX); 7679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// } 7689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// 7699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// /** 7709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * Gets the max scroll offset of the source top edge in pixels. 7719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * 7729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * @return The max scroll. 7739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// */ 7749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// public int getMaxScrollY() { 7759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// return IMPL.getMaxScrollY(mRecord); 7769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// } 7779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// 7789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// /** 7799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * Sets the max scroll offset of the source top edge in pixels. 7809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * 7819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// * @param maxScrollY The max scroll. 7829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// */ 7839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// public void setMaxScrollY(int maxScrollY) { 7849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// IMPL.setMaxScrollY(mRecord, maxScrollY); 7859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov// } 7869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the number of added characters. 7899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The number of added characters. 7919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 7929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getAddedCount() { 7939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getAddedCount(mRecord); 7949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 7959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 7969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 7979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the number of added characters. 7989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 7999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param addedCount The number of added characters. 8009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 8029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setAddedCount(int addedCount) { 8049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setAddedCount(mRecord, addedCount); 8059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the number of removed characters. 8099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The number of removed characters. 8119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int getRemovedCount() { 8139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getRemovedCount(mRecord); 8149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the number of removed characters. 8189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param removedCount The number of removed characters. 8209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 8229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setRemovedCount(int removedCount) { 8249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setRemovedCount(mRecord, removedCount); 8259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the class name of the source. 8299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The class name. 8319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getClassName() { 8339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getClassName(mRecord); 8349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the class name of the source. 8389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param className The lass name. 8409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 8429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setClassName(CharSequence className) { 8449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setClassName(mRecord, className); 8459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the text of the event. The index in the list represents the priority 8499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * of the text. Specifically, the lower the index the higher the priority. 8509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The text. 8529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public List<CharSequence> getText() { 8549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getText(mRecord); 8559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8589648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the text before a change. 8599648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8609648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The text before the change. 8619648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8629648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getBeforeText() { 8639648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getBeforeText(mRecord); 8649648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8659648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8669648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8679648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the text before a change. 8689648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8699648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param beforeText The text before the change. 8709648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8719648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 8729648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8739648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setBeforeText(CharSequence beforeText) { 8749648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setBeforeText(mRecord, beforeText); 8759648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8769648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8779648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8789648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the description of the source. 8799648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8809648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The description. 8819648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8829648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public CharSequence getContentDescription() { 8839648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getContentDescription(mRecord); 8849648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8859648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8869648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8879648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the description of the source. 8889648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8899648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param contentDescription The description. 8909648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 8919648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 8929648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 8939648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setContentDescription(CharSequence contentDescription) { 8949648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setContentDescription(mRecord, contentDescription); 8959648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 8969648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 8979648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 8989648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Gets the {@link Parcelable} data. 8999648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 9009648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @return The parcelable data. 9019648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 9029648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public Parcelable getParcelableData() { 9039648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return IMPL.getParcelableData(mRecord); 9049648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9059648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 9069648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 9079648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Sets the {@link Parcelable} data of the event. 9089648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 9099648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @param parcelableData The parcelable data. 9109648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 9119648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If called from an AccessibilityService. 9129648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 9139648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void setParcelableData(Parcelable parcelableData) { 9149648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.setParcelableData(mRecord, parcelableData); 9159648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9169648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 9179648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov /** 9189648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * Return an instance back to be reused. 9199648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * <p> 9209648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * <strong>Note:</strong> You must not touch the object after calling this 9219648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * function. 9229648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * </p> 9239648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * 9249648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov * @throws IllegalStateException If the record is already recycled. 9259648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov */ 9269648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public void recycle() { 9279648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov IMPL.recycle(mRecord); 9289648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9299648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 9309648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov @Override 9319648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public int hashCode() { 9329648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return (mRecord == null) ? 0 : mRecord.hashCode(); 9339648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9349648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 9359648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov 9369648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov @Override 9379648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov public boolean equals(Object obj) { 9389648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (this == obj) { 9399648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return true; 9409648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9419648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (obj == null) { 9429648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 9439648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9449648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (getClass() != obj.getClass()) { 9459648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 9469648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9479648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov AccessibilityRecordCompat other = (AccessibilityRecordCompat) obj; 9489648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (mRecord == null) { 9499648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov if (other.mRecord != null) { 9509648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 9519648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9529648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } else if (!mRecord.equals(other.mRecord)) { 9539648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return false; 9549648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9559648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov return true; 9569648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov } 9579648c538bac4f04145c118cc41168d1d7a536312Svetoslav Ganov} 958