OSDN Git Service

Properly initialize wakelock for cryptkeeper.
authorBen Komalo <benkomalo@google.com>
Wed, 21 Sep 2011 17:40:50 +0000 (10:40 -0700)
committerBen Komalo <benkomalo@google.com>
Wed, 21 Sep 2011 17:40:50 +0000 (10:40 -0700)
Bug: 3385856
Change-Id: I6dc39b02b81e290af0b47f6a6c9ba2da3e7c65c3

src/com/android/settings/CryptKeeper.java

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