mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 01:16:40 +00:00
synchronizing the dismissal of the progress dialog to avoid exceptions in concurrent / asynchronous situations
Change-Id: I208c2d4cb4ce932b470d34c7de65b5320d391ef5
This commit is contained in:
+5
-1
@@ -38,10 +38,14 @@ public abstract class AbstractBaseActivity extends SendingServiceAwareActivity {
|
||||
}
|
||||
|
||||
public void dismissProgressDialog() {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
if (progressDialog != null) {
|
||||
synchronized (progressDialog) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void showErrorPopup(String title, String message) {
|
||||
AlertDialog dialog = new AlertDialog.Builder(this).setTitle(title).setMessage(message)
|
||||
|
||||
Reference in New Issue
Block a user