Make sure activity for adding a supervised user is opened full screen.

Add supervised user activity only covers the right hand side of the
screen in large screen devices. This CL makes sure it is always
started from Settings with correct flags to be shown full-screen.

Bug: 214401383
Bug: 205101183
Bug: 199868785
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: If81e0cce91a5295eb2b93b12f68b70fd1240c953
This commit is contained in:
Yasin Kilicdere
2022-01-13 18:24:18 +00:00
parent 6649b9b0eb
commit d9281c887a
2 changed files with 4 additions and 1 deletions

View File

@@ -503,7 +503,8 @@ public class UserSettings extends SettingsPreferenceFragment
private void onAddSupervisedUserClicked() {
final Intent intent = new Intent()
.setAction(UserManager.ACTION_CREATE_SUPERVISED_USER)
.setPackage(mConfigSupervisedUserCreationPackage);
.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) {