summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Colonna <bcolonna@google.com>2011-09-09 10:52:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-09 10:52:09 -0700
commitf7317477457365656193fdf7f1cd9b81fef1fe4b (patch)
tree3a7875a87f78de5a7d4af6f0fb11825a282f5d7b
parent99f6ecc2fd952a6d10b248081833705ca35f859e (diff)
parent15ea55a6f1ae44ca63da158e3539903d77433988 (diff)
downloadframeworks_base-f7317477457365656193fdf7f1cd9b81fef1fe4b.zip
frameworks_base-f7317477457365656193fdf7f1cd9b81fef1fe4b.tar.gz
frameworks_base-f7317477457365656193fdf7f1cd9b81fef1fe4b.tar.bz2
Merge "Moved FaceLock bind/unbind calls inside of null check"
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardViewManager.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
index 9588a01..337881f 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
@@ -197,10 +197,10 @@ public class KeyguardViewManager implements KeyguardWindowController {
mScreenOn = false;
if (mKeyguardView != null) {
mKeyguardView.onScreenTurnedOff();
- }
- // When screen is turned off, need to unbind from FaceLock service if we are using FaceLock
- mKeyguardView.stopAndUnbindFromFaceLock();
+ // When screen is turned off, need to unbind from FaceLock service if using FaceLock
+ mKeyguardView.stopAndUnbindFromFaceLock();
+ }
}
public synchronized void onScreenTurnedOn() {
@@ -208,10 +208,10 @@ public class KeyguardViewManager implements KeyguardWindowController {
mScreenOn = true;
if (mKeyguardView != null) {
mKeyguardView.onScreenTurnedOn();
- }
- // When screen is turned on, need to bind to FaceLock service if we are using FaceLock
- mKeyguardView.bindToFaceLock();
+ // When screen is turned on, need to bind to FaceLock service if we are using FaceLock
+ mKeyguardView.bindToFaceLock();
+ }
}
public synchronized void verifyUnlock() {
@@ -248,9 +248,11 @@ public class KeyguardViewManager implements KeyguardWindowController {
public synchronized void hide() {
if (DEBUG) Log.d(TAG, "hide()");
- // When view is hidden, need to unbind from FaceLock service if we are using FaceLock
- // e.g., when device becomes unlocked
- mKeyguardView.stopAndUnbindFromFaceLock();
+ if (mKeyguardView != null) {
+ // When view is hidden, need to unbind from FaceLock service if we are using FaceLock
+ // e.g., when device becomes unlocked
+ mKeyguardView.stopAndUnbindFromFaceLock();
+ }
if (mKeyguardHost != null) {
mKeyguardHost.setVisibility(View.GONE);