Exemplo n.º 1
0
 public void onClick(DialogInterface paramDialogInterface, int paramInt) {
   paramDialogInterface = a.c();
   if (paramDialogInterface.equals(w.d(a))) {
     w.e(a);
   }
   while ((!paramDialogInterface.equals(w.f(a))) || (!w.g(a))) {
     return;
   }
   w.e(a);
 }
 @Override
 public void onClick(DialogInterface dialog, int which) {
   if (dialog != null && dialog.equals(confirmDlg)) {
     if (which == Dialog.BUTTON_POSITIVE && selectedPath != null) {
       ConfigurationManager.instance().setStoragePath(selectedPath);
       COConfigurationManager.setParameter(
           "General_sDefaultTorrent_Directory",
           com.frostwire.android.gui.util.SystemUtils.getTorrentsDirectory().getAbsolutePath());
       dismissPreferenceDialog();
       uxLogSelection();
     }
   } else {
     super.onClick(dialog, which);
   }
 }
Exemplo n.º 3
0
 @Override
 public void onClick(DialogInterface dialog, int which) {
   if (dialog.equals(mClearSearchHistoryDialog)) {
     if (which == DialogInterface.BUTTON_POSITIVE) {
       final Context context = getActivity();
       // Clear the history in the background, as it causes a disk
       // write.
       new AsyncTask<Void, Void, Void>() {
         @Override
         protected Void doInBackground(Void... params) {
           final String authority =
               context.getString(com.android.mail.R.string.suggestions_authority);
           final SearchRecentSuggestions suggestions =
               new SearchRecentSuggestions(context, authority, SuggestionsProvider.MODE);
           suggestions.clearHistory();
           return null;
         }
       }.execute();
       Toast.makeText(getActivity(), R.string.search_history_cleared, Toast.LENGTH_SHORT).show();
     }
   }
 }