@Implements(value=android.app.Instrumentation.class, looseSignatures=true) public class ShadowInstrumentation extends Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
ShadowInstrumentation._Instrumentation_ |
Accessor interface for
Instrumentation 's internals. |
Constructor | Description |
---|---|
ShadowInstrumentation() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
bindService(Intent intent,
ServiceConnection serviceConnection,
int i) |
|
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,
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 Instrumentation.ActivityResult |
execStartActivityAsCaller(Context who,
IBinder contextThread,
IBinder token,
Activity target,
Intent intent,
int requestCode,
Bundle options,
boolean ignoreTargetSecurity,
int userId) |
|
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 |
setUnbindServiceCallsOnServiceDisconnected(boolean flag) |
|
protected Activity |
startActivitySync(Intent intent,
Bundle options) |
|
protected ComponentName |
startService(Intent intent) |
|
protected void |
unbindService(ServiceConnection serviceConnection) |
@Implementation(minSdk=28) protected Activity startActivitySync(Intent intent, Bundle options)
@Implementation protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options)
@Implementation(maxSdk=22) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Fragment target, Intent intent, int requestCode, Bundle options)
@Implementation protected void execStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)
@Implementation(minSdk=21) protected void execStartActivityFromAppTask(Context who, IBinder contextThread, Object appTask, Intent intent, Bundle options)
@Implementation(minSdk=23) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options)
@Implementation(minSdk=17) protected Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String resultWho, Intent intent, int requestCode, Bundle options, UserHandle user)
Currently ignores the user.
@Implementation(minSdk=23, maxSdk=28) protected Instrumentation.ActivityResult execStartActivityAsCaller(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options, boolean ignoreTargetSecurity, int userId)
protected ComponentName startService(Intent intent)
protected boolean bindService(Intent intent, ServiceConnection serviceConnection, int i)
protected void setUnbindServiceCallsOnServiceDisconnected(boolean flag)
protected void unbindService(ServiceConnection serviceConnection)
protected List<ServiceConnection> getBoundServiceConnections()
protected List<ServiceConnection> getUnboundServiceConnections()
public static Instrumentation getInstrumentation()