Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -15617,6 +15617,7 @@ package android.os { method public static final void flushPendingCommands(); method public static final int getCallingPid(); method public static final int getCallingUid(); method public static final android.os.UserHandle getCallingUserHandle(); method public java.lang.String getInterfaceDescriptor(); method public boolean isBinderAlive(); method public static final void joinThreadPool(); core/java/android/os/Binder.java +13 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class Binder implements IBinder { public static final native int getCallingPid(); /** * Return the ID of the user assigned to the process that sent you the * Return the Linux uid assigned to the process that sent you the * current transaction that is being processed. This uid can be used with * higher-level system services to determine its identity and check * permissions. If the current thread is not currently executing an Loading @@ -72,6 +72,18 @@ public class Binder implements IBinder { */ public static final native int getCallingUid(); /** * Return the UserHandle assigned to the process that sent you the * current transaction that is being processed. This is the user * of the caller. It is distinct from {@link #getCallingUid()} in that a * particular user will have multiple distinct apps running under it each * with their own uid. If the current thread is not currently executing an * incoming transaction, then its own UserHandle is returned. */ public static final UserHandle getCallingUserHandle() { return new UserHandle(UserHandle.getUserId(getCallingUid())); } /** * Reset the identity of the incoming IPC on the current thread. This can * be useful if, while handling an incoming call, you will be calling Loading services/java/com/android/server/am/ActivityManagerService.java +1 −1 File changed.Contains only whitespace changes. Show changes Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -15617,6 +15617,7 @@ package android.os { method public static final void flushPendingCommands(); method public static final int getCallingPid(); method public static final int getCallingUid(); method public static final android.os.UserHandle getCallingUserHandle(); method public java.lang.String getInterfaceDescriptor(); method public boolean isBinderAlive(); method public static final void joinThreadPool();
core/java/android/os/Binder.java +13 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class Binder implements IBinder { public static final native int getCallingPid(); /** * Return the ID of the user assigned to the process that sent you the * Return the Linux uid assigned to the process that sent you the * current transaction that is being processed. This uid can be used with * higher-level system services to determine its identity and check * permissions. If the current thread is not currently executing an Loading @@ -72,6 +72,18 @@ public class Binder implements IBinder { */ public static final native int getCallingUid(); /** * Return the UserHandle assigned to the process that sent you the * current transaction that is being processed. This is the user * of the caller. It is distinct from {@link #getCallingUid()} in that a * particular user will have multiple distinct apps running under it each * with their own uid. If the current thread is not currently executing an * incoming transaction, then its own UserHandle is returned. */ public static final UserHandle getCallingUserHandle() { return new UserHandle(UserHandle.getUserId(getCallingUid())); } /** * Reset the identity of the incoming IPC on the current thread. This can * be useful if, while handling an incoming call, you will be calling Loading
services/java/com/android/server/am/ActivityManagerService.java +1 −1 File changed.Contains only whitespace changes. Show changes