Start private space setup when there is no private space set
This change handles as below based on if private space already exists on device: 1. If PS doesn't exist then start the setup flow which shows a PS education screen. On setup button creates the private space. 2. If PS already exists on device then display PS settings page. Bug: 299069146 Test: atest PrivateSpaceSettingsAuthenticatorTest Change-Id: I46bdbaeb0210fd5b41a426f852e3f455b62c1c29
This commit is contained in:
@@ -92,20 +92,24 @@ public class PrivateSpaceAuthenticationActivity extends FragmentActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/** Show private space settings page on device lock authentications */
|
||||
/** Starts private space setup flow or the PS settings page on device lock authentication */
|
||||
@VisibleForTesting
|
||||
public void onLockAuthentication(Context context) {
|
||||
new SubSettingLauncher(context)
|
||||
.setDestination(PrivateSpaceDashboardFragment.class.getName())
|
||||
.setTransitionType(
|
||||
SettingsTransitionHelper.TransitionType.TRANSITION_SLIDE)
|
||||
.setSourceMetricsCategory(SettingsEnums.PRIVATE_SPACE_SETTINGS)
|
||||
.launch();
|
||||
if (mPrivateSpaceMaintainer.doesPrivateSpaceExist()) {
|
||||
new SubSettingLauncher(context)
|
||||
.setDestination(PrivateSpaceDashboardFragment.class.getName())
|
||||
.setTransitionType(
|
||||
SettingsTransitionHelper.TransitionType.TRANSITION_SLIDE)
|
||||
.setSourceMetricsCategory(SettingsEnums.PRIVATE_SPACE_SETTINGS)
|
||||
.launch();
|
||||
} else {
|
||||
startActivity(new Intent(context, PrivateSpaceSetupActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setPrivateSpaceMaintainer(Injector injector) {
|
||||
mPrivateSpaceMaintainer = injector.injectPrivateSpaceMaintainer(getApplicationContext());
|
||||
mPrivateSpaceMaintainer = injector.injectPrivateSpaceMaintainer(this);
|
||||
}
|
||||
|
||||
private void promptToSetDeviceLock() {
|
||||
|
Reference in New Issue
Block a user