@Override public void onCancel(DialogBuilder dialogBuilder) { super.onCancel(dialogBuilder); switch (dialogBuilder.getDialogId()) { case DIALOG_SUBSCRIPTION_REQUEST_ID: finish(); break; } }
@Override public void onDecline(DialogBuilder dialogBuilder) { super.onDecline(dialogBuilder); switch (dialogBuilder.getDialogId()) { case DIALOG_SUBSCRIPTION_REQUEST_ID: try { PresenceManager.getInstance() .discardSubscription(subscriptionRequest.getAccount(), subscriptionRequest.getUser()); } catch (NetworkException e) { Application.getInstance().onError(e); } finish(); break; } }
@Override public void onAccept(DialogBuilder dialogBuilder) { super.onAccept(dialogBuilder); switch (dialogBuilder.getDialogId()) { case DIALOG_SUBSCRIPTION_REQUEST_ID: try { PresenceManager.getInstance() .acceptSubscription(subscriptionRequest.getAccount(), subscriptionRequest.getUser()); } catch (NetworkException e) { Application.getInstance().onError(e); } getIntent().setAction(null); break; } }
@Override public void onAccept(DialogBuilder dialogBuilder) { switch (dialogBuilder.getDialogId()) { case R.string.zxing_install_message: Uri uri = Uri.parse("market://details?id=" + IntentIntegrator.BS_PACKAGE); Intent intent = new Intent(Intent.ACTION_VIEW, uri); try { startActivity(intent); } catch (ActivityNotFoundException anfe) { showDialog(R.string.zxing_install_fail); break; } break; default: break; } }
@Override public void onAccept(DialogBuilder dialogBuilder) { switch (dialogBuilder.getDialogId()) { case R.string.cache_clear_warning: AccountManager.getInstance().setStatus(StatusMode.unavailable, null); ((Application) getApplication()).requestToClear(); Application.getInstance().requestToClose(); showDialog(R.string.application_state_closing); break; case R.string.security_clear_certificate_warning: CertificateManager.getInstance().removeCertificates(); ConnectionManager.getInstance().updateConnections(true); break; case R.string.contacts_reset_offline_warning: GroupManager.getInstance().resetShowOfflineModes(); break; } }