Package org.robolectric.shadows
Class ShadowBinder
java.lang.Object
org.robolectric.shadows.ShadowBinder
@Implements(android.os.Binder.class) public class ShadowBinder extends Object
-
Constructor Summary
Constructors Constructor Description ShadowBinder()
-
Method Summary
Modifier and Type Method 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)
ConfiguresBinder.getCallingUserHandle()
to return the specifiedUserHandle
to subsequent callers on *any* thread, for testing purposes.protected boolean
transact(int code, Parcel data, Parcel reply, int flags)
-
Constructor Details
-
ShadowBinder
public ShadowBinder()
-
-
Method Details
-
transact
@Implementation protected boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException- Throws:
RemoteException
-
getCallingPid
-
getCallingUid
-
getCallingUserHandle
-
setCallingPid
public static void setCallingPid(int pid) -
setCallingUid
public static void setCallingUid(int uid) -
setCallingUserHandle
ConfiguresBinder.getCallingUserHandle()
to return the specifiedUserHandle
to subsequent callers on *any* thread, for testing purposes. -
reset
-