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