Fixed dialog not being dismissed on asynctask cancel
This commit is contained in:
parent
7f496bc1d7
commit
f0e21c2f20
1 changed files with 4 additions and 0 deletions
|
@ -300,6 +300,10 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCancelled() {
|
protected void onCancelled() {
|
||||||
|
MapActivity activity = weakContext.get();
|
||||||
|
if (activity != null && !activity.isActivityDestroyed() && dialog != null) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
dialog = null;
|
dialog = null;
|
||||||
callback = null;
|
callback = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue