frameworks/policies/base
Revisión | c9878cea4d0c109a7a6e1bac03aae09221773be0 (tree) |
---|---|
Tiempo | 2010-12-20 16:37:38 |
Autor | Yi Sun <beyounn@gmai...> |
Commiter | Chih-Wei Huang |
KeyguardViewMediator: fix a race condition
There could a race condition where the lock screen does not show up before
the machine went into sleep. Remove the screenon flag check so that machine
can go back to sleep after show the lock screen.
@@ -1019,7 +1019,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback, | ||
1019 | 1019 | if (DEBUG) Log.d(TAG, "adjustUserActivityLocked mShowing: " + mShowing + " mHidden: " + mHidden); |
1020 | 1020 | boolean enabled = !mShowing || mHidden; |
1021 | 1021 | mRealPowerManager.enableUserActivity(enabled); |
1022 | - if (!enabled && mScreenOn) { | |
1022 | + if (!enabled) { | |
1023 | 1023 | // reinstate our short screen timeout policy |
1024 | 1024 | pokeWakelock(); |
1025 | 1025 | } |