public void detach(Presenter presenter) {
    if (presenter != mPresenter) {
      return;
    }
    switch (mState) {
      case NOT_STARTED:
      case IN_PROGRESS:
        onCancelledByUser();
        break;
      case DONE:
        break;
      default:
        throw new IllegalStateException(String.valueOf(mState));
    }
  }
Detaches the provided presentation layer from this controller. Does nothing if the presentation
layer is not the same as the layer currently attached to the controller.
java/com/google/android/apps/authenticator/timesync/SyncNowController.java