Merge "Dump isPrimaryUser() / isSplitSystemUser() on 'user' service." into qt-qpr1-dev

This commit is contained in:
Felipe Leme
2019-10-18 06:28:44 +00:00
committed by Android (Google) Code Review
2 changed files with 20 additions and 10 deletions

View File

@@ -985,11 +985,13 @@ class UserController implements Handler.Callback {
* <ul>
* <li>{@link Intent#ACTION_USER_STARTED} - sent to registered receivers of the new user
* <li>{@link Intent#ACTION_USER_BACKGROUND} - sent to registered receivers of the outgoing
* user and all profiles of this user. Sent only if {@code foreground} parameter is true
* user and all profiles of this user. Sent only if {@code foreground} parameter is
* {@code false}
* <li>{@link Intent#ACTION_USER_FOREGROUND} - sent to registered receivers of the new
* user and all profiles of this user. Sent only if {@code foreground} parameter is true
* user and all profiles of this user. Sent only if {@code foreground} parameter is
* {@code true}
* <li>{@link Intent#ACTION_USER_SWITCHED} - sent to registered receivers of the new user.
* Sent only if {@code foreground} parameter is true
* Sent only if {@code foreground} parameter is {@code true}
* <li>{@link Intent#ACTION_USER_STARTING} - ordered broadcast sent to registered receivers
* of the new fg user
* <li>{@link Intent#ACTION_LOCKED_BOOT_COMPLETED} - ordered broadcast sent to receivers of

View File

@@ -3683,6 +3683,11 @@ public class UserManagerService extends IUserManager.Stub {
long now = System.currentTimeMillis();
final long nowRealtime = SystemClock.elapsedRealtime();
final int currentUser = LocalServices.getService(ActivityManagerInternal.class)
.getCurrentUserId();
pw.print("Current user: "); pw.println(currentUser);
StringBuilder sb = new StringBuilder();
synchronized (mPackagesLock) {
synchronized (mUsersLock) {
@@ -3696,6 +3701,7 @@ public class UserManagerService extends IUserManager.Stub {
final int userId = userInfo.id;
pw.print(" "); pw.print(userInfo);
pw.print(" serialNo="); pw.print(userInfo.serialNumber);
pw.print(" isPrimary="); pw.print(userInfo.isPrimary());
if (mRemovingUserIds.get(userId)) {
pw.print(" <removing> ");
}
@@ -3778,13 +3784,15 @@ public class UserManagerService extends IUserManager.Stub {
synchronized (mUserStates) {
pw.println(" Started users state: " + mUserStates);
}
// Dump some capabilities
pw.println();
pw.println(" Max users: " + UserManager.getMaxSupportedUsers());
pw.println(" Supports switchable users: " + UserManager.supportsMultipleUsers());
pw.println(" All guests ephemeral: " + Resources.getSystem().getBoolean(
com.android.internal.R.bool.config_guestUserEphemeral));
}
} // synchronized (mPackagesLock)
// Dump some capabilities
pw.println();
pw.println(" Max users: " + UserManager.getMaxSupportedUsers());
pw.println(" Supports switchable users: " + UserManager.supportsMultipleUsers());
pw.println(" All guests ephemeral: " + Resources.getSystem().getBoolean(
com.android.internal.R.bool.config_guestUserEphemeral));
pw.println(" Is split-system user: " + UserManager.isSplitSystemUser());
}
private static void dumpTimeAgo(PrintWriter pw, StringBuilder sb, long nowTime, long time) {