Loading services/core/java/com/android/server/security/authenticationpolicy/SecureLockDeviceService.java +36 −32 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { @Nullable private final FaceManager mFaceManager; @Nullable private final FingerprintManager mFingerprintManager; private final PowerManager mPowerManager; @NonNull private final Object mSecureLockDeviceStatusListenerLock = new Object(); @NonNull private final SecureLockDeviceStore mStore; private final RemoteCallbackList<ISecureLockDeviceStatusListener> mSecureLockDeviceStatusListeners = new RemoteCallbackList<>(); Loading Loading @@ -553,6 +554,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { * update. Only listeners registered to this userId will be notified.s */ private void notifySecureLockDeviceAvailabilityForUser(int userId) { synchronized (mSecureLockDeviceStatusListenerLock) { final int count = mSecureLockDeviceStatusListeners.beginBroadcast(); try { for (int i = 0; i < count; i++) { Loading @@ -577,13 +579,14 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { + secureLockDeviceAvailability); } try { listener.onSecureLockDeviceAvailableStatusChanged(secureLockDeviceAvailability); listener.onSecureLockDeviceAvailableStatusChanged( secureLockDeviceAvailability); } catch (RemoteException e) { Slog.e(TAG, "Failed to notify listener " + listener.asBinder() + " for " + "user " + userId + ", RemoteException thrown: ", e); Slog.e(TAG, "Failed to notify listener " + listener.asBinder() + " for user " + userId + ", RemoteException thrown: ", e); } catch (Exception e) { Slog.e(TAG, "Exception thrown by listener " + listener.asBinder() + " for " + "user " + userId + " during callback: ", e); Slog.e(TAG, "Exception thrown by listener " + listener.asBinder() + " for user " + userId + " during callback: ", e); mSecureLockDeviceStatusListeners.unregister(listener); } } Loading @@ -591,6 +594,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { mSecureLockDeviceStatusListeners.finishBroadcast(); } } } /** * @see AuthenticationPolicyManager#setSecureLockDeviceTestStatus(boolean) Loading Loading
services/core/java/com/android/server/security/authenticationpolicy/SecureLockDeviceService.java +36 −32 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { @Nullable private final FaceManager mFaceManager; @Nullable private final FingerprintManager mFingerprintManager; private final PowerManager mPowerManager; @NonNull private final Object mSecureLockDeviceStatusListenerLock = new Object(); @NonNull private final SecureLockDeviceStore mStore; private final RemoteCallbackList<ISecureLockDeviceStatusListener> mSecureLockDeviceStatusListeners = new RemoteCallbackList<>(); Loading Loading @@ -553,6 +554,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { * update. Only listeners registered to this userId will be notified.s */ private void notifySecureLockDeviceAvailabilityForUser(int userId) { synchronized (mSecureLockDeviceStatusListenerLock) { final int count = mSecureLockDeviceStatusListeners.beginBroadcast(); try { for (int i = 0; i < count; i++) { Loading @@ -577,13 +579,14 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { + secureLockDeviceAvailability); } try { listener.onSecureLockDeviceAvailableStatusChanged(secureLockDeviceAvailability); listener.onSecureLockDeviceAvailableStatusChanged( secureLockDeviceAvailability); } catch (RemoteException e) { Slog.e(TAG, "Failed to notify listener " + listener.asBinder() + " for " + "user " + userId + ", RemoteException thrown: ", e); Slog.e(TAG, "Failed to notify listener " + listener.asBinder() + " for user " + userId + ", RemoteException thrown: ", e); } catch (Exception e) { Slog.e(TAG, "Exception thrown by listener " + listener.asBinder() + " for " + "user " + userId + " during callback: ", e); Slog.e(TAG, "Exception thrown by listener " + listener.asBinder() + " for user " + userId + " during callback: ", e); mSecureLockDeviceStatusListeners.unregister(listener); } } Loading @@ -591,6 +594,7 @@ public class SecureLockDeviceService extends SecureLockDeviceServiceInternal { mSecureLockDeviceStatusListeners.finishBroadcast(); } } } /** * @see AuthenticationPolicyManager#setSecureLockDeviceTestStatus(boolean) Loading