Package org.robolectric.android.internal
Class RoboMonitoringInstrumentation
java.lang.Object
android.app.Instrumentation
org.robolectric.android.internal.RoboMonitoringInstrumentation
public class RoboMonitoringInstrumentation extends Instrumentation
A Robolectric instrumentation that acts like a slimmed down
MonitoringInstrumentation
with only the parts needed for Robolectric.-
Nested Class Summary
Nested classes/interfaces inherited from class android.app.Instrumentation
Instrumentation.ActivityMonitor, Instrumentation.ActivityResult, Instrumentation.UiAutomationFlags
-
Field Summary
Fields inherited from class android.app.Instrumentation
REPORT_KEY_IDENTIFIER, REPORT_KEY_STREAMRESULT
-
Constructor Summary
Constructors Constructor Description RoboMonitoringInstrumentation()
-
Method Summary
Methods inherited from class android.app.Instrumentation
acquireLooperManager, addMonitor, addMonitor, addMonitor, addResults, callActivityOnCreate, callActivityOnNewIntent, callActivityOnNewIntent, callActivityOnPictureInPictureRequested, callActivityOnPostCreate, callActivityOnPostCreate, callActivityOnRestoreInstanceState, callActivityOnRestoreInstanceState, callActivityOnSaveInstanceState, callActivityOnSaveInstanceState, callActivityOnUserLeaving, checkMonitorHit, checkStartActivityResult, endPerformanceSnapshot, execStartActivitiesAsUser, execStartActivityAsCaller, execStartActivityFromAppTask, getAllocCounts, getBinderCounts, getComponentName, getProcessName, getUiAutomation, getUiAutomation, invokeContextMenuAction, invokeMenuActionSync, isInstrumenting, isProfiling, newActivity, newActivity, newApplication, newApplication, onDestroy, onEnterAnimationComplete, onStart, removeMonitor, resetInTouchMode, sendCharacterSync, sendKeyDownUpSync, sendKeySync, sendPointerSync, sendStatus, sendStringSync, sendTrackballEventSync, setAutomaticPerformanceSnapshots, setInTouchMode, start, startActivitySync, startAllocCounting, startPerformanceSnapshot, startProfiling, stopAllocCounting, stopProfiling, waitForIdle, waitForMonitor, waitForMonitorWithTimeout
-
Constructor Details
-
RoboMonitoringInstrumentation
public RoboMonitoringInstrumentation()
-
-
Method Details
-
onCreate
Sets up lifecycle monitoring, and argument registry.Subclasses must call up to onCreate(). This onCreate method does not call start() it is the subclasses responsibility to call start if it desires.
- Overrides:
onCreate
in classInstrumentation
-
waitForIdleSync
public void waitForIdleSync()- Overrides:
waitForIdleSync
in classInstrumentation
-
startActivitySync
- Overrides:
startActivitySync
in classInstrumentation
-
startActivitySyncInternal
-
startActivitySyncInternal
public ActivityController<? extends Activity> startActivitySyncInternal(Intent intent, @Nullable Bundle activityOptions) -
callApplicationOnCreate
- Overrides:
callApplicationOnCreate
in classInstrumentation
-
runOnMainSync
- Overrides:
runOnMainSync
in classInstrumentation
-
execStartActivity
public Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options)- Overrides:
execStartActivity
in classInstrumentation
-
execStartActivity
public Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options)This API was added in Android API 23 (M)- Overrides:
execStartActivity
in classInstrumentation
-
execStartActivity
public Instrumentation.ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options, UserHandle user)This API was added in Android API 17 (JELLY_BEAN_MR1)- Overrides:
execStartActivity
in classInstrumentation
-
execStartActivities
public void execStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)- Overrides:
execStartActivities
in classInstrumentation
-
onException
- Overrides:
onException
in classInstrumentation
-
getThreadState
-
callActivityOnDestroy
- Overrides:
callActivityOnDestroy
in classInstrumentation
-
callActivityOnRestart
- Overrides:
callActivityOnRestart
in classInstrumentation
-
callActivityOnCreate
- Overrides:
callActivityOnCreate
in classInstrumentation
-
callActivityOnStart
- Overrides:
callActivityOnStart
in classInstrumentation
-
callActivityOnStop
- Overrides:
callActivityOnStop
in classInstrumentation
-
callActivityOnResume
- Overrides:
callActivityOnResume
in classInstrumentation
-
callActivityOnPause
- Overrides:
callActivityOnPause
in classInstrumentation
-
finish
- Overrides:
finish
in classInstrumentation
-
getTargetContext
- Overrides:
getTargetContext
in classInstrumentation
-
getContext
- Overrides:
getContext
in classInstrumentation
-