Loading core/java/android/view/ViewConfiguration.java +1 −22 Original line number Diff line number Diff line Loading @@ -192,20 +192,13 @@ public class ViewConfiguration { */ private static final int MAXIMUM_FLING_VELOCITY = 8000; /** * Distance in dips 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_EXPLORE_TAP_SLOP = 80; /** * Delay before dispatching a recurring accessibility event in milliseconds. * This delay guarantees that a recurring event will be send at most once * during the {@link #SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS} time * frame. */ private static final long SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS = 400; private static final long SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS = 100; /** * The maximum size of View's drawing cache, expressed in bytes. This size Loading Loading @@ -238,7 +231,6 @@ public class ViewConfiguration { private final int mDoubleTapTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mScaledTouchExploreTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; private final int mOverscrollDistance; Loading @@ -265,7 +257,6 @@ public class ViewConfiguration { mDoubleTapTouchSlop = DOUBLE_TAP_TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mScaledTouchExploreTapSlop = TOUCH_EXPLORE_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation mMaximumDrawingCacheSize = MAXIMUM_DRAWING_CACHE_SIZE; Loading Loading @@ -302,7 +293,6 @@ public class ViewConfiguration { mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mScaledTouchExploreTapSlop = (int) (density * TOUCH_EXPLORE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); final Display display = WindowManagerImpl.getDefault().getDefaultDisplay(); Loading Loading @@ -552,17 +542,6 @@ public class ViewConfiguration { return mDoubleTapSlop; } /** * @return Distance in pixels 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 getScaledTouchExploreTapSlop() { return mScaledTouchExploreTapSlop; } /** * Interval for dispatching a recurring accessibility event in milliseconds. * This interval guarantees that a recurring event will be send at most once Loading core/res/res/raw/accessibility_gestures.bin −28.9 KiB (8.56 KiB) File changed.No diff preview for this file type. View original file View changed file core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1518,6 +1518,8 @@ <java-symbol type="xml" name="storage_list" /> <java-symbol type="bool" name="config_enableDreams" /> <java-symbol type="string" name="config_defaultDreamComponent" /> <java-symbol type="string" name="enable_explore_by_touch_warning_title" /> <java-symbol type="string" name="enable_explore_by_touch_warning_message" /> <java-symbol type="layout" name="resolver_grid" /> <java-symbol type="id" name="resolver_grid" /> Loading core/res/res/values/strings.xml +19 −0 Original line number Diff line number Diff line Loading @@ -2503,6 +2503,25 @@ <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] --> <string name="searchview_description_voice">Voice search</string> <!-- Title for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (default). [CHAR LIMIT=35] --> <string name="enable_explore_by_touch_warning_title">Enable Explore by Touch?</string> <!-- Summary for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (tablet). [CHAR LIMIT=NONE] --> <string name="enable_explore_by_touch_warning_message" product="tablet"> <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the tablet.</string> <!-- Summary for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (default). [CHAR LIMIT=NONE] --> <string name="enable_explore_by_touch_warning_message" product="default"> <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone.</string> <!-- String used to display the date. This is the string to say something happened 1 month ago. --> <string name="oneMonthDurationPast">1 month ago</string> <!-- String used to display the date. This is the string to say something happened more than 1 month ago. --> Loading services/java/com/android/server/accessibility/AccessibilityInputFilter.java +4 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.accessibility; import com.android.server.accessibility.TouchExplorer.GestureListener; import com.android.server.input.InputFilter; import android.content.Context; Loading @@ -40,7 +39,7 @@ public class AccessibilityInputFilter extends InputFilter { private final PowerManager mPm; private final GestureListener mGestureListener; private final AccessibilityManagerService mAms; /** * This is an interface for explorers that take a {@link MotionEvent} Loading Loading @@ -73,10 +72,10 @@ public class AccessibilityInputFilter extends InputFilter { private int mTouchscreenSourceDeviceId; public AccessibilityInputFilter(Context context, GestureListener gestureListener) { public AccessibilityInputFilter(Context context, AccessibilityManagerService service) { super(context.getMainLooper()); mContext = context; mGestureListener = gestureListener; mAms = service; mPm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); } Loading @@ -85,7 +84,7 @@ public class AccessibilityInputFilter extends InputFilter { if (DEBUG) { Slog.d(TAG, "Accessibility input filter installed."); } mTouchExplorer = new TouchExplorer(this, mContext, mGestureListener); mTouchExplorer = new TouchExplorer(this, mContext, mAms); super.onInstalled(); } Loading Loading
core/java/android/view/ViewConfiguration.java +1 −22 Original line number Diff line number Diff line Loading @@ -192,20 +192,13 @@ public class ViewConfiguration { */ private static final int MAXIMUM_FLING_VELOCITY = 8000; /** * Distance in dips 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_EXPLORE_TAP_SLOP = 80; /** * Delay before dispatching a recurring accessibility event in milliseconds. * This delay guarantees that a recurring event will be send at most once * during the {@link #SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS} time * frame. */ private static final long SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS = 400; private static final long SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS = 100; /** * The maximum size of View's drawing cache, expressed in bytes. This size Loading Loading @@ -238,7 +231,6 @@ public class ViewConfiguration { private final int mDoubleTapTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mScaledTouchExploreTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; private final int mOverscrollDistance; Loading @@ -265,7 +257,6 @@ public class ViewConfiguration { mDoubleTapTouchSlop = DOUBLE_TAP_TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mScaledTouchExploreTapSlop = TOUCH_EXPLORE_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation mMaximumDrawingCacheSize = MAXIMUM_DRAWING_CACHE_SIZE; Loading Loading @@ -302,7 +293,6 @@ public class ViewConfiguration { mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mScaledTouchExploreTapSlop = (int) (density * TOUCH_EXPLORE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); final Display display = WindowManagerImpl.getDefault().getDefaultDisplay(); Loading Loading @@ -552,17 +542,6 @@ public class ViewConfiguration { return mDoubleTapSlop; } /** * @return Distance in pixels 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 getScaledTouchExploreTapSlop() { return mScaledTouchExploreTapSlop; } /** * Interval for dispatching a recurring accessibility event in milliseconds. * This interval guarantees that a recurring event will be send at most once Loading
core/res/res/raw/accessibility_gestures.bin −28.9 KiB (8.56 KiB) File changed.No diff preview for this file type. View original file View changed file
core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1518,6 +1518,8 @@ <java-symbol type="xml" name="storage_list" /> <java-symbol type="bool" name="config_enableDreams" /> <java-symbol type="string" name="config_defaultDreamComponent" /> <java-symbol type="string" name="enable_explore_by_touch_warning_title" /> <java-symbol type="string" name="enable_explore_by_touch_warning_message" /> <java-symbol type="layout" name="resolver_grid" /> <java-symbol type="id" name="resolver_grid" /> Loading
core/res/res/values/strings.xml +19 −0 Original line number Diff line number Diff line Loading @@ -2503,6 +2503,25 @@ <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] --> <string name="searchview_description_voice">Voice search</string> <!-- Title for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (default). [CHAR LIMIT=35] --> <string name="enable_explore_by_touch_warning_title">Enable Explore by Touch?</string> <!-- Summary for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (tablet). [CHAR LIMIT=NONE] --> <string name="enable_explore_by_touch_warning_message" product="tablet"> <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the tablet.</string> <!-- Summary for a warning message about the interaction model changes after allowing an accessibility service to put the device into explore by touch mode, displayed as a dialog message when the user selects to enables the service. (default). [CHAR LIMIT=NONE] --> <string name="enable_explore_by_touch_warning_message" product="default"> <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone.</string> <!-- String used to display the date. This is the string to say something happened 1 month ago. --> <string name="oneMonthDurationPast">1 month ago</string> <!-- String used to display the date. This is the string to say something happened more than 1 month ago. --> Loading
services/java/com/android/server/accessibility/AccessibilityInputFilter.java +4 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.accessibility; import com.android.server.accessibility.TouchExplorer.GestureListener; import com.android.server.input.InputFilter; import android.content.Context; Loading @@ -40,7 +39,7 @@ public class AccessibilityInputFilter extends InputFilter { private final PowerManager mPm; private final GestureListener mGestureListener; private final AccessibilityManagerService mAms; /** * This is an interface for explorers that take a {@link MotionEvent} Loading Loading @@ -73,10 +72,10 @@ public class AccessibilityInputFilter extends InputFilter { private int mTouchscreenSourceDeviceId; public AccessibilityInputFilter(Context context, GestureListener gestureListener) { public AccessibilityInputFilter(Context context, AccessibilityManagerService service) { super(context.getMainLooper()); mContext = context; mGestureListener = gestureListener; mAms = service; mPm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); } Loading @@ -85,7 +84,7 @@ public class AccessibilityInputFilter extends InputFilter { if (DEBUG) { Slog.d(TAG, "Accessibility input filter installed."); } mTouchExplorer = new TouchExplorer(this, mContext, mGestureListener); mTouchExplorer = new TouchExplorer(this, mContext, mAms); super.onInstalled(); } Loading