Commits

Anonymous committed 0cbb836 Draft

fix more dialogs that get shown in the handler

  • Participants
  • Parent commits 15db258

Comments (0)

Files changed (2)

src/com/jrummy/busybox/installer/BusyboxActivity.java

 		public void handleMessage(Message msg) {
 			switch (msg.what) {
 			case MSG_SHOW_ROOT_ERROR_DIALOG:
-				showDialog(DIALOG_ROOT_ACCESS_FAILED);
+				if (!isFinishing())
+					showDialog(DIALOG_ROOT_ACCESS_FAILED);
 				break;
 			case MSG_SHOW_SCRIPT_DETAILS:
 				Bundle data = msg.getData();
 				mPbarDialog.dismiss();
 				mScriptDetailsDialog = scriptDetails(scripter.mScript.getName(), 
 						success, stdout, stderr);
-				showDialog(DIALOG_SCRIPT_DETAILS);
+				if (!isFinishing())
+					showDialog(DIALOG_SCRIPT_DETAILS);
 				break;
 			case MSG_SHOW_WELCOME_MSG:
-				showDialog(DIALOG_WELCOME);
+				if (!isFinishing())
+					showDialog(DIALOG_WELCOME);
 				break;
 			}
 		}

src/com/jrummy/busybox/installer/BusyboxInstaller.java

 				}
 				int id = success ? BusyboxActivity.DIALOG_INSTALL_SUCCESS : 
 					BusyboxActivity.DIALOG_INSTALL_FAILED;
-				act.showDialog(id);
 				act.mTitleBar.showProgressSpinner(false);
 				mInstallButton.setEnabled(true);
 				setSystemInfo();
+				if (!act.isFinishing()) {
+					act.showDialog(id);
+				}
 				break;
 			case Downloader.STATUS_UPDATE:
 				BusyboxActivity activity = BusyboxActivity.getActivity();