@Override public void callActivityOnPause(Activity activity) { base.callActivityOnPause(activity); }
public ActivityController<T> pause() { shadowMainLooper.runPaused(() -> getInstrumentation().callActivityOnPause(component)); return this; }
@Override public void run() { Bundle outState = new Bundle(); test.getInstrumentation().callActivityOnSaveInstanceState(activity, outState); test.getInstrumentation().callActivityOnPause(activity); test.getInstrumentation().callActivityOnResume(activity); test.getInstrumentation().callActivityOnRestoreInstanceState(activity, outState); } });
@Override public void callActivityOnPause(Activity activity) { PluginInjector.injectInstrumetionFor360Safe(activity, this); real.callActivityOnPause(activity); monitor.onActivityPause(activity); }
@Override public void callActivityOnPause(Activity activity) { base.callActivityOnPause(activity); }
@Override public void callActivityOnPause(Activity activity) { base.callActivityOnPause(activity); }
@Override public void callActivityOnPause(Activity activity) { AnalysisManager.analysisProcess(activity, LoonConstant.Number.ACTIVITY_PAUSE); super.callActivityOnPause(activity); }
@Override @CallSuper public void callActivityOnPause(Activity activity) { if (DEBUG) { Logger.d(TAG,"callActivityOnStop"); } mInstrumentation.callActivityOnPause(activity); }
ins.callActivityOnPause(launchActivity); assertEquals(true, true); ins.callActivityOnResume(launchActivity);
public ActivityController<T> pause() { shadowMainLooper.runPaused(() -> getInstrumentation().callActivityOnPause(component)); return this; }
@UiThreadTest public void testResumeAfterStop() { Instrumentation instr = this.getInstrumentation(); // here, test or record down whatever should be tested // when the activity is in resume state the first time instr.callActivityOnPause(getActivity()); instr.callActivityOnStop(getActivity()); instr.callActivityOnRestart(getActivity()); instr.callActivityOnStart(getActivity()); instr.callActivityOnResume(getActivity()); // Now you are in the resume state again. // Test whatever you need here. }
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnPause(solo.getCurrentActivity()); } });
/** * This test demonstrates ways to exercise the Activity's life cycle. */ @MediumTest public void testLifeCycleCreate() { Forwarding activity = startActivity(mStartIntent, null, null); // At this point, onCreate() has been called, but nothing else // Complete the startup of the activity getInstrumentation().callActivityOnStart(activity); getInstrumentation().callActivityOnResume(activity); // At this point you could test for various configuration aspects, or you could // use a Mock Context to confirm that your activity has made certain calls to the system // and set itself up properly. getInstrumentation().callActivityOnPause(activity); // At this point you could confirm that the activity has paused properly, as if it is // no longer the topmost activity on screen. getInstrumentation().callActivityOnStop(activity); // At this point, you could confirm that the activity has shut itself down appropriately, // or you could use a Mock Context to confirm that your activity has released any system // resources it should no longer be holding. // ActivityUnitTestCase.tearDown(), which is always automatically called, will take care // of calling onDestroy(). }
/** * This test demonstrates ways to exercise the Activity's life cycle. */ @MediumTest public void testLifeCycleCreate() { Forwarding activity = startActivity(mStartIntent, null, null); // At this point, onCreate() has been called, but nothing else // Complete the startup of the activity getInstrumentation().callActivityOnStart(activity); getInstrumentation().callActivityOnResume(activity); // At this point you could test for various configuration aspects, or you could // use a Mock Context to confirm that your activity has made certain calls to the system // and set itself up properly. getInstrumentation().callActivityOnPause(activity); // At this point you could confirm that the activity has paused properly, as if it is // no longer the topmost activity on screen. getInstrumentation().callActivityOnStop(activity); // At this point, you could confirm that the activity has shut itself down appropriately, // or you could use a Mock Context to confirm that your activity has released any system // resources it should no longer be holding. // ActivityUnitTestCase.tearDown(), which is always automatically called, will take care // of calling onDestroy(). }