Switch public APIs to use new UserHandle class for identifying users.
Gets rid of "yet another integer" confusion.
Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 0553384..3513bdc 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -655,13 +655,13 @@
public static final native int myUid();
/**
- * Returns the identifier of this process's user handle. This is the
+ * Returns this process's user handle. This is the
* user the process is running under. It is distinct from
* {@link #myUid()} in that a particular user will have multiple
* distinct apps running under it each with their own uid.
*/
- public static final int myUserHandle() {
- return UserHandle.getUserId(myUid());
+ public static final UserHandle myUserHandle() {
+ return new UserHandle(UserHandle.getUserId(myUid()));
}
/**