OSDN Git Service

Added a makeInvisible call to Face Unlock
authorDanielle Millett <dmillett@google.com>
Tue, 30 Oct 2012 02:16:32 +0000 (22:16 -0400)
committerDanielle Millett <dmillett@google.com>
Tue, 30 Oct 2012 03:40:12 +0000 (23:40 -0400)
This makes it so that the view is hidden immediately when
a call to stop is made.  This also changes the call in onPause to
only stop and not go to the backup because we still want Face Unlock
to show as the view is being dragged down.

Change-Id: I66d8fc24e82dc3a0155f7d59d8ced932cb584660

core/java/com/android/internal/policy/IFaceLockInterface.aidl
policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java

index 017801b..a017722 100644 (file)
@@ -23,6 +23,7 @@ interface IFaceLockInterface {
     void startUi(IBinder containingWindowToken, int x, int y, int width, int height,
             boolean useLiveliness);
     void stopUi();
+    void makeInvisible();
     void registerCallback(IFaceLockCallback cb);
     void unregisterCallback(IFaceLockCallback cb);
 }
index 000acb1..cae598c 100644 (file)
@@ -151,6 +151,14 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
         }
 
         boolean mWasRunning = mIsRunning;
+        try {
+            if (mService != null) {
+                mService.makeInvisible();
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Caught exception making Face Unlock invisible: " + e.toString());
+        }
+
         stopUi();
 
         if (mBoundToService) {
index e1160e0..a884568 100644 (file)
@@ -85,7 +85,7 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
     public void onPause() {
         if (DEBUG) Log.d(TAG, "onPause()");
         if (mBiometricUnlock != null) {
-            mBiometricUnlock.stopAndShowBackup();
+            mBiometricUnlock.stop();
         }
         KeyguardUpdateMonitor.getInstance(mContext).removeCallback(mUpdateCallback);
     }