Merge "Replaced removeUserOrSetEphemeral by removeUserWhenPossible"

This commit is contained in:
TreeHugger Robot
2022-01-19 02:59:45 +00:00
committed by Android (Google) Code Review

View File

@@ -814,8 +814,8 @@ public class UserSettings extends SettingsPreferenceFragment
} }
try { try {
getContext().getSystemService(UserManager.class) getContext().getSystemService(UserManager.class)
.removeUserOrSetEphemeral(UserHandle.myUserId(), .removeUserWhenPossible(UserHandle.of(UserHandle.myUserId()),
/* evenWhenDisallowed= */ false); /* overrideDevicePolicy= */ false);
ActivityManager.getService().switchUser(UserHandle.USER_SYSTEM); ActivityManager.getService().switchUser(UserHandle.USER_SYSTEM);
} catch (RemoteException re) { } catch (RemoteException re) {
Log.e(TAG, "Unable to remove self user"); Log.e(TAG, "Unable to remove self user");