Loading services/core/java/com/android/server/fingerprint/AuthenticationClient.java +14 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,17 @@ public abstract class AuthenticationClient extends ClientMonitor { } }; /** * This method is called when authentication starts. */ public abstract void onStart(); /** * This method is called when a fingerprint is authenticated or authentication is stopped * (cancelled by the user, or an error such as lockout has occurred). */ public abstract void onStop(); public AuthenticationClient(Context context, long halDeviceId, IBinder token, IFingerprintServiceReceiver receiver, int targetUserId, int groupId, long opId, boolean restricted, String owner, Bundle bundle, Loading Loading @@ -220,6 +231,7 @@ public abstract class AuthenticationClient extends ClientMonitor { } result |= true; // we have a valid fingerprint, done resetFailedAttempts(); onStop(); } return result; } Loading @@ -234,6 +246,7 @@ public abstract class AuthenticationClient extends ClientMonitor { Slog.w(TAG, "start authentication: no fingerprint HAL!"); return ERROR_ESRCH; } onStart(); try { final int result = daemon.authenticate(mOpId, getGroupId()); if (result != 0) { Loading Loading @@ -266,6 +279,7 @@ public abstract class AuthenticationClient extends ClientMonitor { return 0; } onStop(); IBiometricsFingerprint daemon = getFingerprintDaemon(); if (daemon == null) { Slog.w(TAG, "stopAuthentication: no fingerprint HAL!"); Loading services/core/java/com/android/server/fingerprint/FingerprintService.java +18 −5 Original line number Diff line number Diff line Loading @@ -259,11 +259,6 @@ public class FingerprintService extends SystemService implements IHwBinder.Death ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mActivityManager = ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)) .getService(); try { mActivityManager.registerTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not register task stack listener", e); } } @Override Loading Loading @@ -858,6 +853,24 @@ public class FingerprintService extends SystemService implements IHwBinder.Death AuthenticationClient client = new AuthenticationClient(getContext(), mHalDeviceId, token, receiver, mCurrentUserId, groupId, opId, restricted, opPackageName, bundle, dialogReceiver, mStatusBarService) { @Override public void onStart() { try { mActivityManager.registerTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not register task stack listener", e); } } @Override public void onStop() { try { mActivityManager.unregisterTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not unregister task stack listener", e); } } @Override public int handleFailedAttempt() { final int currentUser = ActivityManager.getCurrentUser(); Loading Loading
services/core/java/com/android/server/fingerprint/AuthenticationClient.java +14 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,17 @@ public abstract class AuthenticationClient extends ClientMonitor { } }; /** * This method is called when authentication starts. */ public abstract void onStart(); /** * This method is called when a fingerprint is authenticated or authentication is stopped * (cancelled by the user, or an error such as lockout has occurred). */ public abstract void onStop(); public AuthenticationClient(Context context, long halDeviceId, IBinder token, IFingerprintServiceReceiver receiver, int targetUserId, int groupId, long opId, boolean restricted, String owner, Bundle bundle, Loading Loading @@ -220,6 +231,7 @@ public abstract class AuthenticationClient extends ClientMonitor { } result |= true; // we have a valid fingerprint, done resetFailedAttempts(); onStop(); } return result; } Loading @@ -234,6 +246,7 @@ public abstract class AuthenticationClient extends ClientMonitor { Slog.w(TAG, "start authentication: no fingerprint HAL!"); return ERROR_ESRCH; } onStart(); try { final int result = daemon.authenticate(mOpId, getGroupId()); if (result != 0) { Loading Loading @@ -266,6 +279,7 @@ public abstract class AuthenticationClient extends ClientMonitor { return 0; } onStop(); IBiometricsFingerprint daemon = getFingerprintDaemon(); if (daemon == null) { Slog.w(TAG, "stopAuthentication: no fingerprint HAL!"); Loading
services/core/java/com/android/server/fingerprint/FingerprintService.java +18 −5 Original line number Diff line number Diff line Loading @@ -259,11 +259,6 @@ public class FingerprintService extends SystemService implements IHwBinder.Death ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mActivityManager = ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)) .getService(); try { mActivityManager.registerTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not register task stack listener", e); } } @Override Loading Loading @@ -858,6 +853,24 @@ public class FingerprintService extends SystemService implements IHwBinder.Death AuthenticationClient client = new AuthenticationClient(getContext(), mHalDeviceId, token, receiver, mCurrentUserId, groupId, opId, restricted, opPackageName, bundle, dialogReceiver, mStatusBarService) { @Override public void onStart() { try { mActivityManager.registerTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not register task stack listener", e); } } @Override public void onStop() { try { mActivityManager.unregisterTaskStackListener(mTaskStackListener); } catch (RemoteException e) { Slog.e(TAG, "Could not unregister task stack listener", e); } } @Override public int handleFailedAttempt() { final int currentUser = ActivityManager.getCurrentUser(); Loading