diff options
| author | 2017-04-10 15:37:17 -0700 | |
|---|---|---|
| committer | 2017-04-11 08:42:57 -0700 | |
| commit | cb8936eae91714bf8390a7e605bef3d09efebe47 (patch) | |
| tree | 1ba0337f4354903f576e55cde1d5919f93a83201 | |
| parent | 4a306894145340a4fe08b70b569eaa31641b38e6 (diff) | |
Expose UserHandle.getIdentifier() to CTS.
This allows CTS to pass user IDs returned by APIs as UserHandle to various
ADB commands.
Test: Exposing as TestApi only; m -j
Change-Id: Iedba6d83b717baacf9e7cf97f1d32f93c191a5ca
| -rw-r--r-- | api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/os/UserHandle.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/api/test-current.txt b/api/test-current.txt index 570855fb0043..235b26e728ea 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -31859,6 +31859,7 @@ package android.os { ctor public UserHandle(android.os.Parcel); method public int describeContents(); method public static int getAppId(int); + method public int getIdentifier(); method public static android.os.UserHandle getUserHandleForUid(int); method public static android.os.UserHandle readFromParcel(android.os.Parcel); method public void writeToParcel(android.os.Parcel, int); diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index 4aec8aea24c5..6a4fef2b67e8 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -344,6 +344,7 @@ public final class UserHandle implements Parcelable { * @hide */ @SystemApi + @TestApi public @UserIdInt int getIdentifier() { return mHandle; } |