@Implements(value=android.os.Binder.class) public class ShadowBinder extends Object
Constructor and Description |
---|
ShadowBinder() |
Modifier and Type | Method and Description |
---|---|
protected static int |
getCallingPid() |
protected static int |
getCallingUid() |
protected static UserHandle |
getCallingUserHandle() |
static void |
reset() |
static void |
setCallingPid(int pid) |
static void |
setCallingUid(int uid) |
static void |
setCallingUserHandle(UserHandle userHandle)
Configures
Binder.getCallingUserHandle() to return the specified UserHandle to subsequent callers on any thread, for testing purposes. |
protected boolean |
transact(int code,
Parcel data,
Parcel reply,
int flags) |
@Implementation protected boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException
RemoteException
@Implementation protected static final int getCallingPid()
@Implementation protected static final int getCallingUid()
@Implementation(minSdk=17) protected static final UserHandle getCallingUserHandle()
public static void setCallingPid(int pid)
public static void setCallingUid(int uid)
public static void setCallingUserHandle(UserHandle userHandle)
Configures Binder.getCallingUserHandle()
to return the specified UserHandle
to subsequent callers on any thread, for testing purposes.
@Resetter public static void reset()