(1/2) Fix No clear steps for "re-enroll face unlock

When the user has face id registered but failed enrolling in
device lock state, lead users directly to the confirm deletion
dialog in Face Unlock settings.
- To define face id re-enroll extra intent data for passing to the
Settings app.

Bug: 233069240

Test: manually force enrolling face id fail, then doing test steps:
1. Receive notification that face unlock needs to be re-enrolled
2. Tap it then entering device
3. Check if showing the confirm deletion dialog in Face Unlock
settings.

Change-Id: Ic8587985f24782c06e9ca9e4998bf1566c17e5ec
This commit is contained in:
Jason Chang
2023-02-25 14:09:37 +00:00
parent 470999f6f1
commit b639a79336

View File

@@ -37,6 +37,7 @@ public class BiometricNotificationUtils {
private static final String TAG = "BiometricNotificationUtils";
private static final String RE_ENROLL_NOTIFICATION_TAG = "FaceService";
private static final String BAD_CALIBRATION_NOTIFICATION_TAG = "FingerprintService";
private static final String KEY_RE_ENROLL_FACE = "re_enroll_face_unlock";
private static final int NOTIFICATION_ID = 1;
private static final long NOTIFICATION_INTERVAL_MS = 24 * 60 * 60 * 1000;
private static long sLastAlertTime = 0;
@@ -57,6 +58,7 @@ public class BiometricNotificationUtils {
final Intent intent = new Intent("android.settings.FACE_SETTINGS");
intent.setPackage("com.android.settings");
intent.putExtra(KEY_RE_ENROLL_FACE, true);
final PendingIntent pendingIntent = PendingIntent.getActivityAsUser(context,
0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE /* flags */,