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 interface
ShadowInstrumentation._Instrumentation_
Reflector interface forInstrumentation
's internals.
-
Constructor Summary
Constructors Constructor Description ShadowInstrumentation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
bindService(Intent intent, int flags, Executor executor, ServiceConnection serviceConnection)
protected boolean
bindService(Intent intent, ServiceConnection serviceConnection, int flags)
protected void
execStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)
protected Instrumentation.ActivityResult
execStartActivity(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options)
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).protected Instrumentation.ActivityResult
execStartActivity(Context who, IBinder contextThread, IBinder token, Fragment target, Intent intent, int requestCode, Bundle options)
protected Instrumentation.ActivityResult
execStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options)
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).protected void
execStartActivityFromAppTask(Context who, IBinder contextThread, Object appTask, Intent intent, Bundle options)
protected List<ServiceConnection>
getBoundServiceConnections()
static Instrumentation
getInstrumentation()
List<String>
getUnbindableActions()
protected List<ServiceConnection>
getUnboundServiceConnections()
protected void
setInTouchMode(boolean inTouchMode)
protected void
setUnbindServiceCallsOnServiceDisconnected(boolean flag)
protected Activity
startActivitySync(Intent intent, Bundle options)
protected ComponentName
startService(Intent intent)
protected void
unbindService(ServiceConnection serviceConnection)
-
-
-
Method Detail
-
startActivitySync
@Implementation(minSdk=28) protected Activity startActivitySync(Intent intent, Bundle options)
-
execStartActivities
@Implementation protected void execStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)
-
execStartActivityFromAppTask
@Implementation(minSdk=21) protected void execStartActivityFromAppTask(Context who, IBinder contextThread, Object appTask, Intent intent, Bundle options)
-
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.
-
setInTouchMode
@Implementation protected void setInTouchMode(boolean inTouchMode)
-
startService
protected ComponentName startService(Intent intent)
-
bindService
protected boolean bindService(Intent intent, int flags, Executor executor, ServiceConnection serviceConnection)
-
bindService
protected boolean bindService(Intent intent, ServiceConnection serviceConnection, int flags)
-
setUnbindServiceCallsOnServiceDisconnected
protected void setUnbindServiceCallsOnServiceDisconnected(boolean flag)
-
unbindService
protected void unbindService(ServiceConnection serviceConnection)
-
getBoundServiceConnections
protected List<ServiceConnection> getBoundServiceConnections()
-
getUnboundServiceConnections
protected List<ServiceConnection> getUnboundServiceConnections()
-
getInstrumentation
public static Instrumentation getInstrumentation()
-
-