From 5a1dbf815222ef0bf9d89fb124b759353238d065 Mon Sep 17 00:00:00 2001 From: Udam Saini Date: Tue, 29 Mar 2016 14:38:30 -0700 Subject: [PATCH] Wait for fingerprints to be removed (Partial fix). This is a partial fix for b/27903189. When we remove the lock screen and remove all fingerprints, wait for them to all be removed before finishing the activity. This will let the security screen accurately show how many fingerprints are available. bug:27903189 Change-Id: I30908dbefb7a858f6d99e532841ed4ff894bfe62 --- src/com/android/settings/ChooseLockGeneric.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java index abbb4c6b0f8..bb597a6a2b9 100644 --- a/src/com/android/settings/ChooseLockGeneric.java +++ b/src/com/android/settings/ChooseLockGeneric.java @@ -648,8 +648,13 @@ public class ChooseLockGeneric extends SettingsActivity { mFingerprintManager.setActiveUser(UserHandle.myUserId()); } }); + } else { + // The removal callback will call finish, once all fingerprints are removed. + // We need to wait for that to occur, otherwise, the UI will still show that + // fingerprints exist even though they are (about to) be removed depending on + // the race condition. + finish(); } - finish(); } @Override