示例#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());
 }
示例#2
0
 @Override
 public void onCancel(DialogBuilder dialogBuilder) {
   super.onCancel(dialogBuilder);
   switch (dialogBuilder.getDialogId()) {
     case DIALOG_SUBSCRIPTION_REQUEST_ID:
       finish();
       break;
   }
 }
示例#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;
   }
 }
示例#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;
   }
 }
示例#5
0
 @Override
 protected void onResume() {
   super.onResume();
   if (subscriptionRequest != null) showDialog(DIALOG_SUBSCRIPTION_REQUEST_ID);
 }