summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDaniel Bateman <jetison.24@gmail.com>2012-06-19 20:53:23 -0500
committerDaniel Bateman <jetison.24@gmail.com>2012-06-23 19:41:06 -0500
commitec93c0e204688a2d9f4d43e6861f20f1e8aea916 (patch)
tree6a184e41416c3062382583b27b913b8a99ea9ead /policy
parent740a737b8e9d64a6749c3786ad741be12453bdcf (diff)
downloadframeworks_base-ec93c0e204688a2d9f4d43e6861f20f1e8aea916.zip
frameworks_base-ec93c0e204688a2d9f4d43e6861f20f1e8aea916.tar.gz
frameworks_base-ec93c0e204688a2d9f4d43e6861f20f1e8aea916.tar.bz2
framework: customizable kill app via back key timeout
Allows the time it takes for the back key to kill an app to be customized via overlay. Change-Id: Iaa43f81ee448ae7a7663254a830011a0bca5e60f
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 9094f85..933a3a3 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -367,6 +367,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final int DEFAULT_ACCELEROMETER_ROTATION = 0;
int mAccelerometerDefault = DEFAULT_ACCELEROMETER_ROTATION;
boolean mHasSoftInput = false;
+ int mBackKillTimeout;
int mPointerLocationMode = 0;
PointerLocationView mPointerLocationView = null;
@@ -993,6 +994,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
com.android.internal.R.integer.config_lidKeyboardAccessibility);
mLidNavigationAccessibility = mContext.getResources().getInteger(
com.android.internal.R.integer.config_lidNavigationAccessibility);
+ mBackKillTimeout = mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_backKillTimeout);
// register for dock events
IntentFilter filter = new IntentFilter();
filter.addAction(UiModeManager.ACTION_ENTER_CAR_MODE);
@@ -1894,7 +1897,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.KILL_APP_LONGPRESS_BACK, 0) == 1) {
if (down && repeatCount == 0) {
- mHandler.postDelayed(mBackLongPress, 2000);
+ mHandler.postDelayed(mBackLongPress, mBackKillTimeout);
}
}
}