Make sure we wake up the screen if the keyguard is not visible when we think it should be.

I am hoping this will fix bug b/2155529

Change-Id: I46ea34898864d7b39391d76b802858c0f092b578
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-10-01 14:50:15 -04:00
parent db460fe7cf
commit 3754b0d563
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