Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745ec38b authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am 9c38d6e5: Merge "UserHandle to UserSerialNo mapping" into jb-mr1-dev

* commit '9c38d6e5':
  UserHandle to UserSerialNo mapping
parents ae37cd4a 9c38d6e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ package android {
    field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
    field public static final java.lang.String MANAGE_ACCOUNTS = "android.permission.MANAGE_ACCOUNTS";
    field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS";
    field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS";
    field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
    field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
    field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
+1 −1
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ public class AccountManagerService
    }

    private void onUserRemoved(Intent intent) {
        int userId = intent.getIntExtra(Intent.EXTRA_USERID, -1);
        int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
        if (userId < 1) return;

        UserAccounts accounts;
+9 −9
Original line number Diff line number Diff line
@@ -2279,24 +2279,24 @@ public class Intent implements Parcelable, Cloneable {
            "android.intent.action.PRE_BOOT_COMPLETED";

    /**
     * Broadcast sent to the system when a user is added. Carries an extra EXTRA_USERID that has the
     * userid of the new user.
     * Broadcast sent to the system when a user is added. Carries an extra EXTRA_USER_HANDLE that has the
     * userHandle of the new user.
     * @hide
     */
    public static final String ACTION_USER_ADDED =
            "android.intent.action.USER_ADDED";

    /**
     * Broadcast sent to the system when a user is removed. Carries an extra EXTRA_USERID that has
     * the userid of the user.
     * Broadcast sent to the system when a user is removed. Carries an extra EXTRA_USER_HANDLE that has
     * the userHandle of the user.
     * @hide
     */
    public static final String ACTION_USER_REMOVED =
            "android.intent.action.USER_REMOVED";

    /**
     * Broadcast sent to the system when the user switches. Carries an extra EXTRA_USERID that has
     * the userid of the user to become the current one.
     * Broadcast sent to the system when the user switches. Carries an extra EXTRA_USER_HANDLE that has
     * the userHandle of the user to become the current one.
     * @hide
     */
    public static final String ACTION_USER_SWITCHED =
@@ -2852,12 +2852,12 @@ public class Intent implements Parcelable, Cloneable {
        "android.intent.extra.LOCAL_ONLY";

    /**
     * The userid carried with broadcast intents related to addition, removal and switching of users
     * The userHandle carried with broadcast intents related to addition, removal and switching of users
     * - {@link #ACTION_USER_ADDED}, {@link #ACTION_USER_REMOVED} and {@link #ACTION_USER_SWITCHED}.
     * @hide
     */
    public static final String EXTRA_USERID =
            "android.intent.extra.user_id";
    public static final String EXTRA_USER_HANDLE =
            "android.intent.extra.user_handle";

    // ---------------------------------------------------------------------
    // ---------------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -895,7 +895,7 @@ public class SyncManager implements OnAccountsUpdateListener {
    }

    private void onUserRemoved(Intent intent) {
        int userId = intent.getIntExtra(Intent.EXTRA_USERID, -1);
        int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
        if (userId == -1) return;

        // Clean up the storage engine database
+4 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ public class UserInfo implements Parcelable {
    public static final int FLAG_RESTRICTED = 0x00000008;

    public int id;
    public int serialNumber;
    public String name;
    public String iconPath;
    public int flags;
@@ -88,6 +89,7 @@ public class UserInfo implements Parcelable {
        iconPath = orig.iconPath;
        id = orig.id;
        flags = orig.flags;
        serialNumber = orig.serialNumber;
    }

    @Override
@@ -104,6 +106,7 @@ public class UserInfo implements Parcelable {
        dest.writeString(name);
        dest.writeString(iconPath);
        dest.writeInt(flags);
        dest.writeInt(serialNumber);
    }

    public static final Parcelable.Creator<UserInfo> CREATOR
@@ -121,5 +124,6 @@ public class UserInfo implements Parcelable {
        name = source.readString();
        iconPath = source.readString();
        flags = source.readInt();
        serialNumber = source.readInt();
    }
}
Loading