am dafe18ee: Merge change I46ea3489 into eclair

Merge commit 'dafe18ee8c8d7923580b0d6d03d44ffdb00372e6'

* commit 'dafe18ee8c8d7923580b0d6d03d44ffdb00372e6':
  Make sure we wake up the screen if the keyguard is not visible when we think it should be.
This commit is contained in:
Mike Lockwood
2009-10-12 11:24:10 -07:00
committed by Android Git Automerger
2 changed files with 9 additions and 2 deletions

View File

@@ -197,10 +197,14 @@ public class KeyguardViewManager implements KeyguardWindowController {
*
* @param keyCode The wake key.
*/
public void wakeWhenReadyTq(int keyCode) {
public boolean wakeWhenReadyTq(int keyCode) {
if (DEBUG) Log.d(TAG, "wakeWhenReady(" + keyCode + ")");
if (mKeyguardView != null) {
mKeyguardView.wakeWhenReadyTq(keyCode);
return true;
} else {
Log.w(TAG, "mKeyguardView is null in wakeWhenReadyTq");
return false;
}
}

View File

@@ -884,7 +884,10 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
// this should result in a call to 'poke wakelock' which will set a timeout
// on releasing the wakelock
mKeyguardViewManager.wakeWhenReadyTq(keyCode);
if (!mKeyguardViewManager.wakeWhenReadyTq(keyCode)) {
// poke wakelock ourselves if keyguard is no longer active
pokeWakelock();
}
/**
* Now that the keyguard is ready and has poked the wake lock, we can