Revert "Remove the fallback AddSupervisedUserActivity."

This reverts commit 86f3500439.

Reason for revert: Real flow is not ready yet, so we still need the fallback activity.

Change-Id: I34dc5386ff8c18a62b4b11e25fd355a62602329f
This commit is contained in:
Yasin Kilicdere
2022-03-04 15:44:42 +00:00
parent 86f3500439
commit a30b27657b
5 changed files with 143 additions and 0 deletions

View File

@@ -514,6 +514,13 @@ public class UserSettings extends SettingsPreferenceFragment
.setPackage(mConfigSupervisedUserCreationPackage)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// TODO(b/209659998): [to-be-removed] fallback activity for supervised user creation.
if (getActivity().getPackageManager().resolveActivity(intent, 0) == null) {
intent
.setClass(getContext(), AddSupervisedUserActivity.class)
.setPackage(null);
}
startActivity(intent);
}