diff options
| author | tiger_huang <tiger_huang@htc.com> | 2014-10-14 14:48:00 +0800 |
|---|---|---|
| committer | Tiger Huang <tiger_huang@htc.com> | 2014-11-25 12:29:37 +0000 |
| commit | 1b33b497239d783ea25acd31764836818ebd65b5 (patch) | |
| tree | 62b7c83ee12e7dc6e1a37fb6b9747e62762393df | |
| parent | 71f83672f297b116988defbe989869e5744cda5e (diff) | |
| download | frameworks_base-1b33b497239d783ea25acd31764836818ebd65b5.zip frameworks_base-1b33b497239d783ea25acd31764836818ebd65b5.tar.gz frameworks_base-1b33b497239d783ea25acd31764836818ebd65b5.tar.bz2 | |
Prevent showing immersive confirmation unexpectedly
By design, if the user presses the power key twice within 5 seconds
(panic), it will show immersive confirmation again at the next time
entering immersive mode.
But there is a bug on calculating the time between pressing the power
key. The time get from event.getDownTime() will stop when the device
is sleeping without being charged.
So here uses SystemClock.elapsedRealtime() instead.
https://code.google.com/p/android/issues/detail?id=80772
Change-Id: I4dca9dc260904f1c5b60464834781e2a82a9bcf4
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 2 |
1 files changed, 1 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 2699d13..ccc700d 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -4389,7 +4389,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { result &= ~ACTION_PASS_TO_USER; if (down) { boolean panic = mImmersiveModeConfirmation.onPowerKeyDown(interactive, - event.getDownTime(), isImmersiveMode(mLastSystemUiFlags)); + SystemClock.elapsedRealtime(), isImmersiveMode(mLastSystemUiFlags)); if (panic) { mHandler.post(mRequestTransientNav); } |
