@Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
    /*
     * Use this hook instead of onBackPressed(), because onBackPressed() is
     * not available in API 4.
     */
    if (keyCode == KeyEvent.KEYCODE_BACK
        && ACTION_COMPARE_PATTERN.equals(getIntent().getAction())) {
      if (mLoadingView != null) mLoadingView.cancel(true);

      finishWithNegativeResult(RESULT_CANCELED);

      return true;
    } // if

    return super.onKeyDown(keyCode, event);
  } // onKeyDown()
  @Override
  protected void onDestroy() {
    if (mLoadingView != null) mLoadingView.cancel(true);

    super.onDestroy();
  } // onDestroy()