summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/system-current.txt3
-rw-r--r--api/test-current.txt2
-rw-r--r--config/hiddenapi-greylist.txt2
-rw-r--r--core/java/android/os/UserHandle.java5
4 files changed, 10 insertions, 2 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 7cade61d9ad5..40070b51068e 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -4137,6 +4137,9 @@ package android.os {
method public boolean isSystem();
method public static int myUserId();
method public static android.os.UserHandle of(int);
+ field public static final android.os.UserHandle ALL;
+ field public static final android.os.UserHandle CURRENT;
+ field public static final android.os.UserHandle SYSTEM;
}
public class UserManager {
diff --git a/api/test-current.txt b/api/test-current.txt
index 1c00cc4ae70c..ad78c53e580a 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1053,6 +1053,8 @@ package android.os {
public final class UserHandle implements android.os.Parcelable {
method public static int getAppId(int);
method public int getIdentifier();
+ field public static final android.os.UserHandle ALL;
+ field public static final android.os.UserHandle CURRENT;
field public static final android.os.UserHandle SYSTEM;
}
diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt
index cfcb58d396cf..a140db0fd9f6 100644
--- a/config/hiddenapi-greylist.txt
+++ b/config/hiddenapi-greylist.txt
@@ -1120,8 +1120,6 @@ Landroid/os/UserHandle;->AID_APP_START:I
Landroid/os/UserHandle;->AID_CACHE_GID_START:I
Landroid/os/UserHandle;->AID_ROOT:I
Landroid/os/UserHandle;->AID_SHARED_GID_START:I
-Landroid/os/UserHandle;->ALL:Landroid/os/UserHandle;
-Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
Landroid/os/UserHandle;->CURRENT_OR_SELF:Landroid/os/UserHandle;
Landroid/os/UserHandle;->ERR_GID:I
Landroid/os/UserHandle;->getAppIdFromSharedAppGid(I)I
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index 4d4f31de0077..648c022d8673 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -38,12 +38,16 @@ public final class UserHandle implements Parcelable {
public static final @UserIdInt int USER_ALL = -1;
/** @hide A user handle to indicate all users on the device */
+ @SystemApi
+ @TestApi
public static final UserHandle ALL = new UserHandle(USER_ALL);
/** @hide A user id to indicate the currently active user */
public static final @UserIdInt int USER_CURRENT = -2;
/** @hide A user handle to indicate the current user of the device */
+ @SystemApi
+ @TestApi
public static final UserHandle CURRENT = new UserHandle(USER_CURRENT);
/** @hide A user id to indicate that we would like to send to the current
@@ -82,6 +86,7 @@ public final class UserHandle implements Parcelable {
public static final int USER_SERIAL_SYSTEM = 0;
/** @hide A user handle to indicate the "system" user of the device */
+ @SystemApi
@TestApi
public static final UserHandle SYSTEM = new UserHandle(USER_SYSTEM);