Exemplo n.º 1
0
 @Override
 protected void onCancelPressed() {
   super.onUpdatePressed();
   if (installerThread != null) {
     installerThread.interrupt();
   }
 }
Exemplo n.º 2
0
 @Override
 public void updateIndexFilter(String[] filters, Predicate<ContributedLibrary>... additionalFilters) {
   if (additionalFilters.length == 1) {
     additionalFilters = new Predicate[] { additionalFilters[0], typeFilter };
   }
   super.updateIndexFilter(filters, additionalFilters);
 }
Exemplo n.º 3
0
 @Override
 protected void onUpdatePressed() {
   super.onUpdatePressed();
   installerThread = new Thread(new Runnable() {
     @Override
     public void run() {
       try {
         setProgressVisible(true, "");
         installer.updateIndex();
         onIndexesUpdated();
       } catch (Exception e) {
         throw new RuntimeException(e);
       } finally {
         setProgressVisible(false, "");
       }
     }
   });
   installerThread.setUncaughtExceptionHandler(new InstallerJDialogUncaughtExceptionHandler(this, noConnectionErrorMessage));
   installerThread.start();
 }