Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 299c18fe authored by Kevin Chyn's avatar Kevin Chyn Committed by android-build-merger
Browse files

Merge "Log before stopping/removing the current client" into pi-dev

am: 7b3e6823

Change-Id: I8f669a41d60d18af911ff88380bd254521c99b47
parents 5c6e6b45 7b3e6823
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -225,16 +225,17 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
                if (!(mCurrentClient instanceof AuthenticationClient)) {
                    return;
                }
                if (isKeyguard(mCurrentClient.getOwnerString())) {
                final String currentClient = mCurrentClient.getOwnerString();
                if (isKeyguard(currentClient)) {
                    return; // Keyguard is always allowed
                }
                List<ActivityManager.RunningTaskInfo> runningTasks = mActivityManager.getTasks(1);
                if (!runningTasks.isEmpty()) {
                    final String topPackage = runningTasks.get(0).topActivity.getPackageName();
                    if (!topPackage.contentEquals(mCurrentClient.getOwnerString())) {
                        mCurrentClient.stop(false /* initiatedByClient */);
                    if (!topPackage.contentEquals(currentClient)) {
                        Slog.e(TAG, "Stopping background authentication, top: " + topPackage
                                + " currentClient: " + mCurrentClient.getOwnerString());
                                + " currentClient: " + currentClient);
                        mCurrentClient.stop(false /* initiatedByClient */);
                    }
                }
            } catch (RemoteException e) {