Loading core/java/android/view/ViewConfiguration.java +23 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,12 @@ public class ViewConfiguration { */ private static final int GLOBAL_ACTIONS_KEY_TIMEOUT = 500; /** * Defines the duration in milliseconds a user needs to hold down the * appropriate buttons (power + volume down) to trigger the screenshot chord. */ private static final int SCREENSHOT_CHORD_KEY_TIMEOUT = 500; /** * Defines the duration in milliseconds a user needs to hold down the * appropriate button to bring up the accessibility shortcut for the first time Loading Loading @@ -316,6 +322,7 @@ public class ViewConfiguration { private final float mVerticalScrollFactor; private final float mHorizontalScrollFactor; private final boolean mShowMenuShortcutsWhenKeyboardPresent; private final long mScreenshotChordKeyTimeout; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768915) private boolean sHasPermanentMenuKey; Loading Loading @@ -353,6 +360,7 @@ public class ViewConfiguration { mHorizontalScrollFactor = HORIZONTAL_SCROLL_FACTOR; mVerticalScrollFactor = VERTICAL_SCROLL_FACTOR; mShowMenuShortcutsWhenKeyboardPresent = false; mScreenshotChordKeyTimeout = SCREENSHOT_CHORD_KEY_TIMEOUT; // Getter throws if mConstructedWithContext is false so doesn't matter what // this value is. Loading Loading @@ -457,6 +465,9 @@ public class ViewConfiguration { mMinScalingSpan = res.getDimensionPixelSize( com.android.internal.R.dimen.config_minScalingSpan); mScreenshotChordKeyTimeout = res.getInteger( com.android.internal.R.integer.config_screenshotChordKeyTimeout); } /** Loading Loading @@ -889,6 +900,18 @@ public class ViewConfiguration { return mGlobalActionsKeyTimeout; } /** * The amount of time a user needs to press the relevant keys to trigger * the screenshot chord. * * @return how long a user needs to press the relevant keys to trigger * the screenshot chord. * @hide */ public long getScreenshotChordKeyTimeout() { return mScreenshotChordKeyTimeout; } /** * The amount of time a user needs to press the relevant keys to activate the accessibility * shortcut. Loading core/res/res/values/config.xml +6 −1 Original line number Diff line number Diff line Loading @@ -2398,9 +2398,14 @@ <!-- Maximum velocity to initiate a fling, as measured in dips per second. --> <dimen name="config_viewMaxFlingVelocity">8000dp</dimen> <!-- Amount of time in ms the user needs to press the relevant key to bring up the global actions dialog --> <!-- Amount of time in ms the user needs to press the relevant key to bring up the global actions dialog --> <integer name="config_globalActionsKeyTimeout">500</integer> <!-- Amount of time in ms the user needs to press the relevant keys to trigger the screenshot chord --> <integer name="config_screenshotChordKeyTimeout">500</integer> <!-- Default width of a vertical scrollbar and height of a horizontal scrollbar. Takes effect only if the scrollbar drawables have no intrinsic size. --> <dimen name="config_scrollbarSize">4dp</dimen> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2228,6 +2228,7 @@ <java-symbol type="id" name="button_always" /> <java-symbol type="id" name="button_app_settings" /> <java-symbol type="integer" name="config_globalActionsKeyTimeout" /> <java-symbol type="integer" name="config_screenshotChordKeyTimeout" /> <java-symbol type="integer" name="config_maxResolverActivityColumns" /> <java-symbol type="array" name="config_notificationSignalExtractors" /> Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1361,9 +1361,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mKeyguardDelegate.isShowing()) { // Double the time it takes to take a screenshot from the keyguard return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER * ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()); ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout()); } return ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout(); return ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout(); } private long getRingerToggleChordDelay() { Loading Loading
core/java/android/view/ViewConfiguration.java +23 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,12 @@ public class ViewConfiguration { */ private static final int GLOBAL_ACTIONS_KEY_TIMEOUT = 500; /** * Defines the duration in milliseconds a user needs to hold down the * appropriate buttons (power + volume down) to trigger the screenshot chord. */ private static final int SCREENSHOT_CHORD_KEY_TIMEOUT = 500; /** * Defines the duration in milliseconds a user needs to hold down the * appropriate button to bring up the accessibility shortcut for the first time Loading Loading @@ -316,6 +322,7 @@ public class ViewConfiguration { private final float mVerticalScrollFactor; private final float mHorizontalScrollFactor; private final boolean mShowMenuShortcutsWhenKeyboardPresent; private final long mScreenshotChordKeyTimeout; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768915) private boolean sHasPermanentMenuKey; Loading Loading @@ -353,6 +360,7 @@ public class ViewConfiguration { mHorizontalScrollFactor = HORIZONTAL_SCROLL_FACTOR; mVerticalScrollFactor = VERTICAL_SCROLL_FACTOR; mShowMenuShortcutsWhenKeyboardPresent = false; mScreenshotChordKeyTimeout = SCREENSHOT_CHORD_KEY_TIMEOUT; // Getter throws if mConstructedWithContext is false so doesn't matter what // this value is. Loading Loading @@ -457,6 +465,9 @@ public class ViewConfiguration { mMinScalingSpan = res.getDimensionPixelSize( com.android.internal.R.dimen.config_minScalingSpan); mScreenshotChordKeyTimeout = res.getInteger( com.android.internal.R.integer.config_screenshotChordKeyTimeout); } /** Loading Loading @@ -889,6 +900,18 @@ public class ViewConfiguration { return mGlobalActionsKeyTimeout; } /** * The amount of time a user needs to press the relevant keys to trigger * the screenshot chord. * * @return how long a user needs to press the relevant keys to trigger * the screenshot chord. * @hide */ public long getScreenshotChordKeyTimeout() { return mScreenshotChordKeyTimeout; } /** * The amount of time a user needs to press the relevant keys to activate the accessibility * shortcut. Loading
core/res/res/values/config.xml +6 −1 Original line number Diff line number Diff line Loading @@ -2398,9 +2398,14 @@ <!-- Maximum velocity to initiate a fling, as measured in dips per second. --> <dimen name="config_viewMaxFlingVelocity">8000dp</dimen> <!-- Amount of time in ms the user needs to press the relevant key to bring up the global actions dialog --> <!-- Amount of time in ms the user needs to press the relevant key to bring up the global actions dialog --> <integer name="config_globalActionsKeyTimeout">500</integer> <!-- Amount of time in ms the user needs to press the relevant keys to trigger the screenshot chord --> <integer name="config_screenshotChordKeyTimeout">500</integer> <!-- Default width of a vertical scrollbar and height of a horizontal scrollbar. Takes effect only if the scrollbar drawables have no intrinsic size. --> <dimen name="config_scrollbarSize">4dp</dimen> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2228,6 +2228,7 @@ <java-symbol type="id" name="button_always" /> <java-symbol type="id" name="button_app_settings" /> <java-symbol type="integer" name="config_globalActionsKeyTimeout" /> <java-symbol type="integer" name="config_screenshotChordKeyTimeout" /> <java-symbol type="integer" name="config_maxResolverActivityColumns" /> <java-symbol type="array" name="config_notificationSignalExtractors" /> Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1361,9 +1361,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mKeyguardDelegate.isShowing()) { // Double the time it takes to take a screenshot from the keyguard return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER * ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()); ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout()); } return ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout(); return ViewConfiguration.get(mContext).getScreenshotChordKeyTimeout(); } private long getRingerToggleChordDelay() { Loading