Loading services/core/java/com/android/server/am/ActivityManagerShellCommand.java +6 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.os.StrictMode; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.text.TextUtils; import android.util.ArrayMap; import android.util.DebugUtils; Loading Loading @@ -1638,6 +1639,11 @@ final class ActivityManagerShellCommand extends ShellCommand { } int runSwitchUser(PrintWriter pw) throws RemoteException { UserManager userManager = mInternal.mContext.getSystemService(UserManager.class); if (!userManager.canSwitchUsers()) { getErrPrintWriter().println("Error: disallowed switching user"); return -1; } String user = getNextArgRequired(); mInterface.switchUser(Integer.parseInt(user)); return 0; Loading Loading
services/core/java/com/android/server/am/ActivityManagerShellCommand.java +6 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.os.StrictMode; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.text.TextUtils; import android.util.ArrayMap; import android.util.DebugUtils; Loading Loading @@ -1638,6 +1639,11 @@ final class ActivityManagerShellCommand extends ShellCommand { } int runSwitchUser(PrintWriter pw) throws RemoteException { UserManager userManager = mInternal.mContext.getSystemService(UserManager.class); if (!userManager.canSwitchUsers()) { getErrPrintWriter().println("Error: disallowed switching user"); return -1; } String user = getNextArgRequired(); mInterface.switchUser(Integer.parseInt(user)); return 0; Loading