コード例 #1
0
  /** {@inheritDoc} */
  @Override
  protected void onResume() {
    super.onResume();

    // Update add to contacts status
    updateAddToContactsStatus(ViewUtil.isCompoundChecked(getContentView(), R.id.addToContacts));

    flagPaused = false;
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  protected void onDestroy() {
    super.onDestroy();

    if (!cancelled) {
      View content = findViewById(android.R.id.content);
      authWindow.setUsername(ViewUtil.getTextViewValue(content, R.id.username));
      authWindow.setPassword(ViewUtil.getTextViewValue(content, R.id.password));
      authWindow.setRememberPassword(ViewUtil.isCompoundChecked(content, R.id.store_password));
    }

    if (!paused) {
      authWindow.setCanceled(cancelled);

      authWindow.windowClosed();
    }
  }
コード例 #3
0
  /** {@inheritDoc} */
  @Override
  protected void onDestroy() {
    super.onDestroy();

    if (flagPaused) {
      return;
    }

    if (ViewUtil.isCompoundChecked(getContentView(), R.id.addToContacts)
        && responseCode.equals(AuthorizationResponse.ACCEPT)) {
      // Add to contacts
      Spinner groupSpinner = (Spinner) findViewById(R.id.selectGroupSpinner);

      ContactListUtils.addContact(
          request.contact.getProtocolProvider(),
          (MetaContactGroup) groupSpinner.getSelectedItem(),
          request.contact.getAddress());
    }

    request.notifyResponseReceived(responseCode);
  }