@Override public void callActivityOnResume(Activity activity) { base.callActivityOnResume(activity); }
@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 callActivityOnResume(Activity activity) { PluginInjector.injectInstrumetionFor360Safe(activity, this); real.callActivityOnResume(activity); monitor.onActivityResume(activity); }
@Override public void callActivityOnResume(Activity activity) { base.callActivityOnResume(activity); }
@Override public void callActivityOnResume(Activity activity) { base.callActivityOnResume(activity); }
@Override public void callActivityOnResume(Activity activity) { super.callActivityOnResume(activity); }
@Override @CallSuper public void callActivityOnResume(Activity activity) { if (DEBUG) { Logger.d(TAG,"callActivityOnResume"); } mInstrumentation.callActivityOnResume(activity); }
@Override public void callActivityOnResume(Activity activity) { AnalysisManager.analysisProcess(activity, LoonConstant.Number.ACTIVITY_RESUME); super.callActivityOnResume(activity); }
ins.callActivityOnPause(launchActivity); assertEquals(true, true); ins.callActivityOnResume(launchActivity);
@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().callActivityOnResume(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnResume(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnResume(solo.getCurrentActivity()); } });
public void run() { getInstrumentation().callActivityOnResume(solo.getCurrentActivity()); } });
/** * Launches the activity under test using the given extras. This method will call all life-cycle * methods involved in an activity launch. * * @param extras * any custom extras to add to the intent used to start the activity * @return the intent used to start the activity */ public Intent launchActivity(Bundle extras) { Intent intent = prepareIntent(extras); startActivity(extras); // this calls onCreate getInstrumentation().callActivityOnStart(getActivity()); getInstrumentation().callActivityOnResume(getActivity()); getInstrumentation().waitForIdleSync(); return intent; }
/** * 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(). }