diff options
author | Kenny Guy <kennyguy@google.com> | 2014-03-05 20:43:49 +0000 |
---|---|---|
committer | Kenny Guy <kennyguy@google.com> | 2014-03-05 22:24:01 +0000 |
commit | 6143a02f96a5c6c7a0a84f5dbe70732998256a72 (patch) | |
tree | 367738fe288412c6a2b340cee90a2198be8a93b2 /cmds | |
parent | 48d04ec3b7990f3a58d36b23f07b6cf0a0af65db (diff) | |
download | frameworks_base-6143a02f96a5c6c7a0a84f5dbe70732998256a72.zip frameworks_base-6143a02f96a5c6c7a0a84f5dbe70732998256a72.tar.gz frameworks_base-6143a02f96a5c6c7a0a84f5dbe70732998256a72.tar.bz2 |
Start related users on boot and user switch.
Collect related initialized users and start
them on boot and user switch.
Update list users command to show whether a
user is running or not.
Change-Id: Ib3d5debcb01ec55a07d93450b988b0180fc63263
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index 9ad2e76..d513a10 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -18,6 +18,7 @@ package com.android.commands.pm; import android.app.ActivityManager; import android.app.ActivityManagerNative; +import android.app.IActivityManager; import android.content.ComponentName; import android.content.pm.ApplicationInfo; import android.content.pm.ContainerEncryptionParams; @@ -1089,13 +1090,16 @@ public final class Pm { public void runListUsers() { try { + IActivityManager am = ActivityManagerNative.getDefault(); + List<UserInfo> users = mUm.getUsers(false); if (users == null) { System.err.println("Error: couldn't get users"); } else { System.out.println("Users:"); for (int i = 0; i < users.size(); i++) { - System.out.println("\t" + users.get(i).toString()); + String running = am.isUserRunning(users.get(i).id, false) ? " running" : ""; + System.out.println("\t" + users.get(i).toString() + running); } } } catch (RemoteException e) { |