Loading api/current.txt +29 −59 Original line number Diff line number Diff line Loading @@ -21174,7 +21174,6 @@ package android.view { method protected void onLayout(boolean, int, int, int, int); method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -21586,7 +21585,6 @@ package android.view { method public boolean onInterceptTouchEvent(android.view.MotionEvent); method protected abstract void onLayout(boolean, int, int, int, int); method protected boolean onRequestFocusInDescendants(int, android.graphics.Rect); method public boolean onRequestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void recomputeViewAttributes(android.view.View); method public void removeAllViews(); method public void removeAllViewsInLayout(); Loading @@ -21599,7 +21597,6 @@ package android.view { method public void requestChildFocus(android.view.View, android.view.View); method public boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean); method public void requestDisallowInterceptTouchEvent(boolean); method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void requestTransparentRegion(android.view.View); method public void scheduleLayoutAnimation(); method public void setAddStatesFromChildren(boolean); Loading Loading @@ -21686,7 +21683,6 @@ package android.view { method public abstract boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean); method public abstract void requestDisallowInterceptTouchEvent(boolean); method public abstract void requestLayout(); method public abstract boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public abstract void requestTransparentRegion(android.view.View); method public abstract boolean showContextMenuForChild(android.view.View); method public abstract android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback); Loading Loading @@ -22032,32 +22028,53 @@ package android.view { package android.view.accessibility { public final class AccessibilityEvent extends android.view.accessibility.AccessibilityRecord implements android.os.Parcelable { method public void appendRecord(android.view.accessibility.AccessibilityRecord); public final class AccessibilityEvent implements android.os.Parcelable { method public int describeContents(); method public int getAddedCount(); method public java.lang.CharSequence getBeforeText(); method public java.lang.CharSequence getClassName(); method public java.lang.CharSequence getContentDescription(); method public int getCurrentItemIndex(); method public long getEventTime(); method public int getEventType(); method public int getFromIndex(); method public int getItemCount(); method public java.lang.CharSequence getPackageName(); method public android.view.accessibility.AccessibilityRecord getRecord(int); method public int getRecordCount(); method public android.os.Parcelable getParcelableData(); method public int getRemovedCount(); method public java.util.List<java.lang.CharSequence> getText(); method public void initFromParcel(android.os.Parcel); method public boolean isChecked(); method public boolean isEnabled(); method public boolean isFullScreen(); method public boolean isPassword(); method public static android.view.accessibility.AccessibilityEvent obtain(int); method public static android.view.accessibility.AccessibilityEvent obtain(); method public void recycle(); method public void setAddedCount(int); method public void setBeforeText(java.lang.CharSequence); method public void setChecked(boolean); method public void setClassName(java.lang.CharSequence); method public void setContentDescription(java.lang.CharSequence); method public void setCurrentItemIndex(int); method public void setEnabled(boolean); method public void setEventTime(long); method public void setEventType(int); method public void setFromIndex(int); method public void setFullScreen(boolean); method public void setItemCount(int); method public void setPackageName(java.lang.CharSequence); method public void setParcelableData(android.os.Parcelable); method public void setPassword(boolean); method public void setRemovedCount(int); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator CREATOR; field public static final int INVALID_POSITION = -1; // 0xffffffff field public static final deprecated int MAX_TEXT_LENGTH = 500; // 0x1f4 field public static final int TYPES_ALL_MASK = -1; // 0xffffffff field public static final int TYPE_NOTIFICATION_STATE_CHANGED = 64; // 0x40 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END = 1024; // 0x400 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START = 512; // 0x200 field public static final int TYPE_VIEW_CLICKED = 1; // 0x1 field public static final int TYPE_VIEW_FOCUSED = 8; // 0x8 field public static final int TYPE_VIEW_HOVER_ENTER = 128; // 0x80 field public static final int TYPE_VIEW_HOVER_EXIT = 256; // 0x100 field public static final int TYPE_VIEW_LONG_CLICKED = 2; // 0x2 field public static final int TYPE_VIEW_SELECTED = 4; // 0x4 field public static final int TYPE_VIEW_TEXT_CHANGED = 16; // 0x10 Loading @@ -22071,58 +22088,11 @@ package android.view.accessibility { public final class AccessibilityManager { method public java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList(); method public java.util.List<android.content.pm.ServiceInfo> getEnabledAccessibilityServiceList(int); method public void interrupt(); method public boolean isEnabled(); method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent); } public class AccessibilityRecord { ctor protected AccessibilityRecord(); method protected void clear(); method public int getAddedCount(); method public java.lang.CharSequence getBeforeText(); method public boolean getBooleanProperty(int); method public java.lang.CharSequence getClassName(); method public java.lang.CharSequence getContentDescription(); method public int getCurrentItemIndex(); method public int getFromIndex(); method public int getItemCount(); method public android.os.Parcelable getParcelableData(); method public int getRemovedCount(); method public java.util.List<java.lang.CharSequence> getText(); method public boolean isChecked(); method public boolean isEnabled(); method public boolean isFullScreen(); method public boolean isPassword(); method protected static android.view.accessibility.AccessibilityRecord obtain(); method public void recycle(); method public void setAddedCount(int); method public void setBeforeText(java.lang.CharSequence); method public void setChecked(boolean); method public void setClassName(java.lang.CharSequence); method public void setContentDescription(java.lang.CharSequence); method public void setCurrentItemIndex(int); method public void setEnabled(boolean); method public void setFromIndex(int); method public void setFullScreen(boolean); method public void setItemCount(int); method public void setParcelableData(android.os.Parcelable); method public void setPassword(boolean); method public void setRemovedCount(int); field protected int mAddedCount; field protected java.lang.CharSequence mBeforeText; field protected int mBooleanProperties; field protected java.lang.CharSequence mClassName; field protected java.lang.CharSequence mContentDescription; field protected int mCurrentItemIndex; field protected int mFromIndex; field protected int mItemCount; field protected android.os.Parcelable mParcelableData; field protected int mRemovedCount; field protected final java.util.List mText; } } package android.view.animation { core/java/android/view/InputEventConsistencyVerifier.java +2 −17 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.util.Log; * @hide */ public final class InputEventConsistencyVerifier { private static final String TAG = "InputEventConsistencyVerifier"; private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); // The number of recent events to log when a problem is detected. Loading @@ -43,11 +44,6 @@ public final class InputEventConsistencyVerifier { // Consistency verifier flags. private final int mFlags; // Tag for logging which a client can set to help distinguish the output // from different verifiers since several can be active at the same time. // If not provided defaults to the simple class name. private final String mLogTag; // The most recently checked event and the nesting level at which it was checked. // This is only set when the verifier is called from a nesting level greater than 0 // so that the verifier can detect when it has been asked to verify the same event twice. Loading Loading @@ -107,19 +103,8 @@ public final class InputEventConsistencyVerifier { * @param flags Flags to the verifier, or 0 if none. */ public InputEventConsistencyVerifier(Object caller, int flags) { this(caller, flags, InputEventConsistencyVerifier.class.getSimpleName()); } /** * Creates an input consistency verifier. * @param caller The object to which the verifier is attached. * @param flags Flags to the verifier, or 0 if none. * @param logTag Tag for logging. If null defaults to the short class name. */ public InputEventConsistencyVerifier(Object caller, int flags, String logTag) { this.mCaller = caller; this.mFlags = flags; this.mLogTag = (logTag != null) ? logTag : "InputEventConsistencyVerifier"; } /** Loading Loading @@ -611,7 +596,7 @@ public final class InputEventConsistencyVerifier { } } Log.d(mLogTag, mViolationMessage.toString()); Log.d(TAG, mViolationMessage.toString()); mViolationMessage.setLength(0); tainted = true; } Loading core/java/android/view/View.java +18 −26 Original line number Diff line number Diff line Loading @@ -3455,10 +3455,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!isShown()) { return; } // Populate these here since they are related to the View that // sends the event and should not be modified while dispatching // to descendants. event.setClassName(getClass().getName()); event.setPackageName(getContext().getPackageName()); event.setEnabled(isEnabled()); Loading @@ -3474,37 +3470,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility dispatchPopulateAccessibilityEvent(event); // In the beginning we called #isShown(), so we know that getParent() is not null. getParent().requestSendAccessibilityEvent(this, event); AccessibilityManager.getInstance(mContext).sendAccessibilityEvent(event); } /** * Dispatches an {@link AccessibilityEvent} to the {@link View} children to be populated. * This method first calls {@link #onPopulateAccessibilityEvent(AccessibilityEvent)} * on this view allowing it to populate information about itself and also decide * whether to intercept the population i.e. to prevent its children from populating * the event. * Dispatches an {@link AccessibilityEvent} to the {@link View} children * to be populated. * * @param event The event. * * @return True if the event population was completed. */ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { onPopulateAccessibilityEvent(event); return false; } /** * Called from {@link #dispatchPopulateAccessibilityEvent(AccessibilityEvent)} * giving a chance to this View to populate the accessibility evnet with * information about itself. * * @param event The accessibility event which to populate. */ public void onPopulateAccessibilityEvent(AccessibilityEvent event) { } /** * Gets the {@link View} description. It briefly describes the view and is * primarily used for accessibility support. Set this property to enable Loading Loading @@ -5410,6 +5390,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * to receive the hover event. */ public boolean onHoverEvent(MotionEvent event) { final int viewFlags = mViewFlags; if (((viewFlags & CLICKABLE) != CLICKABLE && (viewFlags & LONG_CLICKABLE) != LONG_CLICKABLE)) { // Nothing to do if the view is not clickable. return false; } if ((viewFlags & ENABLED_MASK) == DISABLED) { // A disabled view that is clickable still consumes the hover events, it just doesn't // respond to them. return true; } switch (event.getAction()) { case MotionEvent.ACTION_HOVER_ENTER: setHovered(true); Loading @@ -5420,7 +5414,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility break; } return false; return true; } /** Loading @@ -5442,13 +5436,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if ((mPrivateFlags & HOVERED) == 0) { mPrivateFlags |= HOVERED; refreshDrawableState(); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER); } } else { if ((mPrivateFlags & HOVERED) != 0) { mPrivateFlags &= ~HOVERED; refreshDrawableState(); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT); } } } Loading core/java/android/view/ViewConfiguration.java +1 −21 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.view; import android.app.AppGlobals; import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.SparseArray; Loading Loading @@ -154,13 +155,6 @@ public class ViewConfiguration { */ private static final int MAXIMUM_FLING_VELOCITY = 8000; /** * Distance between a touch up event denoting the end of a touch exploration * gesture and the touch up event of a subsequent tap for the latter tap to be * considered as a tap i.e. to perform a click. */ private static final int TOUCH_EXPLORATION_TAP_SLOP = 80; /** * The maximum size of View's drawing cache, expressed in bytes. This size * should be at least equal to the size of the screen in ARGB888 format. Loading Loading @@ -191,7 +185,6 @@ public class ViewConfiguration { private final int mTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mScaledTouchExplorationTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; private final int mOverscrollDistance; Loading @@ -213,7 +206,6 @@ public class ViewConfiguration { mTouchSlop = TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mScaledTouchExplorationTapSlop = TOUCH_EXPLORATION_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation mMaximumDrawingCacheSize = MAXIMUM_DRAWING_CACHE_SIZE; Loading Loading @@ -250,7 +242,6 @@ public class ViewConfiguration { mTouchSlop = (int) (sizeAndDensity * TOUCH_SLOP + 0.5f); mPagingTouchSlop = (int) (sizeAndDensity * PAGING_TOUCH_SLOP + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mScaledTouchExplorationTapSlop = (int) (density * TOUCH_EXPLORATION_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); // Size of the screen in bytes, in ARGB_8888 format Loading Loading @@ -452,17 +443,6 @@ public class ViewConfiguration { return mDoubleTapSlop; } /** * @return Distance between a touch up event denoting the end of a touch exploration * gesture and the touch up event of a subsequent tap for the latter tap to be * considered as a tap i.e. to perform a click. * * @hide */ public int getScaledTouchExplorationTapSlop() { return mScaledTouchExplorationTapSlop; } /** * @return Distance a touch must be outside the bounds of a window for it * to be counted as outside the window for purposes of dismissing that Loading core/java/android/view/ViewGroup.java +5 −49 Original line number Diff line number Diff line Loading @@ -583,35 +583,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return false; } /** * {@inheritDoc} */ public boolean requestSendAccessibilityEvent(View child, AccessibilityEvent event) { ViewParent parent = getParent(); if (parent == null) { return false; } final boolean propagate = onRequestSendAccessibilityEvent(child, event); if (!propagate) { return false; } return parent.requestSendAccessibilityEvent(this, event); } /** * Called when a child has requested sending an {@link AccessibilityEvent} and * gives an opportunity to its parent to augment the event. * * @param child The child which requests sending the event. * @param event The event to be sent. * @return True if the event should be sent. * * @see #requestSendAccessibilityEvent(View, AccessibilityEvent) */ public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) { return true; } /** * {@inheritDoc} */ Loading Loading @@ -1245,8 +1216,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager eventNoHistory.setAction(MotionEvent.ACTION_HOVER_EXIT); handled |= dispatchTransformedGenericPointerEvent(eventNoHistory, mHoveredChild); eventNoHistory.setAction(action); mHoveredChild = null; } else { } else if (action == MotionEvent.ACTION_HOVER_MOVE) { // Pointer is still within the child. handled |= dispatchTransformedGenericPointerEvent(event, mHoveredChild); } Loading Loading @@ -1306,17 +1278,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return handled; } @Override public boolean onHoverEvent(MotionEvent event) { // Handle the event only if leaf. This guarantees that // the leafs (or any custom class that returns true from // this method) will get a change to process the hover. if (getChildCount() == 0) { return super.onHoverEvent(event); } return false; } private static MotionEvent obtainMotionEventNoHistoryOrSelf(MotionEvent event) { if (event.getHistorySize() == 0) { return event; Loading Loading @@ -2130,16 +2091,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { // We first get a chance to populate the event. onPopulateAccessibilityEvent(event); // Let our children have a shot in populating the event. boolean populated = false; for (int i = 0, count = getChildCount(); i < count; i++) { boolean handled = getChildAt(i).dispatchPopulateAccessibilityEvent(event); if (handled) { return handled; } populated |= getChildAt(i).dispatchPopulateAccessibilityEvent(event); } return false; return populated; } /** Loading Loading
api/current.txt +29 −59 Original line number Diff line number Diff line Loading @@ -21174,7 +21174,6 @@ package android.view { method protected void onLayout(boolean, int, int, int, int); method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -21586,7 +21585,6 @@ package android.view { method public boolean onInterceptTouchEvent(android.view.MotionEvent); method protected abstract void onLayout(boolean, int, int, int, int); method protected boolean onRequestFocusInDescendants(int, android.graphics.Rect); method public boolean onRequestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void recomputeViewAttributes(android.view.View); method public void removeAllViews(); method public void removeAllViewsInLayout(); Loading @@ -21599,7 +21597,6 @@ package android.view { method public void requestChildFocus(android.view.View, android.view.View); method public boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean); method public void requestDisallowInterceptTouchEvent(boolean); method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void requestTransparentRegion(android.view.View); method public void scheduleLayoutAnimation(); method public void setAddStatesFromChildren(boolean); Loading Loading @@ -21686,7 +21683,6 @@ package android.view { method public abstract boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean); method public abstract void requestDisallowInterceptTouchEvent(boolean); method public abstract void requestLayout(); method public abstract boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public abstract void requestTransparentRegion(android.view.View); method public abstract boolean showContextMenuForChild(android.view.View); method public abstract android.view.ActionMode startActionModeForChild(android.view.View, android.view.ActionMode.Callback); Loading Loading @@ -22032,32 +22028,53 @@ package android.view { package android.view.accessibility { public final class AccessibilityEvent extends android.view.accessibility.AccessibilityRecord implements android.os.Parcelable { method public void appendRecord(android.view.accessibility.AccessibilityRecord); public final class AccessibilityEvent implements android.os.Parcelable { method public int describeContents(); method public int getAddedCount(); method public java.lang.CharSequence getBeforeText(); method public java.lang.CharSequence getClassName(); method public java.lang.CharSequence getContentDescription(); method public int getCurrentItemIndex(); method public long getEventTime(); method public int getEventType(); method public int getFromIndex(); method public int getItemCount(); method public java.lang.CharSequence getPackageName(); method public android.view.accessibility.AccessibilityRecord getRecord(int); method public int getRecordCount(); method public android.os.Parcelable getParcelableData(); method public int getRemovedCount(); method public java.util.List<java.lang.CharSequence> getText(); method public void initFromParcel(android.os.Parcel); method public boolean isChecked(); method public boolean isEnabled(); method public boolean isFullScreen(); method public boolean isPassword(); method public static android.view.accessibility.AccessibilityEvent obtain(int); method public static android.view.accessibility.AccessibilityEvent obtain(); method public void recycle(); method public void setAddedCount(int); method public void setBeforeText(java.lang.CharSequence); method public void setChecked(boolean); method public void setClassName(java.lang.CharSequence); method public void setContentDescription(java.lang.CharSequence); method public void setCurrentItemIndex(int); method public void setEnabled(boolean); method public void setEventTime(long); method public void setEventType(int); method public void setFromIndex(int); method public void setFullScreen(boolean); method public void setItemCount(int); method public void setPackageName(java.lang.CharSequence); method public void setParcelableData(android.os.Parcelable); method public void setPassword(boolean); method public void setRemovedCount(int); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator CREATOR; field public static final int INVALID_POSITION = -1; // 0xffffffff field public static final deprecated int MAX_TEXT_LENGTH = 500; // 0x1f4 field public static final int TYPES_ALL_MASK = -1; // 0xffffffff field public static final int TYPE_NOTIFICATION_STATE_CHANGED = 64; // 0x40 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END = 1024; // 0x400 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START = 512; // 0x200 field public static final int TYPE_VIEW_CLICKED = 1; // 0x1 field public static final int TYPE_VIEW_FOCUSED = 8; // 0x8 field public static final int TYPE_VIEW_HOVER_ENTER = 128; // 0x80 field public static final int TYPE_VIEW_HOVER_EXIT = 256; // 0x100 field public static final int TYPE_VIEW_LONG_CLICKED = 2; // 0x2 field public static final int TYPE_VIEW_SELECTED = 4; // 0x4 field public static final int TYPE_VIEW_TEXT_CHANGED = 16; // 0x10 Loading @@ -22071,58 +22088,11 @@ package android.view.accessibility { public final class AccessibilityManager { method public java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList(); method public java.util.List<android.content.pm.ServiceInfo> getEnabledAccessibilityServiceList(int); method public void interrupt(); method public boolean isEnabled(); method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent); } public class AccessibilityRecord { ctor protected AccessibilityRecord(); method protected void clear(); method public int getAddedCount(); method public java.lang.CharSequence getBeforeText(); method public boolean getBooleanProperty(int); method public java.lang.CharSequence getClassName(); method public java.lang.CharSequence getContentDescription(); method public int getCurrentItemIndex(); method public int getFromIndex(); method public int getItemCount(); method public android.os.Parcelable getParcelableData(); method public int getRemovedCount(); method public java.util.List<java.lang.CharSequence> getText(); method public boolean isChecked(); method public boolean isEnabled(); method public boolean isFullScreen(); method public boolean isPassword(); method protected static android.view.accessibility.AccessibilityRecord obtain(); method public void recycle(); method public void setAddedCount(int); method public void setBeforeText(java.lang.CharSequence); method public void setChecked(boolean); method public void setClassName(java.lang.CharSequence); method public void setContentDescription(java.lang.CharSequence); method public void setCurrentItemIndex(int); method public void setEnabled(boolean); method public void setFromIndex(int); method public void setFullScreen(boolean); method public void setItemCount(int); method public void setParcelableData(android.os.Parcelable); method public void setPassword(boolean); method public void setRemovedCount(int); field protected int mAddedCount; field protected java.lang.CharSequence mBeforeText; field protected int mBooleanProperties; field protected java.lang.CharSequence mClassName; field protected java.lang.CharSequence mContentDescription; field protected int mCurrentItemIndex; field protected int mFromIndex; field protected int mItemCount; field protected android.os.Parcelable mParcelableData; field protected int mRemovedCount; field protected final java.util.List mText; } } package android.view.animation {
core/java/android/view/InputEventConsistencyVerifier.java +2 −17 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.util.Log; * @hide */ public final class InputEventConsistencyVerifier { private static final String TAG = "InputEventConsistencyVerifier"; private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); // The number of recent events to log when a problem is detected. Loading @@ -43,11 +44,6 @@ public final class InputEventConsistencyVerifier { // Consistency verifier flags. private final int mFlags; // Tag for logging which a client can set to help distinguish the output // from different verifiers since several can be active at the same time. // If not provided defaults to the simple class name. private final String mLogTag; // The most recently checked event and the nesting level at which it was checked. // This is only set when the verifier is called from a nesting level greater than 0 // so that the verifier can detect when it has been asked to verify the same event twice. Loading Loading @@ -107,19 +103,8 @@ public final class InputEventConsistencyVerifier { * @param flags Flags to the verifier, or 0 if none. */ public InputEventConsistencyVerifier(Object caller, int flags) { this(caller, flags, InputEventConsistencyVerifier.class.getSimpleName()); } /** * Creates an input consistency verifier. * @param caller The object to which the verifier is attached. * @param flags Flags to the verifier, or 0 if none. * @param logTag Tag for logging. If null defaults to the short class name. */ public InputEventConsistencyVerifier(Object caller, int flags, String logTag) { this.mCaller = caller; this.mFlags = flags; this.mLogTag = (logTag != null) ? logTag : "InputEventConsistencyVerifier"; } /** Loading Loading @@ -611,7 +596,7 @@ public final class InputEventConsistencyVerifier { } } Log.d(mLogTag, mViolationMessage.toString()); Log.d(TAG, mViolationMessage.toString()); mViolationMessage.setLength(0); tainted = true; } Loading
core/java/android/view/View.java +18 −26 Original line number Diff line number Diff line Loading @@ -3455,10 +3455,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (!isShown()) { return; } // Populate these here since they are related to the View that // sends the event and should not be modified while dispatching // to descendants. event.setClassName(getClass().getName()); event.setPackageName(getContext().getPackageName()); event.setEnabled(isEnabled()); Loading @@ -3474,37 +3470,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility dispatchPopulateAccessibilityEvent(event); // In the beginning we called #isShown(), so we know that getParent() is not null. getParent().requestSendAccessibilityEvent(this, event); AccessibilityManager.getInstance(mContext).sendAccessibilityEvent(event); } /** * Dispatches an {@link AccessibilityEvent} to the {@link View} children to be populated. * This method first calls {@link #onPopulateAccessibilityEvent(AccessibilityEvent)} * on this view allowing it to populate information about itself and also decide * whether to intercept the population i.e. to prevent its children from populating * the event. * Dispatches an {@link AccessibilityEvent} to the {@link View} children * to be populated. * * @param event The event. * * @return True if the event population was completed. */ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { onPopulateAccessibilityEvent(event); return false; } /** * Called from {@link #dispatchPopulateAccessibilityEvent(AccessibilityEvent)} * giving a chance to this View to populate the accessibility evnet with * information about itself. * * @param event The accessibility event which to populate. */ public void onPopulateAccessibilityEvent(AccessibilityEvent event) { } /** * Gets the {@link View} description. It briefly describes the view and is * primarily used for accessibility support. Set this property to enable Loading Loading @@ -5410,6 +5390,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * to receive the hover event. */ public boolean onHoverEvent(MotionEvent event) { final int viewFlags = mViewFlags; if (((viewFlags & CLICKABLE) != CLICKABLE && (viewFlags & LONG_CLICKABLE) != LONG_CLICKABLE)) { // Nothing to do if the view is not clickable. return false; } if ((viewFlags & ENABLED_MASK) == DISABLED) { // A disabled view that is clickable still consumes the hover events, it just doesn't // respond to them. return true; } switch (event.getAction()) { case MotionEvent.ACTION_HOVER_ENTER: setHovered(true); Loading @@ -5420,7 +5414,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility break; } return false; return true; } /** Loading @@ -5442,13 +5436,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if ((mPrivateFlags & HOVERED) == 0) { mPrivateFlags |= HOVERED; refreshDrawableState(); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER); } } else { if ((mPrivateFlags & HOVERED) != 0) { mPrivateFlags &= ~HOVERED; refreshDrawableState(); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT); } } } Loading
core/java/android/view/ViewConfiguration.java +1 −21 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.view; import android.app.AppGlobals; import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.SparseArray; Loading Loading @@ -154,13 +155,6 @@ public class ViewConfiguration { */ private static final int MAXIMUM_FLING_VELOCITY = 8000; /** * Distance between a touch up event denoting the end of a touch exploration * gesture and the touch up event of a subsequent tap for the latter tap to be * considered as a tap i.e. to perform a click. */ private static final int TOUCH_EXPLORATION_TAP_SLOP = 80; /** * The maximum size of View's drawing cache, expressed in bytes. This size * should be at least equal to the size of the screen in ARGB888 format. Loading Loading @@ -191,7 +185,6 @@ public class ViewConfiguration { private final int mTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mScaledTouchExplorationTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; private final int mOverscrollDistance; Loading @@ -213,7 +206,6 @@ public class ViewConfiguration { mTouchSlop = TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mScaledTouchExplorationTapSlop = TOUCH_EXPLORATION_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation mMaximumDrawingCacheSize = MAXIMUM_DRAWING_CACHE_SIZE; Loading Loading @@ -250,7 +242,6 @@ public class ViewConfiguration { mTouchSlop = (int) (sizeAndDensity * TOUCH_SLOP + 0.5f); mPagingTouchSlop = (int) (sizeAndDensity * PAGING_TOUCH_SLOP + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mScaledTouchExplorationTapSlop = (int) (density * TOUCH_EXPLORATION_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); // Size of the screen in bytes, in ARGB_8888 format Loading Loading @@ -452,17 +443,6 @@ public class ViewConfiguration { return mDoubleTapSlop; } /** * @return Distance between a touch up event denoting the end of a touch exploration * gesture and the touch up event of a subsequent tap for the latter tap to be * considered as a tap i.e. to perform a click. * * @hide */ public int getScaledTouchExplorationTapSlop() { return mScaledTouchExplorationTapSlop; } /** * @return Distance a touch must be outside the bounds of a window for it * to be counted as outside the window for purposes of dismissing that Loading
core/java/android/view/ViewGroup.java +5 −49 Original line number Diff line number Diff line Loading @@ -583,35 +583,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return false; } /** * {@inheritDoc} */ public boolean requestSendAccessibilityEvent(View child, AccessibilityEvent event) { ViewParent parent = getParent(); if (parent == null) { return false; } final boolean propagate = onRequestSendAccessibilityEvent(child, event); if (!propagate) { return false; } return parent.requestSendAccessibilityEvent(this, event); } /** * Called when a child has requested sending an {@link AccessibilityEvent} and * gives an opportunity to its parent to augment the event. * * @param child The child which requests sending the event. * @param event The event to be sent. * @return True if the event should be sent. * * @see #requestSendAccessibilityEvent(View, AccessibilityEvent) */ public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) { return true; } /** * {@inheritDoc} */ Loading Loading @@ -1245,8 +1216,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager eventNoHistory.setAction(MotionEvent.ACTION_HOVER_EXIT); handled |= dispatchTransformedGenericPointerEvent(eventNoHistory, mHoveredChild); eventNoHistory.setAction(action); mHoveredChild = null; } else { } else if (action == MotionEvent.ACTION_HOVER_MOVE) { // Pointer is still within the child. handled |= dispatchTransformedGenericPointerEvent(event, mHoveredChild); } Loading Loading @@ -1306,17 +1278,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return handled; } @Override public boolean onHoverEvent(MotionEvent event) { // Handle the event only if leaf. This guarantees that // the leafs (or any custom class that returns true from // this method) will get a change to process the hover. if (getChildCount() == 0) { return super.onHoverEvent(event); } return false; } private static MotionEvent obtainMotionEventNoHistoryOrSelf(MotionEvent event) { if (event.getHistorySize() == 0) { return event; Loading Loading @@ -2130,16 +2091,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { // We first get a chance to populate the event. onPopulateAccessibilityEvent(event); // Let our children have a shot in populating the event. boolean populated = false; for (int i = 0, count = getChildCount(); i < count; i++) { boolean handled = getChildAt(i).dispatchPopulateAccessibilityEvent(event); if (handled) { return handled; } populated |= getChildAt(i).dispatchPopulateAccessibilityEvent(event); } return false; return populated; } /** Loading