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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static intgetCallingPid()protected static intgetCallingUid()protected static UserHandlegetCallingUserHandle()static voidreset()static voidsetCallingPid(int pid)static voidsetCallingUid(int uid)static voidsetCallingUserHandle(UserHandle userHandle)ConfiguresBinder.getCallingUserHandle()to return the specifiedUserHandleto subsequent callers on *any* thread, for testing purposes.protected booleantransact(int code, Parcel data, Parcel reply, int flags)
-
-
-
Method Detail
-
transact
@Implementation protected boolean transact(int code, Parcel data, Parcel reply, int flags) throws RemoteException
- Throws:
RemoteException
-
getCallingPid
@Implementation protected static final int getCallingPid()
-
getCallingUid
@Implementation protected static final int getCallingUid()
-
getCallingUserHandle
@Implementation(minSdk=17) protected static final UserHandle getCallingUserHandle()
-
setCallingPid
public static void setCallingPid(int pid)
-
setCallingUid
public static void setCallingUid(int uid)
-
setCallingUserHandle
public static void setCallingUserHandle(UserHandle userHandle)
ConfiguresBinder.getCallingUserHandle()to return the specifiedUserHandleto subsequent callers on *any* thread, for testing purposes.
-
reset
@Resetter public static void reset()
-
-