summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/accessibility
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-11-25 17:45:00 -0800
committerSvetoslav <svetoslavganov@google.com>2013-12-13 10:45:03 -0800
commitf8bc964289df5ea53672df401c6d51dd47c02e53 (patch)
treebdccd8918a5bab56ed4a287bf22e5c2dafada537 /core/java/android/view/accessibility
parenteb3a0fadfee8a0f031cabbdab175c8d1575375dc (diff)
downloadframeworks_base-f8bc964289df5ea53672df401c6d51dd47c02e53.zip
frameworks_base-f8bc964289df5ea53672df401c6d51dd47c02e53.tar.gz
frameworks_base-f8bc964289df5ea53672df401c6d51dd47c02e53.tar.bz2
Fixing some accessibility bugs.
1. Views not important for accessibility should not send events. 2. The base View implementation should not add it self to the list of children for accessibility. 3. Null pointer exception in AccessibilityNodeInfoCache. Change-Id: Ie5b373362269200ead13ffe632679bd42ee40309
Diffstat (limited to 'core/java/android/view/accessibility')
-rw-r--r--core/java/android/view/accessibility/AccessibilityNodeInfoCache.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfoCache.java b/core/java/android/view/accessibility/AccessibilityNodeInfoCache.java
index 3f79b47..97db84b 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfoCache.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfoCache.java
@@ -174,11 +174,13 @@ public class AccessibilityNodeInfoCache {
// subtrees in the cache.
// TODO: Runs in O(n^2), could optimize to O(n + n log n)
final LongArray newChildrenIds = info.getChildNodeIds();
- final int oldChildCount = oldInfo.getChildCount();
- for (int i = 0; i < oldChildCount; i++) {
- final long oldChildId = oldInfo.getChildId(i);
- if (newChildrenIds.indexOf(oldChildId) < 0) {
- clearSubTreeLocked(oldChildId);
+ if (newChildrenIds != null) {
+ final int oldChildCount = oldInfo.getChildCount();
+ for (int i = 0; i < oldChildCount; i++) {
+ final long oldChildId = oldInfo.getChildId(i);
+ if (newChildrenIds.indexOf(oldChildId) < 0) {
+ clearSubTreeLocked(oldChildId);
+ }
}
}