Merge change I46ea3489 into eclair

* changes:
  Make sure we wake up the screen if the keyguard is not visible when we think it should be.
This commit is contained in:
Android (Google) Code Review
2009-10-02 14:03:43 -04:00
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