diff options
author | Steven Ross <stross@google.com> | 2011-12-09 09:28:29 -0500 |
---|---|---|
committer | Steven Ross <stross@google.com> | 2011-12-09 09:28:29 -0500 |
commit | ebc6fb46c28c972d745c3d34b9fdfaf46fb20c1d (patch) | |
tree | d91c1b1577c420e8884449673994a388fcbba8d3 /policy | |
parent | d3209c1bb21ce026d4e41464740e3d8f57cdd56f (diff) | |
download | frameworks_base-ebc6fb46c28c972d745c3d34b9fdfaf46fb20c1d.zip frameworks_base-ebc6fb46c28c972d745c3d34b9fdfaf46fb20c1d.tar.gz frameworks_base-ebc6fb46c28c972d745c3d34b9fdfaf46fb20c1d.tar.bz2 |
Checking whether screen is on in constructor fixes 5658742
Change-Id: Ic96c8dd9ee9e86000b0cbe22a7d068a8ee424448
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 67a6855..088146b 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -52,6 +52,7 @@ import android.os.Handler; import android.os.Message; import android.os.IBinder; import android.os.Parcelable; +import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; @@ -101,8 +102,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler private View mLockScreen; private View mUnlockScreen; - private volatile boolean mScreenOn = false; - private volatile boolean mWindowFocused = false; + private boolean mScreenOn; + private boolean mWindowFocused = false; private boolean mEnableFallback = false; // assume no fallback UI until we know better private boolean mShowLockBeforeUnlock = false; @@ -311,6 +312,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler mWindowController = controller; mHasOverlay = false; mPluggedIn = mUpdateMonitor.isDevicePluggedIn(); + mScreenOn = ((PowerManager)context.getSystemService(Context.POWER_SERVICE)).isScreenOn(); mUpdateMonitor.registerInfoCallback(this); |