Loading core/java/com/android/internal/widget/LockPatternUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,14 @@ public class LockPatternUtils { } } public int getCurrentUser() { if (Process.myUid() == Process.SYSTEM_UID) { return mCurrentUserId; } else { throw new SecurityException("Only the system process can get the current user"); } } public void removeUser(int userId) { if (Process.myUid() == Process.SYSTEM_UID) { try { Loading policy/src/com/android/internal/policy/impl/FaceUnlock.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +4 −1 Original line number Diff line number Diff line Loading @@ -703,6 +703,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { @Override public void onUserChanged(int userId) { mFaceUnlock.stopAndUnbind(); mLockPatternUtils.setCurrentUser(userId); updateScreen(getInitialMode(), true); } Loading Loading @@ -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); } } } Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,14 @@ public class LockPatternUtils { } } public int getCurrentUser() { if (Process.myUid() == Process.SYSTEM_UID) { return mCurrentUserId; } else { throw new SecurityException("Only the system process can get the current user"); } } public void removeUser(int userId) { if (Process.myUid() == Process.SYSTEM_UID) { try { Loading
policy/src/com/android/internal/policy/impl/FaceUnlock.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading
policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +4 −1 Original line number Diff line number Diff line Loading @@ -703,6 +703,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { @Override public void onUserChanged(int userId) { mFaceUnlock.stopAndUnbind(); mLockPatternUtils.setCurrentUser(userId); updateScreen(getInitialMode(), true); } Loading Loading @@ -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); } } } Loading