@UiThreadTest
  public void testStatePause() {
    Instrumentation instr = this.getInstrumentation();
    assertNotNull(instr);

    instr.callActivityOnPause(mPlaceActivity);
    instr.callActivityOnResume(mPlaceActivity);
  } // end testStatePause
コード例 #2
0
  // Testing Case #4
  public void testPauseResume() {
    enterVideoPageWaitForIdle();

    mInstrumentation.callActivityOnPause(mActivity);
    CommonTestUtil.wait(mInstrumentation, CommonTestUtil.WAIT_FOR_PAGE_SWITCH_TIME_IN_SECS);

    mInstrumentation.callActivityOnResume(mActivity);
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getVideoPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);
    assertTrue(mMedia3DView.getCurrentPage() == mActivity.getVideoPage());
  }
コード例 #3
0
 /**
  * 执行插件的onResume方法
  *
  * @see android.app.Activity#onResume()
  */
 @Override
 public void callOnResume() {
   // getPluginRef().call("onResume");
   i.callActivityOnResume(plugin);
 }
コード例 #4
0
  @Override
  public void callActivityOnResume(Activity activity) {
    super.callActivityOnResume(activity);

    activitiesReporter.wasResumed(activity);
  }