summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-10-07 18:01:32 -0700
committerJim Miller <jaggies@google.com>2010-10-07 18:04:33 -0700
commit4139b5505c1e07c56900aa72dd91a01e6b740f5f (patch)
tree71b399aaa10c6e638d245dd1829386e4c542c81b /policy/src
parent5ada6cb0591c1106e3591a3b7adcdc77a1322209 (diff)
downloadframeworks_base-4139b5505c1e07c56900aa72dd91a01e6b740f5f.zip
frameworks_base-4139b5505c1e07c56900aa72dd91a01e6b740f5f.tar.gz
frameworks_base-4139b5505c1e07c56900aa72dd91a01e6b740f5f.tar.bz2
Fix 3061025: Extend wave lockscreen timeout while grabbed.
This fix extends the lockscreen timeout to 30s while the handle is being held. As a precaution, it will still timeout after 30s of not completing the lock. Once the handle is released, the screen will go dark after 5s, which gives it enough time to finish pending animations. Change-Id: Ie89449b6b09de06ca8a88702cc85085b2556903c
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/LockScreen.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 3583ab9..1383354 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -214,6 +214,9 @@ class LockScreen extends LinearLayout implements KeyguardScreen,
}
class WaveViewMethods implements WaveView.OnTriggerListener {
+ private static final int WAIT_FOR_ANIMATION_TIMEOUT = 500;
+ private static final int STAY_ON_WHILE_GRABBED_TIMEOUT = 30000;
+
/** {@inheritDoc} */
public void onTrigger(View v, int whichHandle) {
if (whichHandle == WaveView.OnTriggerListener.CENTER_HANDLE) {
@@ -222,13 +225,17 @@ class LockScreen extends LinearLayout implements KeyguardScreen,
public void run() {
mCallback.goToUnlockScreen();
}
- }, 500);
+ }, WAIT_FOR_ANIMATION_TIMEOUT);
}
}
/** {@inheritDoc} */
public void onGrabbedStateChange(View v, int grabbedState) {
- mCallback.pokeWakelock();
+ if (grabbedState == WaveView.OnTriggerListener.CENTER_HANDLE) {
+ mCallback.pokeWakelock(STAY_ON_WHILE_GRABBED_TIMEOUT);
+ } else {
+ mCallback.pokeWakelock();
+ }
}
}