Esempio n. 1
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putString(SAVED_ACCOUNT, (String) accountView.getSelectedItem());
   outState.putString(SAVED_USER, userView.getText().toString());
   outState.putString(SAVED_NAME, nameView.getText().toString());
 }
Esempio n. 2
0
 @Override
 public void onCancel(DialogBuilder dialogBuilder) {
   super.onCancel(dialogBuilder);
   switch (dialogBuilder.getDialogId()) {
     case DIALOG_SUBSCRIPTION_REQUEST_ID:
       finish();
       break;
   }
 }
Esempio n. 3
0
 @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;
   }
 }
Esempio n. 4
0
 @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;
   }
 }
Esempio n. 5
0
 @Override
 protected void onResume() {
   super.onResume();
   if (subscriptionRequest != null) showDialog(DIALOG_SUBSCRIPTION_REQUEST_ID);
 }