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

Commit 5d75052b authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Add Binder.getCallingUserHandle()." into jb-mr1-dev

parents ddb12e84 74ee8652
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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();
+13 −1
Original line number Diff line number Diff line
@@ -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
@@ -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
+1 −1

File changed.

Contains only whitespace changes.