diff options
author | Justin Koh <justinkoh@google.com> | 2014-05-02 10:02:44 -0700 |
---|---|---|
committer | Justin Koh <justinkoh@google.com> | 2014-05-02 10:04:34 -0700 |
commit | feabd2c7304f05eab30eebeb50016b073735443b (patch) | |
tree | fe18427b1a6d6937d86e1e704b2d04168151487e /policy | |
parent | 7f6ab17d414726868563105cd995b37dd519320b (diff) | |
download | frameworks_base-feabd2c7304f05eab30eebeb50016b073735443b.zip frameworks_base-feabd2c7304f05eab30eebeb50016b073735443b.tar.gz frameworks_base-feabd2c7304f05eab30eebeb50016b073735443b.tar.bz2 |
Make global action key timeout configurable.
Make global action key timeout configurable: deprecated the old public method
and created a new one: getDeviceGlobalActionKeyTimeout.
Bug: 14441321
Change-Id: Ifa9b136984a9f02cfe4040baeff11275174967c5
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 2b7bbd0..dd7abb6 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -668,7 +668,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { private void interceptPowerKeyDown(boolean handled) { mPowerKeyHandled = handled; if (!handled) { - mHandler.postDelayed(mPowerLongPress, ViewConfiguration.getGlobalActionKeyTimeout()); + mHandler.postDelayed(mPowerLongPress, + ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()); } } @@ -707,9 +708,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.getGlobalActionKeyTimeout()); + ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()); } - return ViewConfiguration.getGlobalActionKeyTimeout(); + return ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout(); } private void cancelPendingScreenshotChordAction() { |