diff options
author | Amith Yamasani <yamasani@google.com> | 2012-04-10 15:13:39 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-04-10 15:13:39 -0700 |
commit | f882f1ad4edd790483924e7bf485fd7c7240d110 (patch) | |
tree | ccaf4e7c6197d220e3f65db7f2a8f0d8f28ae74c /policy | |
parent | d3ce6f50c114f58a3f50e44764e9b315ac41f637 (diff) | |
download | frameworks_base-f882f1ad4edd790483924e7bf485fd7c7240d110.zip frameworks_base-f882f1ad4edd790483924e7bf485fd7c7240d110.tar.gz frameworks_base-f882f1ad4edd790483924e7bf485fd7c7240d110.tar.bz2 |
Bind to the correct face lock service.
When switching users, bind to the correct instance of FaceLock.
Tried to get the facelock screen to show up when switching users, but it
doesn't. Power off/on works, but not switching between users on the
lockscreen. Maybe a timing issue? Or not calling some function to make
the overlay visible?
Change-Id: I9300971331c7f0ed93ae7da28170342629426b20
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/FaceUnlock.java | 3 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/FaceUnlock.java index 985dcd3..31fbaaf 100644 --- a/policy/src/com/android/internal/policy/impl/FaceUnlock.java +++ b/policy/src/com/android/internal/policy/impl/FaceUnlock.java @@ -213,7 +213,8 @@ public class FaceUnlock implements Handler.Callback { if (DEBUG) Log.d(TAG, "before bind to FaceLock service"); mContext.bindService(new Intent(IFaceLockInterface.class.getName()), mConnection, - Context.BIND_AUTO_CREATE); + Context.BIND_AUTO_CREATE, + mLockPatternUtils.getCurrentUser()); if (DEBUG) Log.d(TAG, "after bind to FaceLock service"); mBoundToService = true; } else { diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 596040c..d42f96a 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -703,6 +703,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { @Override public void onUserChanged(int userId) { + mFaceUnlock.stopAndUnbind(); mLockPatternUtils.setCurrentUser(userId); updateScreen(getInitialMode(), true); } @@ -817,7 +818,9 @@ public class LockPatternKeyguardView extends KeyguardViewBase { if (force || mUnlockScreen == null || unlockMode != mUnlockScreenMode) { boolean restartFaceLock = mFaceUnlock.stopIfRunning(); recreateUnlockScreen(unlockMode); - if (restartFaceLock) mFaceUnlock.activateIfAble(mHasOverlay); + if (restartFaceLock || force) { + mFaceUnlock.activateIfAble(mHasOverlay); + } } } |