Loading core/java/android/view/accessibility/AccessibilityNodeIdManager.java +10 −3 Original line number Diff line number Diff line Loading @@ -45,16 +45,20 @@ public final class AccessibilityNodeIdManager { * @param id The accessibilityViewId of the view. */ public void registerViewWithId(View view, int id) { synchronized (mIdsToViews) { mIdsToViews.append(id, view); } } /** * Unregister view, accessibility won't keep track of this view after this call. * @param id The id returned from registerView when the view as first associated. */ public void unregisterViewWithId(int id) { synchronized (mIdsToViews) { mIdsToViews.remove(id); } } /** * Accessibility uses this to find the view in the hierarchy. Loading @@ -62,7 +66,10 @@ public final class AccessibilityNodeIdManager { * @return The view. */ public View findView(int id) { final View view = mIdsToViews.get(id); View view = null; synchronized (mIdsToViews) { view = mIdsToViews.get(id); } return view != null && view.includeForAccessibility() ? view : null; } } Loading
core/java/android/view/accessibility/AccessibilityNodeIdManager.java +10 −3 Original line number Diff line number Diff line Loading @@ -45,16 +45,20 @@ public final class AccessibilityNodeIdManager { * @param id The accessibilityViewId of the view. */ public void registerViewWithId(View view, int id) { synchronized (mIdsToViews) { mIdsToViews.append(id, view); } } /** * Unregister view, accessibility won't keep track of this view after this call. * @param id The id returned from registerView when the view as first associated. */ public void unregisterViewWithId(int id) { synchronized (mIdsToViews) { mIdsToViews.remove(id); } } /** * Accessibility uses this to find the view in the hierarchy. Loading @@ -62,7 +66,10 @@ public final class AccessibilityNodeIdManager { * @return The view. */ public View findView(int id) { final View view = mIdsToViews.get(id); View view = null; synchronized (mIdsToViews) { view = mIdsToViews.get(id); } return view != null && view.includeForAccessibility() ? view : null; } }