Properly initialize wakelock for cryptkeeper.

Bug: 3385856
Change-Id: I6dc39b02b81e290af0b47f6a6c9ba2da3e7c65c3
This commit is contained in:
Ben Komalo
2011-09-21 10:40:50 -07:00
parent 89cd48cd8e
commit 9ee164f44e

View File

@@ -318,7 +318,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
// is encrypted. // is encrypted.
Log.d(TAG, "Encryption progress screen initializing."); Log.d(TAG, "Encryption progress screen initializing.");
if (mWakeLock != null) { if (mWakeLock == null) {
Log.d(TAG, "Acquiring wakelock."); Log.d(TAG, "Acquiring wakelock.");
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG); mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG);