@Override
  public void onDismiss(DialogInterface dialog) {
    android.util.Log.e(TAG, "dismiss: sending back data to Activity");
    // Depending on the value of caPurpose, assign the certs in currentConnection.
    if (caPurpose == ManageCustomCaFragment.TYPE_OVIRT) {
      android.util.Log.e(TAG, "Setting custom oVirt CA");
      currentConnection.setOvirtCaData(caCert.getText().toString());
    }

    dismissalListener.onFragmentDismissed(currentConnection);
  }