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 java.lang.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanbindService(android.content.Intent intent, android.content.ServiceConnection serviceConnection, int i)protected voidexecStartActivities(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent[] intents, android.os.Bundle options)protected android.app.Instrumentation.ActivityResultexecStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent intent, int requestCode, android.os.Bundle options)protected android.app.Instrumentation.ActivityResultexecStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Fragment target, android.content.Intent intent, int requestCode, android.os.Bundle options)protected android.app.Instrumentation.ActivityResultexecStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, java.lang.String target, android.content.Intent intent, int requestCode, android.os.Bundle options)protected android.app.Instrumentation.ActivityResultexecStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, java.lang.String resultWho, android.content.Intent intent, int requestCode, android.os.Bundle options, android.os.UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, String, Intent, int, Bundle).protected android.app.Instrumentation.ActivityResultexecStartActivityAsCaller(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent intent, int requestCode, android.os.Bundle options, boolean ignoreTargetSecurity, int userId)protected voidexecStartActivityFromAppTask(android.content.Context who, android.os.IBinder contextThread, java.lang.Object appTask, android.content.Intent intent, android.os.Bundle options)protected java.util.List<android.content.ServiceConnection>getBoundServiceConnections()static android.app.InstrumentationgetInstrumentation()java.util.List<java.lang.String>getUnbindableActions()protected java.util.List<android.content.ServiceConnection>getUnboundServiceConnections()protected voidsetUnbindServiceCallsOnServiceDisconnected(boolean flag)protected android.app.ActivitystartActivitySync(android.content.Intent intent, android.os.Bundle options)protected android.content.ComponentNamestartService(android.content.Intent intent)protected voidunbindService(android.content.ServiceConnection serviceConnection)
-
-
-
Method Detail
-
startActivitySync
@Implementation(minSdk=28) protected android.app.Activity startActivitySync(android.content.Intent intent, android.os.Bundle options)
-
execStartActivity
@Implementation protected android.app.Instrumentation.ActivityResult execStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent intent, int requestCode, android.os.Bundle options)
-
execStartActivity
@Implementation(maxSdk=22) protected android.app.Instrumentation.ActivityResult execStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Fragment target, android.content.Intent intent, int requestCode, android.os.Bundle options)
-
execStartActivities
@Implementation protected void execStartActivities(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent[] intents, android.os.Bundle options)
-
execStartActivityFromAppTask
@Implementation(minSdk=21) protected void execStartActivityFromAppTask(android.content.Context who, android.os.IBinder contextThread, java.lang.Object appTask, android.content.Intent intent, android.os.Bundle options)
-
execStartActivity
@Implementation(minSdk=23) protected android.app.Instrumentation.ActivityResult execStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, java.lang.String target, android.content.Intent intent, int requestCode, android.os.Bundle options)
-
execStartActivity
@Implementation(minSdk=17) protected android.app.Instrumentation.ActivityResult execStartActivity(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, java.lang.String resultWho, android.content.Intent intent, int requestCode, android.os.Bundle options, android.os.UserHandle user)Behaves as {@link #execStartActivity(Context, IBinder, IBinder, String, Intent, int, Bundle).Currently ignores the user.
-
execStartActivityAsCaller
@Implementation(minSdk=23, maxSdk=28) protected android.app.Instrumentation.ActivityResult execStartActivityAsCaller(android.content.Context who, android.os.IBinder contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent intent, int requestCode, android.os.Bundle options, boolean ignoreTargetSecurity, int userId)
-
startService
protected android.content.ComponentName startService(android.content.Intent intent)
-
bindService
protected boolean bindService(android.content.Intent intent, android.content.ServiceConnection serviceConnection, int i)
-
setUnbindServiceCallsOnServiceDisconnected
protected void setUnbindServiceCallsOnServiceDisconnected(boolean flag)
-
unbindService
protected void unbindService(android.content.ServiceConnection serviceConnection)
-
getBoundServiceConnections
protected java.util.List<android.content.ServiceConnection> getBoundServiceConnections()
-
getUnboundServiceConnections
protected java.util.List<android.content.ServiceConnection> getUnboundServiceConnections()
-
getUnbindableActions
public java.util.List<java.lang.String> getUnbindableActions()
-
getInstrumentation
public static android.app.Instrumentation getInstrumentation()
-
-