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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user