Merge "Use UserManager.removeUserOrSetEphemeral() to remove current user."
This commit is contained in:
committed by
Android (Google) Code Review
commit
564eaec283
@@ -747,8 +747,9 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
return;
|
||||
}
|
||||
try {
|
||||
getContext().getSystemService(UserManager.class)
|
||||
.removeUserOrSetEphemeral(UserHandle.myUserId());
|
||||
ActivityManager.getService().switchUser(UserHandle.USER_SYSTEM);
|
||||
getContext().getSystemService(UserManager.class).removeUser(UserHandle.myUserId());
|
||||
} catch (RemoteException re) {
|
||||
Log.e(TAG, "Unable to remove self user");
|
||||
}
|
||||
|
Reference in New Issue
Block a user