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

Skip to content
Snippets Groups Projects
Commit 7b3e6823 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

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

parents da80202b a792fa64
Branches
No related tags found
No related merge requests found
...@@ -225,16 +225,17 @@ public class FingerprintService extends SystemService implements IHwBinder.Death ...@@ -225,16 +225,17 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
if (!(mCurrentClient instanceof AuthenticationClient)) { if (!(mCurrentClient instanceof AuthenticationClient)) {
return; return;
} }
if (isKeyguard(mCurrentClient.getOwnerString())) { final String currentClient = mCurrentClient.getOwnerString();
if (isKeyguard(currentClient)) {
return; // Keyguard is always allowed return; // Keyguard is always allowed
} }
List<ActivityManager.RunningTaskInfo> runningTasks = mActivityManager.getTasks(1); List<ActivityManager.RunningTaskInfo> runningTasks = mActivityManager.getTasks(1);
if (!runningTasks.isEmpty()) { if (!runningTasks.isEmpty()) {
final String topPackage = runningTasks.get(0).topActivity.getPackageName(); final String topPackage = runningTasks.get(0).topActivity.getPackageName();
if (!topPackage.contentEquals(mCurrentClient.getOwnerString())) { if (!topPackage.contentEquals(currentClient)) {
mCurrentClient.stop(false /* initiatedByClient */);
Slog.e(TAG, "Stopping background authentication, top: " + topPackage Slog.e(TAG, "Stopping background authentication, top: " + topPackage
+ " currentClient: " + mCurrentClient.getOwnerString()); + " currentClient: " + currentClient);
mCurrentClient.stop(false /* initiatedByClient */);
} }
} }
} catch (RemoteException e) { } catch (RemoteException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment