Merge "Show user running state in dumpsys user." into oc-dev

This commit is contained in:
Makoto Onuki
2017-03-30 15:18:25 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ public final class UserState {
state = newState;
}
static String stateToString(int state) {
public static String stateToString(int state) {
switch (state) {
case STATE_BOOTING: return "BOOTING";
case STATE_RUNNING_LOCKED: return "RUNNING_LOCKED";

View File

@@ -3389,6 +3389,12 @@ public class UserManagerService extends IUserManager.Stub {
pw.print(" <partial>");
}
pw.println();
pw.print(" State: ");
final int state;
synchronized (mUserStates) {
state = mUserStates.get(userId, -1);
}
pw.println(UserState.stateToString(state));
pw.print(" Created: ");
if (userInfo.creationTime == 0) {
pw.println("<unknown>");