diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-01-13 21:08:27 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-01-13 21:18:16 -0800 |
commit | b09abc1dd271d0eb4ba4050d8bf9670802a7d0fe (patch) | |
tree | 7988cad20c9d4851ec35c9e5f7c86c341f90023f /policy | |
parent | 00ae87d4fd853dd3be9d8820715a98bd72887176 (diff) | |
download | frameworks_base-b09abc1dd271d0eb4ba4050d8bf9670802a7d0fe.zip frameworks_base-b09abc1dd271d0eb4ba4050d8bf9670802a7d0fe.tar.gz frameworks_base-b09abc1dd271d0eb4ba4050d8bf9670802a7d0fe.tar.bz2 |
Add volume down as a safe mode key for Stingray.
Fixed a race condition during startup. We need to wait for the input
devices to actually be ready before trying to detect safe mode.
Fixed a problem during safe mode activation where we would try to add
the overlay window but the display was not initialized. Now we do it
after the system is ready.
Bug: 3134825
Change-Id: I4c043c142ae6bf0d865c79d266d36154eaf00709
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 4 |
1 files changed, 3 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 a6037aa..ee1a141 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2550,7 +2550,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { int sState = mWindowManager.getKeycodeState(KeyEvent.KEYCODE_S); int dpadState = mWindowManager.getDPadKeycodeState(KeyEvent.KEYCODE_DPAD_CENTER); int trackballState = mWindowManager.getTrackballScancodeState(BTN_MOUSE); - mSafeMode = menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0; + int volumeDownState = mWindowManager.getKeycodeState(KeyEvent.KEYCODE_VOLUME_DOWN); + mSafeMode = menuState > 0 || sState > 0 || dpadState > 0 || trackballState > 0 + || volumeDownState > 0; performHapticFeedbackLw(null, mSafeMode ? HapticFeedbackConstants.SAFE_MODE_ENABLED : HapticFeedbackConstants.SAFE_MODE_DISABLED, true); |