Ejemplo n.º 1
0
 @Override
 protected void onCancelPressed() {
   super.onUpdatePressed();
   if (installerThread != null) {
     installerThread.interrupt();
   }
 }
Ejemplo n.º 2
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();
 }