Package org.robolectric.shadows
Class ShadowInstrumentation
java.lang.Object
org.robolectric.shadows.ShadowInstrumentation
@Implements(value=android.app.Instrumentation.class, looseSignatures=true) public class ShadowInstrumentation extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceShadowInstrumentation._Instrumentation_Accessor interface forInstrumentation's internals. -
Constructor Summary
Constructors Constructor Description ShadowInstrumentation() -
Method Summary
Modifier and Type Method Description protected booleanbindService(Intent intent, ServiceConnection serviceConnection, int i)protected voidexecStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)protected Instrumentation.ActivityResultexecStartActivity(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options)protected Instrumentation.ActivityResultexecStartActivity(Context who, IBinder contextThread, IBinder token, Activity resultWho, Intent intent, int requestCode, Bundle options, UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, Activity, Intent, int, Bundle).protected Instrumentation.ActivityResultexecStartActivity(Context who, IBinder contextThread, IBinder token, Fragment target, Intent intent, int requestCode, Bundle options)protected Instrumentation.ActivityResultexecStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options)protected Instrumentation.ActivityResultexecStartActivity(Context who, IBinder contextThread, IBinder token, String resultWho, Intent intent, int requestCode, Bundle options, UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, String, Intent, int, Bundle).protected voidexecStartActivityFromAppTask(Context who, IBinder contextThread, Object appTask, Intent intent, Bundle options)protected List<ServiceConnection>getBoundServiceConnections()static InstrumentationgetInstrumentation()List<String>getUnbindableActions()protected List<ServiceConnection>getUnboundServiceConnections()protected voidsetUnbindServiceCallsOnServiceDisconnected(boolean flag)protected ActivitystartActivitySync(Intent intent, Bundle options)protected ComponentNamestartService(Intent intent)protected voidunbindService(ServiceConnection serviceConnection)
-
Constructor Details
-
ShadowInstrumentation
public ShadowInstrumentation()
-
-
Method Details
-
startActivitySync
-
execStartActivities
-
execStartActivityFromAppTask
-
execStartActivity
@Implementation protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options) -
execStartActivity
@Implementation(maxSdk=22) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Fragment target, Intent intent, int requestCode, Bundle options) -
execStartActivity
@Implementation(minSdk=23) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options) -
execStartActivity
@Implementation(minSdk=17, maxSdk=25) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Activity resultWho, Intent intent, int requestCode, Bundle options, UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, Activity, Intent, int, Bundle).Currently ignores the user.
-
execStartActivity
@Implementation(minSdk=26) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String resultWho, Intent intent, int requestCode, Bundle options, UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, String, Intent, int, Bundle).Currently ignores the user.
-
startService
-
bindService
-
setUnbindServiceCallsOnServiceDisconnected
protected void setUnbindServiceCallsOnServiceDisconnected(boolean flag) -
unbindService
-
getBoundServiceConnections
-
getUnboundServiceConnections
-
getUnbindableActions
-
getInstrumentation
-