Loading core/java/com/android/internal/widget/ILockSettings.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,5 @@ interface ILockSettings { void unregisterStrongAuthTracker(in IStrongAuthTracker tracker); void requireStrongAuth(int strongAuthReason, int userId); void systemReady(); void userPresent(int userId); } core/java/com/android/internal/widget/LockPatternUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,14 @@ public class LockPatternUtils { } } public void userPresent(int userId) { try { getLockSettings().userPresent(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } public static final class RequestThrottledException extends Exception { private int mTimeoutMs; public RequestThrottledException(int timeoutMs) { Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +3 −1 Original line number Diff line number Diff line Loading @@ -1477,12 +1477,14 @@ public class KeyguardViewMediator extends SystemUI { private void sendUserPresentBroadcast() { synchronized (this) { if (mBootCompleted) { final UserHandle currentUser = new UserHandle(KeyguardUpdateMonitor.getCurrentUser()); int currentUserId = KeyguardUpdateMonitor.getCurrentUser(); final UserHandle currentUser = new UserHandle(currentUserId); final UserManager um = (UserManager) mContext.getSystemService( Context.USER_SERVICE); for (int profileId : um.getProfileIdsWithDisabled(currentUser.getIdentifier())) { mContext.sendBroadcastAsUser(USER_PRESENT_INTENT, UserHandle.of(profileId)); } getLockPatternUtils().userPresent(currentUserId); } else { mBootSendUserPresent = true; } Loading services/core/java/com/android/server/LockSettingsService.java +6 −3 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ public class LockSettingsService extends ILockSettings.Stub { filter.addAction(Intent.ACTION_USER_ADDED); filter.addAction(Intent.ACTION_USER_STARTING); filter.addAction(Intent.ACTION_USER_REMOVED); filter.addAction(Intent.ACTION_USER_PRESENT); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null); mStorage = new LockSettingsStorage(context, new LockSettingsStorage.Callback() { Loading Loading @@ -369,8 +368,6 @@ public class LockSettingsService extends ILockSettings.Stub { } else if (Intent.ACTION_USER_STARTING.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); mStorage.prefetchUser(userHandle); } else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) { mStrongAuth.reportUnlock(getSendingUserId()); } else if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); if (userHandle > 0) { Loading Loading @@ -1347,6 +1344,12 @@ public class LockSettingsService extends ILockSettings.Stub { mStrongAuth.requireStrongAuth(strongAuthReason, userId); } @Override public void userPresent(int userId) { checkWritePermission(userId); mStrongAuth.reportUnlock(userId); } private static final String[] VALID_SETTINGS = new String[] { LockPatternUtils.LOCKOUT_PERMANENT_KEY, LockPatternUtils.LOCKOUT_ATTEMPT_DEADLINE, Loading services/core/java/com/android/server/trust/TrustManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -974,7 +974,6 @@ public class TrustManagerService extends SystemService { public void register(Context context) { IntentFilter filter = new IntentFilter(); filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED); filter.addAction(Intent.ACTION_USER_PRESENT); filter.addAction(Intent.ACTION_USER_ADDED); filter.addAction(Intent.ACTION_USER_REMOVED); context.registerReceiverAsUser(this, Loading Loading
core/java/com/android/internal/widget/ILockSettings.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,5 @@ interface ILockSettings { void unregisterStrongAuthTracker(in IStrongAuthTracker tracker); void requireStrongAuth(int strongAuthReason, int userId); void systemReady(); void userPresent(int userId); }
core/java/com/android/internal/widget/LockPatternUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,14 @@ public class LockPatternUtils { } } public void userPresent(int userId) { try { getLockSettings().userPresent(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } public static final class RequestThrottledException extends Exception { private int mTimeoutMs; public RequestThrottledException(int timeoutMs) { Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +3 −1 Original line number Diff line number Diff line Loading @@ -1477,12 +1477,14 @@ public class KeyguardViewMediator extends SystemUI { private void sendUserPresentBroadcast() { synchronized (this) { if (mBootCompleted) { final UserHandle currentUser = new UserHandle(KeyguardUpdateMonitor.getCurrentUser()); int currentUserId = KeyguardUpdateMonitor.getCurrentUser(); final UserHandle currentUser = new UserHandle(currentUserId); final UserManager um = (UserManager) mContext.getSystemService( Context.USER_SERVICE); for (int profileId : um.getProfileIdsWithDisabled(currentUser.getIdentifier())) { mContext.sendBroadcastAsUser(USER_PRESENT_INTENT, UserHandle.of(profileId)); } getLockPatternUtils().userPresent(currentUserId); } else { mBootSendUserPresent = true; } Loading
services/core/java/com/android/server/LockSettingsService.java +6 −3 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ public class LockSettingsService extends ILockSettings.Stub { filter.addAction(Intent.ACTION_USER_ADDED); filter.addAction(Intent.ACTION_USER_STARTING); filter.addAction(Intent.ACTION_USER_REMOVED); filter.addAction(Intent.ACTION_USER_PRESENT); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null); mStorage = new LockSettingsStorage(context, new LockSettingsStorage.Callback() { Loading Loading @@ -369,8 +368,6 @@ public class LockSettingsService extends ILockSettings.Stub { } else if (Intent.ACTION_USER_STARTING.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); mStorage.prefetchUser(userHandle); } else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) { mStrongAuth.reportUnlock(getSendingUserId()); } else if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); if (userHandle > 0) { Loading Loading @@ -1347,6 +1344,12 @@ public class LockSettingsService extends ILockSettings.Stub { mStrongAuth.requireStrongAuth(strongAuthReason, userId); } @Override public void userPresent(int userId) { checkWritePermission(userId); mStrongAuth.reportUnlock(userId); } private static final String[] VALID_SETTINGS = new String[] { LockPatternUtils.LOCKOUT_PERMANENT_KEY, LockPatternUtils.LOCKOUT_ATTEMPT_DEADLINE, Loading
services/core/java/com/android/server/trust/TrustManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -974,7 +974,6 @@ public class TrustManagerService extends SystemService { public void register(Context context) { IntentFilter filter = new IntentFilter(); filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED); filter.addAction(Intent.ACTION_USER_PRESENT); filter.addAction(Intent.ACTION_USER_ADDED); filter.addAction(Intent.ACTION_USER_REMOVED); context.registerReceiverAsUser(this, Loading