diff options
author | Alan Viverette <alanv@google.com> | 2015-01-08 00:07:23 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-08 00:07:25 +0000 |
commit | 2d4c476aca79cc0f5b6f1e8561afd4bcc808dd54 (patch) | |
tree | 0cecd325f9b24b68eac7862877ffd6310e4ec238 /core/java/android | |
parent | 81a2b3f82aad46d1e7367670cc26e1ce071acc68 (diff) | |
parent | a54956a0bc611b1e9b3914edc7a604b59688f6b7 (diff) | |
download | frameworks_base-2d4c476aca79cc0f5b6f1e8561afd4bcc808dd54.zip frameworks_base-2d4c476aca79cc0f5b6f1e8561afd4bcc808dd54.tar.gz frameworks_base-2d4c476aca79cc0f5b6f1e8561afd4bcc808dd54.tar.bz2 |
Merge "Fix accessibility delegation"
Diffstat (limited to 'core/java/android')
67 files changed, 469 insertions, 302 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java index 1ff476e..022e225 100644 --- a/core/java/android/appwidget/AppWidgetHostView.java +++ b/core/java/android/appwidget/AppWidgetHostView.java @@ -588,9 +588,10 @@ public class AppWidgetHostView extends FrameLayout { return tv; } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AppWidgetHostView.class.getName()); } diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index cb75141..7033676 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -5218,8 +5218,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #sendAccessibilityEvent(int) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - void sendAccessibilityEventInternal(int eventType) { + public void sendAccessibilityEventInternal(int eventType) { if (AccessibilityManager.getInstance(mContext).isEnabled()) { sendAccessibilityEventUnchecked(AccessibilityEvent.obtain(eventType)); } @@ -5252,8 +5254,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #sendAccessibilityEventUnchecked(AccessibilityEvent) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - void sendAccessibilityEventUncheckedInternal(AccessibilityEvent event) { + public void sendAccessibilityEventUncheckedInternal(AccessibilityEvent event) { if (!isShown()) { return; } @@ -5303,8 +5307,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #dispatchPopulateAccessibilityEvent(AccessibilityEvent) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { onPopulateAccessibilityEvent(event); return false; } @@ -5352,8 +5358,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #onPopulateAccessibilityEvent(AccessibilityEvent) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { } /** @@ -5394,8 +5402,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #onInitializeAccessibilityEvent(AccessibilityEvent) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { event.setSource(this); event.setClassName(View.class.getName()); event.setPackageName(getContext().getPackageName()); @@ -5450,8 +5460,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * @see #createAccessibilityNodeInfo() + * + * @hide */ - AccessibilityNodeInfo createAccessibilityNodeInfoInternal() { + public AccessibilityNodeInfo createAccessibilityNodeInfoInternal() { AccessibilityNodeProvider provider = getAccessibilityNodeProvider(); if (provider != null) { return provider.createAccessibilityNodeInfo(View.NO_ID); @@ -5550,8 +5562,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo) * * Note: Called from the default {@link AccessibilityDelegate}. + * + * @hide */ - void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { Rect bounds = mAttachInfo.mTmpInvalRect; getDrawingRect(bounds); @@ -8133,7 +8147,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * Note: Called from the default {@link AccessibilityDelegate}. * - * @hide Until we've refactored all accessibility delegation methods. + * @hide */ public boolean performAccessibilityActionInternal(int action, Bundle arguments) { switch (action) { diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 10af0c3..71c79fd 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -773,8 +773,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @see #onRequestSendAccessibilityEvent(View, AccessibilityEvent) * * Note: Called from the default {@link View.AccessibilityDelegate}. + * + * @hide */ - boolean onRequestSendAccessibilityEventInternal(View child, AccessibilityEvent event) { + public boolean onRequestSendAccessibilityEventInternal(View child, AccessibilityEvent event) { return true; } @@ -2845,8 +2847,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } + /** @hide */ @Override - boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { boolean handled = false; if (includeForAccessibility()) { handled = super.dispatchPopulateAccessibilityEventInternal(event); @@ -2873,8 +2876,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return false; } + /** @hide */ @Override - void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); if (mAttachInfo != null) { final ArrayList<View> childrenForAccessibility = mAttachInfo.mTempArrayList; @@ -2889,8 +2893,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } + /** @hide */ @Override - void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { super.onInitializeAccessibilityEventInternal(event); event.setClassName(ViewGroup.class.getName()); } diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 1723e96..81f8c4e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2070,8 +2070,8 @@ public class WebView extends AbsoluteLayout return WebView.super.onHoverEvent(event); } - public boolean super_performAccessibilityAction(int action, Bundle arguments) { - return WebView.super.performAccessibilityAction(action, arguments); + public boolean super_performAccessibilityActionInternal(int action, Bundle arguments) { + return WebView.super.performAccessibilityActionInternal(action, arguments); } public boolean super_performLongClick() { @@ -2379,23 +2379,26 @@ public class WebView extends AbsoluteLayout return mProvider.getViewDelegate().shouldDelayChildPressedState(); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(WebView.class.getName()); - mProvider.getViewDelegate().onInitializeAccessibilityNodeInfo(info); + mProvider.getViewDelegate().onInitializeAccessibilityNodeInfoInternal(info); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(WebView.class.getName()); - mProvider.getViewDelegate().onInitializeAccessibilityEvent(event); + mProvider.getViewDelegate().onInitializeAccessibilityEventInternal(event); } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - return mProvider.getViewDelegate().performAccessibilityAction(action, arguments); + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + return mProvider.getViewDelegate().performAccessibilityActionInternal(action, arguments); } /** @hide */ diff --git a/core/java/android/webkit/WebViewProvider.java b/core/java/android/webkit/WebViewProvider.java index 2aee57b..e8be4a6 100644 --- a/core/java/android/webkit/WebViewProvider.java +++ b/core/java/android/webkit/WebViewProvider.java @@ -292,11 +292,11 @@ public interface WebViewProvider { public AccessibilityNodeProvider getAccessibilityNodeProvider(); - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info); - public void onInitializeAccessibilityEvent(AccessibilityEvent event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event); - public boolean performAccessibilityAction(int action, Bundle arguments); + public boolean performAccessibilityActionInternal(int action, Bundle arguments); public void setOverScrollMode(int mode); diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 1e269a3..7ea3265 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -1466,8 +1466,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te onScrollChanged(0, 0, 0, 0); // dummy values, View's implementation does not use these. } + /** @hide */ @Override - public void sendAccessibilityEvent(int eventType) { + public void sendAccessibilityEventInternal(int eventType) { // Since this class calls onScrollChanged even if the mFirstPosition and the // child count have not changed we will avoid sending duplicate accessibility // events. @@ -1482,18 +1483,20 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mLastAccessibilityScrollEventToIndex = lastVisiblePosition; } } - super.sendAccessibilityEvent(eventType); + super.sendAccessibilityEventInternal(eventType); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AbsListView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AbsListView.class.getName()); if (isEnabled()) { if (canScrollUp()) { @@ -1522,9 +1525,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } switch (action) { diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java index a3ce808..1f7be63 100644 --- a/core/java/android/widget/AbsSeekBar.java +++ b/core/java/android/widget/AbsSeekBar.java @@ -715,15 +715,17 @@ public abstract class AbsSeekBar extends ProgressBar { return super.onKeyDown(keyCode, event); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AbsSeekBar.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AbsSeekBar.class.getName()); if (isEnabled()) { @@ -737,9 +739,10 @@ public abstract class AbsSeekBar extends ProgressBar { } } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } if (!isEnabled()) { diff --git a/core/java/android/widget/AbsSpinner.java b/core/java/android/widget/AbsSpinner.java index 6a4ad75..e13ddd1 100644 --- a/core/java/android/widget/AbsSpinner.java +++ b/core/java/android/widget/AbsSpinner.java @@ -471,15 +471,17 @@ public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AbsSpinner.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AbsSpinner.class.getName()); } } diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java index 18f15a0..94827dd 100644 --- a/core/java/android/widget/ActionMenuPresenter.java +++ b/core/java/android/widget/ActionMenuPresenter.java @@ -645,9 +645,10 @@ public class ActionMenuPresenter extends BaseMenuPresenter return false; } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setCanOpenPopup(true); } diff --git a/core/java/android/widget/ActionMenuView.java b/core/java/android/widget/ActionMenuView.java index 0a8a01f..e5b6995 100644 --- a/core/java/android/widget/ActionMenuView.java +++ b/core/java/android/widget/ActionMenuView.java @@ -700,7 +700,8 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo return result; } - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + /** @hide */ + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { return false; } diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 5e2394c..428b6ce 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -929,8 +929,9 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { } } + /** @hide */ @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { View selectedView = getSelectedView(); if (selectedView != null && selectedView.getVisibility() == VISIBLE && selectedView.dispatchPopulateAccessibilityEvent(event)) { @@ -939,9 +940,10 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { return false; } + /** @hide */ @Override - public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) { - if (super.onRequestSendAccessibilityEvent(child, event)) { + public boolean onRequestSendAccessibilityEventInternal(View child, AccessibilityEvent event) { + if (super.onRequestSendAccessibilityEventInternal(child, event)) { // Add a record for ourselves as well. AccessibilityEvent record = AccessibilityEvent.obtain(); onInitializeAccessibilityEvent(record); @@ -953,9 +955,10 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AdapterView.class.getName()); info.setScrollable(isScrollableForAccessibility()); View selectedView = getSelectedView(); @@ -964,9 +967,10 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AdapterView.class.getName()); event.setScrollable(isScrollableForAccessibility()); View selectedView = getSelectedView(); diff --git a/core/java/android/widget/AdapterViewAnimator.java b/core/java/android/widget/AdapterViewAnimator.java index 1bc2f4b..96eb0e2 100644 --- a/core/java/android/widget/AdapterViewAnimator.java +++ b/core/java/android/widget/AdapterViewAnimator.java @@ -1084,15 +1084,17 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> public void fyiWillBeAdvancedByHostKThx() { } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AdapterViewAnimator.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AdapterViewAnimator.class.getName()); } } diff --git a/core/java/android/widget/AdapterViewFlipper.java b/core/java/android/widget/AdapterViewFlipper.java index 285dee8..a7ba617 100644 --- a/core/java/android/widget/AdapterViewFlipper.java +++ b/core/java/android/widget/AdapterViewFlipper.java @@ -304,15 +304,17 @@ public class AdapterViewFlipper extends AdapterViewAnimator { updateRunning(false); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(AdapterViewFlipper.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(AdapterViewFlipper.class.getName()); } } diff --git a/core/java/android/widget/Button.java b/core/java/android/widget/Button.java index 1663620..90d77f9 100644 --- a/core/java/android/widget/Button.java +++ b/core/java/android/widget/Button.java @@ -111,15 +111,17 @@ public class Button extends TextView { super(context, attrs, defStyleAttr, defStyleRes); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(Button.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(Button.class.getName()); } } diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java index ed59ea6..d58da8f 100644 --- a/core/java/android/widget/CalendarView.java +++ b/core/java/android/widget/CalendarView.java @@ -501,13 +501,15 @@ public class CalendarView extends FrameLayout { mDelegate.onConfigurationChanged(newConfig); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { event.setClassName(CalendarView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { info.setClassName(CalendarView.class.getName()); } diff --git a/core/java/android/widget/CheckBox.java b/core/java/android/widget/CheckBox.java index 71438c9..b1fb338 100644 --- a/core/java/android/widget/CheckBox.java +++ b/core/java/android/widget/CheckBox.java @@ -72,15 +72,17 @@ public class CheckBox extends CompoundButton { super(context, attrs, defStyleAttr, defStyleRes); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(CheckBox.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(CheckBox.class.getName()); } } diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index 69969a9..477862b 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -435,16 +435,18 @@ public class CheckedTextView extends TextView implements Checkable { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(CheckedTextView.class.getName()); event.setChecked(mChecked); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(CheckedTextView.class.getName()); info.setCheckable(true); info.setChecked(mChecked); diff --git a/core/java/android/widget/Chronometer.java b/core/java/android/widget/Chronometer.java index f94789d..05fc6a1 100644 --- a/core/java/android/widget/Chronometer.java +++ b/core/java/android/widget/Chronometer.java @@ -281,15 +281,17 @@ public class Chronometer extends TextView { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(Chronometer.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(Chronometer.class.getName()); } } diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index 447ccc2..41a3915 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java @@ -324,16 +324,18 @@ public abstract class CompoundButton extends Button implements Checkable { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(CompoundButton.class.getName()); event.setChecked(mChecked); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(CompoundButton.class.getName()); info.setCheckable(true); info.setChecked(mChecked); diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index 0ca08e1..0f0cd2e 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -283,26 +283,30 @@ public class DatePicker extends FrameLayout { return mDelegate.isEnabled(); } + /** @hide */ @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { return mDelegate.dispatchPopulateAccessibilityEvent(event); } + /** @hide */ @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + super.onPopulateAccessibilityEventInternal(event); mDelegate.onPopulateAccessibilityEvent(event); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); mDelegate.onInitializeAccessibilityEvent(event); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); mDelegate.onInitializeAccessibilityNodeInfo(info); } diff --git a/core/java/android/widget/DayPickerView.java b/core/java/android/widget/DayPickerView.java index 2ee3665..65af45d 100644 --- a/core/java/android/widget/DayPickerView.java +++ b/core/java/android/widget/DayPickerView.java @@ -463,9 +463,10 @@ class DayPickerView extends ListView implements AbsListView.OnScrollListener { mYearFormat = new SimpleDateFormat("yyyy", Locale.getDefault()); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setItemCount(-1); } @@ -480,22 +481,26 @@ class DayPickerView extends ListView implements AbsListView.OnScrollListener { /** * Necessary for accessibility, to ensure we support "scrolling" forward and backward * in the month list. + * + * @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD); } /** * When scroll forward/backward events are received, announce the newly scrolled-to month. + * + * @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { if (action != AccessibilityNodeInfo.ACTION_SCROLL_FORWARD && action != AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) { - return super.performAccessibilityAction(action, arguments); + return super.performAccessibilityActionInternal(action, arguments); } // Figure out what month is showing. diff --git a/core/java/android/widget/DigitalClock.java b/core/java/android/widget/DigitalClock.java index b6c1e5b..372bdb3 100644 --- a/core/java/android/widget/DigitalClock.java +++ b/core/java/android/widget/DigitalClock.java @@ -115,16 +115,18 @@ public class DigitalClock extends TextView { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); //noinspection deprecation event.setClassName(DigitalClock.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); //noinspection deprecation info.setClassName(DigitalClock.class.getName()); } diff --git a/core/java/android/widget/EditText.java b/core/java/android/widget/EditText.java index a8ff562..f54beb5 100644 --- a/core/java/android/widget/EditText.java +++ b/core/java/android/widget/EditText.java @@ -122,20 +122,23 @@ public class EditText extends TextView { super.setEllipsize(ellipsis); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(EditText.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(EditText.class.getName()); } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { switch (action) { case AccessibilityNodeInfo.ACTION_SET_TEXT: { CharSequence text = (arguments != null) ? arguments.getCharSequence( @@ -147,7 +150,7 @@ public class EditText extends TextView { return true; } default: { - return super.performAccessibilityAction(action, arguments); + return super.performAccessibilityActionInternal(action, arguments); } } } diff --git a/core/java/android/widget/ExpandableListView.java b/core/java/android/widget/ExpandableListView.java index 70089e0..675dc9b 100644 --- a/core/java/android/widget/ExpandableListView.java +++ b/core/java/android/widget/ExpandableListView.java @@ -1341,15 +1341,17 @@ public class ExpandableListView extends ListView { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ExpandableListView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ExpandableListView.class.getName()); } } diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index d974c29..f208fff 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -704,15 +704,17 @@ public class FrameLayout extends ViewGroup { } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(FrameLayout.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(FrameLayout.class.getName()); } diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java index f7c839f..3c428b0 100644 --- a/core/java/android/widget/Gallery.java +++ b/core/java/android/widget/Gallery.java @@ -1373,15 +1373,17 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(Gallery.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(Gallery.class.getName()); info.setScrollable(mItemCount > 1); if (isEnabled()) { @@ -1394,9 +1396,10 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList } } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } switch (action) { diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java index 161ae7e..cc925eb 100644 --- a/core/java/android/widget/GridLayout.java +++ b/core/java/android/widget/GridLayout.java @@ -1190,15 +1190,17 @@ public class GridLayout extends ViewGroup { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(GridLayout.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(GridLayout.class.getName()); } diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index efd6fc0..f7ce57b 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -2341,15 +2341,17 @@ public class GridView extends AbsListView { return result; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(GridView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(GridView.class.getName()); final int columnsCount = getNumColumns(); diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java index 371b480..c6c979e 100644 --- a/core/java/android/widget/HorizontalScrollView.java +++ b/core/java/android/widget/HorizontalScrollView.java @@ -774,9 +774,10 @@ public class HorizontalScrollView extends FrameLayout { outRects.add(bounds); } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } switch (action) { @@ -806,9 +807,10 @@ public class HorizontalScrollView extends FrameLayout { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(HorizontalScrollView.class.getName()); final int scrollRange = getScrollRange(); if (scrollRange > 0) { @@ -822,9 +824,10 @@ public class HorizontalScrollView extends FrameLayout { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(HorizontalScrollView.class.getName()); event.setScrollable(getScrollRange() > 0); event.setScrollX(mScrollX); diff --git a/core/java/android/widget/ImageButton.java b/core/java/android/widget/ImageButton.java index 3a20628..3b6825d 100644 --- a/core/java/android/widget/ImageButton.java +++ b/core/java/android/widget/ImageButton.java @@ -92,15 +92,17 @@ public class ImageButton extends ImageView { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ImageButton.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ImageButton.class.getName()); } } diff --git a/core/java/android/widget/ImageSwitcher.java b/core/java/android/widget/ImageSwitcher.java index c048970..0910eb0 100644 --- a/core/java/android/widget/ImageSwitcher.java +++ b/core/java/android/widget/ImageSwitcher.java @@ -56,15 +56,17 @@ public class ImageSwitcher extends ViewSwitcher showNext(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ImageSwitcher.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ImageSwitcher.class.getName()); } } diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index c68bfca..fbad314 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -239,9 +239,10 @@ public class ImageView extends View { return (getBackground() != null && getBackground().getCurrent() != null); } + /** @hide */ @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + super.onPopulateAccessibilityEventInternal(event); CharSequence contentDescription = getContentDescription(); if (!TextUtils.isEmpty(contentDescription)) { event.getText().add(contentDescription); @@ -1418,15 +1419,17 @@ public class ImageView extends View { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ImageView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ImageView.class.getName()); } } diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 6476cdc..28e50c4 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -1806,15 +1806,17 @@ public class LinearLayout extends ViewGroup { return p instanceof LinearLayout.LayoutParams; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(LinearLayout.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(LinearLayout.class.getName()); } diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index ba6f061..df0d1fd 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -3878,15 +3878,17 @@ public class ListView extends AbsListView { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ListView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ListView.class.getName()); final int rowsCount = getCount(); diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java index f1aaa4d..4cafe72 100644 --- a/core/java/android/widget/MediaController.java +++ b/core/java/android/widget/MediaController.java @@ -625,15 +625,17 @@ public class MediaController extends FrameLayout { super.setEnabled(enabled); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(MediaController.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(MediaController.class.getName()); } diff --git a/core/java/android/widget/MultiAutoCompleteTextView.java b/core/java/android/widget/MultiAutoCompleteTextView.java index cbd01b0..6954eea 100644 --- a/core/java/android/widget/MultiAutoCompleteTextView.java +++ b/core/java/android/widget/MultiAutoCompleteTextView.java @@ -202,15 +202,17 @@ public class MultiAutoCompleteTextView extends AutoCompleteTextView { editable.replace(start, end, mTokenizer.terminateToken(text)); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(MultiAutoCompleteTextView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(MultiAutoCompleteTextView.class.getName()); } diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java index ee17b78..16dc26d 100644 --- a/core/java/android/widget/NumberPicker.java +++ b/core/java/android/widget/NumberPicker.java @@ -1558,9 +1558,10 @@ public class NumberPicker extends LinearLayout { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(NumberPicker.class.getName()); event.setScrollable(true); event.setScrollY((mMinValue + mValue) * mSelectorElementHeight); diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java index 5419ab6..d99b89b 100644 --- a/core/java/android/widget/PopupWindow.java +++ b/core/java/android/widget/PopupWindow.java @@ -1748,13 +1748,14 @@ public class PopupWindow { } } + /** @hide */ @Override - public void sendAccessibilityEvent(int eventType) { + public void sendAccessibilityEventInternal(int eventType) { // clinets are interested in the content not the container, make it event source if (mContentView != null) { mContentView.sendAccessibilityEvent(eventType); } else { - super.sendAccessibilityEvent(eventType); + super.sendAccessibilityEventInternal(eventType); } } } diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index de1bbc7..d32cb10 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -1825,17 +1825,19 @@ public class ProgressBar extends View { mAttached = false; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ProgressBar.class.getName()); event.setItemCount(mMax); event.setCurrentItemIndex(mProgress); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ProgressBar.class.getName()); } diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java index 23fa402..d0e8081 100644 --- a/core/java/android/widget/QuickContactBadge.java +++ b/core/java/android/widget/QuickContactBadge.java @@ -304,15 +304,17 @@ public class QuickContactBadge extends ImageView implements OnClickListener { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(QuickContactBadge.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(QuickContactBadge.class.getName()); } diff --git a/core/java/android/widget/RadioButton.java b/core/java/android/widget/RadioButton.java index afc4830..82280b4 100644 --- a/core/java/android/widget/RadioButton.java +++ b/core/java/android/widget/RadioButton.java @@ -79,15 +79,17 @@ public class RadioButton extends CompoundButton { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(RadioButton.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(RadioButton.class.getName()); } } diff --git a/core/java/android/widget/RadioGroup.java b/core/java/android/widget/RadioGroup.java index 78d05b0..c0f60eb 100644 --- a/core/java/android/widget/RadioGroup.java +++ b/core/java/android/widget/RadioGroup.java @@ -240,15 +240,17 @@ public class RadioGroup extends LinearLayout { return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(RadioGroup.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(RadioGroup.class.getName()); } diff --git a/core/java/android/widget/RatingBar.java b/core/java/android/widget/RatingBar.java index 82b490e..2d0649d 100644 --- a/core/java/android/widget/RatingBar.java +++ b/core/java/android/widget/RatingBar.java @@ -331,15 +331,17 @@ public class RatingBar extends AbsSeekBar { super.setMax(max); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(RatingBar.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(RatingBar.class.getName()); } } diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 5b604cd..fe91d8e 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -1104,8 +1104,9 @@ public class RelativeLayout extends ViewGroup { return new LayoutParams(p); } + /** @hide */ @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { if (mTopToBottomLeftToRightSet == null) { mTopToBottomLeftToRightSet = new TreeSet<View>(new TopToBottomLeftToRightComparator()); } @@ -1127,15 +1128,17 @@ public class RelativeLayout extends ViewGroup { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(RelativeLayout.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(RelativeLayout.class.getName()); } diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java index a90b392..1098419 100644 --- a/core/java/android/widget/ScrollView.java +++ b/core/java/android/widget/ScrollView.java @@ -809,9 +809,10 @@ public class ScrollView extends FrameLayout { awakenScrollBars(); } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } if (!isEnabled()) { @@ -838,9 +839,10 @@ public class ScrollView extends FrameLayout { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ScrollView.class.getName()); if (isEnabled()) { final int scrollRange = getScrollRange(); @@ -856,9 +858,10 @@ public class ScrollView extends FrameLayout { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ScrollView.class.getName()); final boolean scrollable = getScrollRange() > 0; event.setScrollable(scrollable); diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java index 4ee6418..a1f361a 100644 --- a/core/java/android/widget/SearchView.java +++ b/core/java/android/widget/SearchView.java @@ -1325,15 +1325,17 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { setIconified(false); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(SearchView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(SearchView.class.getName()); } diff --git a/core/java/android/widget/SeekBar.java b/core/java/android/widget/SeekBar.java index dc7c04c..aa5c055 100644 --- a/core/java/android/widget/SeekBar.java +++ b/core/java/android/widget/SeekBar.java @@ -124,15 +124,17 @@ public class SeekBar extends AbsSeekBar { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(SeekBar.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(SeekBar.class.getName()); } } diff --git a/core/java/android/widget/SlidingDrawer.java b/core/java/android/widget/SlidingDrawer.java index ec06c02..e3f4a10 100644 --- a/core/java/android/widget/SlidingDrawer.java +++ b/core/java/android/widget/SlidingDrawer.java @@ -837,15 +837,17 @@ public class SlidingDrawer extends ViewGroup { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(SlidingDrawer.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(SlidingDrawer.class.getName()); } diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java index 0d76239..5c93b60 100644 --- a/core/java/android/widget/Spinner.java +++ b/core/java/android/widget/Spinner.java @@ -692,15 +692,17 @@ public class Spinner extends AbsSpinner implements OnClickListener { dialog.dismiss(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(Spinner.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(Spinner.class.getName()); if (mAdapter != null) { diff --git a/core/java/android/widget/StackView.java b/core/java/android/widget/StackView.java index 9e168b8..2aa1c09 100644 --- a/core/java/android/widget/StackView.java +++ b/core/java/android/widget/StackView.java @@ -1224,15 +1224,17 @@ public class StackView extends AdapterViewAnimator { measureChildren(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(StackView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(StackView.class.getName()); info.setScrollable(getChildCount() > 1); if (isEnabled()) { @@ -1245,9 +1247,10 @@ public class StackView extends AdapterViewAnimator { } } + /** @hide */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { - if (super.performAccessibilityAction(action, arguments)) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { + if (super.performAccessibilityActionInternal(action, arguments)) { return true; } if (!isEnabled()) { diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index 7a22224..13d6b42 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -665,9 +665,10 @@ public class Switch extends CompoundButton { } } + /** @hide */ @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + super.onPopulateAccessibilityEventInternal(event); final CharSequence text = isChecked() ? mTextOn : mTextOff; if (text != null) { @@ -1180,15 +1181,17 @@ public class Switch extends CompoundButton { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(Switch.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(Switch.class.getName()); CharSequence switchText = isChecked() ? mTextOn : mTextOff; if (!TextUtils.isEmpty(switchText)) { diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java index 89df51a..3c3389a 100644 --- a/core/java/android/widget/TabHost.java +++ b/core/java/android/widget/TabHost.java @@ -173,8 +173,9 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); } } + /** @hide */ @Override - public void sendAccessibilityEvent(int eventType) { + public void sendAccessibilityEventInternal(int eventType) { /* avoid super class behavior - TabWidget sends the right events */ } @@ -383,15 +384,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TabHost.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TabHost.class.getName()); } diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java index 47a5449..bddee91 100644 --- a/core/java/android/widget/TabWidget.java +++ b/core/java/android/widget/TabWidget.java @@ -401,8 +401,9 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { } } + /** @hide */ @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { onPopulateAccessibilityEvent(event); // Dispatch only to the selected tab. if (mSelectedTab != -1) { @@ -414,28 +415,31 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { return false; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TabWidget.class.getName()); event.setItemCount(getTabCount()); event.setCurrentItemIndex(mSelectedTab); } + /** @hide */ @Override - public void sendAccessibilityEventUnchecked(AccessibilityEvent event) { + public void sendAccessibilityEventUncheckedInternal(AccessibilityEvent event) { // this class fires events only when tabs are focused or selected if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_FOCUSED && isFocused()) { event.recycle(); return; } - super.sendAccessibilityEventUnchecked(event); + super.sendAccessibilityEventUncheckedInternal(event); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TabWidget.class.getName()); } diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java index f4b2ce0..a6b78a4 100644 --- a/core/java/android/widget/TableLayout.java +++ b/core/java/android/widget/TableLayout.java @@ -666,15 +666,17 @@ public class TableLayout extends LinearLayout { return new LayoutParams(p); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TableLayout.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TableLayout.class.getName()); } diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java index fe3631a..c29296a 100644 --- a/core/java/android/widget/TableRow.java +++ b/core/java/android/widget/TableRow.java @@ -379,15 +379,17 @@ public class TableRow extends LinearLayout { return new LayoutParams(p); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TableRow.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TableRow.class.getName()); } diff --git a/core/java/android/widget/TextSwitcher.java b/core/java/android/widget/TextSwitcher.java index 1aefd2b..7c883ba 100644 --- a/core/java/android/widget/TextSwitcher.java +++ b/core/java/android/widget/TextSwitcher.java @@ -91,15 +91,17 @@ public class TextSwitcher extends ViewSwitcher { ((TextView)getCurrentView()).setText(text); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TextSwitcher.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TextSwitcher.class.getName()); } } diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index edba9f5..cc8a90c 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -8374,9 +8374,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } + /** @hide */ @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + super.onPopulateAccessibilityEventInternal(event); final boolean isPassword = hasPasswordTransformationMethod(); if (!isPassword || shouldSpeakPasswordsForAccessibility()) { @@ -8397,9 +8398,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener UserHandle.USER_CURRENT_OR_SELF) == 1); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TextView.class.getName()); final boolean isPassword = hasPasswordTransformationMethod(); @@ -8412,9 +8414,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TextView.class.getName()); final boolean isPassword = hasPasswordTransformationMethod(); @@ -8572,15 +8575,16 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } + /** @hide */ @Override - public void sendAccessibilityEvent(int eventType) { + public void sendAccessibilityEventInternal(int eventType) { // Do not send scroll events since first they are not interesting for // accessibility and second such events a generated too frequently. // For details see the implementation of bringTextIntoView(). if (eventType == AccessibilityEvent.TYPE_VIEW_SCROLLED) { return; } - super.sendAccessibilityEvent(eventType); + super.sendAccessibilityEventInternal(eventType); } /** diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java index 26e02f8..bbf5f53 100644 --- a/core/java/android/widget/TimePicker.java +++ b/core/java/android/widget/TimePicker.java @@ -195,26 +195,30 @@ public class TimePicker extends FrameLayout { mDelegate.onRestoreInstanceState(ss); } + /** @hide */ @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { return mDelegate.dispatchPopulateAccessibilityEvent(event); } + /** @hide */ @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); + public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) { + super.onPopulateAccessibilityEventInternal(event); mDelegate.onPopulateAccessibilityEvent(event); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); mDelegate.onInitializeAccessibilityEvent(event); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); mDelegate.onInitializeAccessibilityNodeInfo(info); } diff --git a/core/java/android/widget/ToggleButton.java b/core/java/android/widget/ToggleButton.java index 28519d1..1b23778 100644 --- a/core/java/android/widget/ToggleButton.java +++ b/core/java/android/widget/ToggleButton.java @@ -153,15 +153,17 @@ public class ToggleButton extends CompoundButton { } } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ToggleButton.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ToggleButton.class.getName()); } } diff --git a/core/java/android/widget/TwoLineListItem.java b/core/java/android/widget/TwoLineListItem.java index 5606c60..9035dbe 100644 --- a/core/java/android/widget/TwoLineListItem.java +++ b/core/java/android/widget/TwoLineListItem.java @@ -93,15 +93,17 @@ public class TwoLineListItem extends RelativeLayout { return mText2; } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(TwoLineListItem.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(TwoLineListItem.class.getName()); } } diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java index 572cca2..a240dc2 100644 --- a/core/java/android/widget/VideoView.java +++ b/core/java/android/widget/VideoView.java @@ -201,15 +201,17 @@ public class VideoView extends SurfaceView setMeasuredDimension(width, height); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(VideoView.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(VideoView.class.getName()); } diff --git a/core/java/android/widget/ViewAnimator.java b/core/java/android/widget/ViewAnimator.java index eee914e..d31754b 100644 --- a/core/java/android/widget/ViewAnimator.java +++ b/core/java/android/widget/ViewAnimator.java @@ -357,15 +357,17 @@ public class ViewAnimator extends FrameLayout { return (getCurrentView() != null) ? getCurrentView().getBaseline() : super.getBaseline(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ViewAnimator.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ViewAnimator.class.getName()); } } diff --git a/core/java/android/widget/ViewFlipper.java b/core/java/android/widget/ViewFlipper.java index cf1f554..587f469 100644 --- a/core/java/android/widget/ViewFlipper.java +++ b/core/java/android/widget/ViewFlipper.java @@ -149,15 +149,17 @@ public class ViewFlipper extends ViewAnimator { updateRunning(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ViewFlipper.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ViewFlipper.class.getName()); } diff --git a/core/java/android/widget/ViewSwitcher.java b/core/java/android/widget/ViewSwitcher.java index 0376918..c97770f 100644 --- a/core/java/android/widget/ViewSwitcher.java +++ b/core/java/android/widget/ViewSwitcher.java @@ -68,15 +68,17 @@ public class ViewSwitcher extends ViewAnimator { super.addView(child, index, params); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ViewSwitcher.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ViewSwitcher.class.getName()); } diff --git a/core/java/android/widget/YearPickerView.java b/core/java/android/widget/YearPickerView.java index 24ed7ce..fb5debc 100644 --- a/core/java/android/widget/YearPickerView.java +++ b/core/java/android/widget/YearPickerView.java @@ -189,9 +189,10 @@ class YearPickerView extends ListView implements AdapterView.OnItemClickListener mController.getSelectedDay().get(Calendar.YEAR) - mMinDate.get(Calendar.YEAR)); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED) { event.setFromIndex(0); diff --git a/core/java/android/widget/ZoomButton.java b/core/java/android/widget/ZoomButton.java index 715e868..e0be0ab 100644 --- a/core/java/android/widget/ZoomButton.java +++ b/core/java/android/widget/ZoomButton.java @@ -103,15 +103,17 @@ public class ZoomButton extends ImageButton implements OnLongClickListener { return super.dispatchUnhandledMove(focused, direction); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ZoomButton.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ZoomButton.class.getName()); } } diff --git a/core/java/android/widget/ZoomControls.java b/core/java/android/widget/ZoomControls.java index 8897875..a0aacea 100644 --- a/core/java/android/widget/ZoomControls.java +++ b/core/java/android/widget/ZoomControls.java @@ -109,15 +109,17 @@ public class ZoomControls extends LinearLayout { return mZoomIn.hasFocus() || mZoomOut.hasFocus(); } + /** @hide */ @Override - public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - super.onInitializeAccessibilityEvent(event); + public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) { + super.onInitializeAccessibilityEventInternal(event); event.setClassName(ZoomControls.class.getName()); } + /** @hide */ @Override - public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(info); + public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfoInternal(info); info.setClassName(ZoomControls.class.getName()); } } |