Enable Skip fingerprint when adding corp account.

- override the internal activity for picking screen lock from setup
wizard, so that when adding corp account, it can skip fingerprint even
when device is not yet provisioned.

Change-Id: I9485c54d097c82a584297fcaeb63b3271e05c1b6
Fixes: 112706989
Test: atest com.android.settings.password.SetupChooseLockGenericTest
This commit is contained in:
Doris Ling
2018-10-16 17:11:54 -07:00
parent 6773c7efcb
commit 3e6d80c121
4 changed files with 129 additions and 1 deletions

View File

@@ -264,6 +264,10 @@ public class ChooseLockGeneric extends SettingsActivity {
return false;
}
protected Class<? extends ChooseLockGeneric.InternalActivity> getInternalActivityClass() {
return ChooseLockGeneric.InternalActivity.class;
}
protected void addHeaderView() {
if (mForFingerprint) {
setHeaderView(R.layout.choose_lock_generic_fingerprint_header);
@@ -291,7 +295,7 @@ public class ChooseLockGeneric extends SettingsActivity {
return true;
} else if (KEY_SKIP_FINGERPRINT.equals(key) || KEY_SKIP_FACE.equals(key)) {
Intent chooseLockGenericIntent = new Intent(getActivity(),
ChooseLockGeneric.InternalActivity.class);
getInternalActivityClass());
chooseLockGenericIntent.setAction(getIntent().getAction());
// Forward the target user id to ChooseLockGeneric.
chooseLockGenericIntent.putExtra(Intent.EXTRA_USER_ID, mUserId);