コード例 #1
0
  /** {@inheritDoc} */
  public void notifyTestingDeviceDisconnected() {
    Log.d("Test.notifyTestingDeviceDisconnected() is called");
    if (mProgressObserver != null) {
      mProgressObserver.stop();
    }

    if (mTimeOutTimer != null) {
      synchronized (mTimeOutTimer) {
        mTimeOutTimer.cancel(false);
        mTimeOutTimer.sendNotify();
      }
    }
  }
コード例 #2
0
  /**
   * Notify the result.
   *
   * @param result The result.
   */
  public void notifyResult(CtsTestResult result) {

    Log.d("Test.notifyResult() is called. (Test.getFullName()=" + getFullName());
    mResult = result;
    if (mTimeOutTimer != null) {
      synchronized (mTimeOutTimer) {
        // set result again in case timeout just happened
        mResult = result;
        Log.d("notifyUpdateResult() detects that it needs to cancel mTimeOutTimer");
        if (mTimeOutTimer != null) {
          mTimeOutTimer.sendNotify();
        }
      }
    }
  }