Tweaks to integrate BiometricEnrollActivity to SUW
- Default backup screen lock type to PIN when in SUW - Propagate the result codes in BiometricEnrollIntroduction, so that when the user hits back, SUW will get RESULT_CANCELED - Follow-up change that was missed in ag/6664364 to not start activity when neither fingerprint nor face is available Test: Manual Bug: 120797018 Change-Id: I6d4f662928451fb86f301ddb5c6586622c7e6cf7
This commit is contained in:
@@ -41,19 +41,19 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
final PackageManager pm = getApplicationContext().getPackageManager();
|
||||
Intent intent;
|
||||
Intent intent = null;
|
||||
|
||||
// This logic may have to be modified on devices with multiple biometrics.
|
||||
if (pm.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
|
||||
intent = getFingerprintEnrollIntent();
|
||||
} else if (pm.hasSystemFeature(PackageManager.FEATURE_FACE)) {
|
||||
intent = getFaceEnrollIntent();
|
||||
} else {
|
||||
intent = new Intent();
|
||||
}
|
||||
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
|
||||
startActivity(intent);
|
||||
if (intent != null) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
|
||||
startActivity(intent);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user