Fixed WiFi dialog force closed when physical window size is changed.

When window size is changed, dialog should not be dismissed on the destroy. It will cause dialog to be shown from on create and then dismissed from on the destroy right away.

Bug: 190573335
Test: manual
Change-Id: I995c3cbf90a9ec3c5305ef57e655b0b0eb7cf5cc
This commit is contained in:
pastychang
2021-09-01 14:34:25 +08:00
committed by Pasty Chang
parent b1bd0b6d26
commit 38c857bd60

View File

@@ -197,13 +197,11 @@ public class WifiDialogActivity extends ObservableActivity implements WifiDialog
public void onDestroy() { public void onDestroy() {
if (mIsWifiTrackerLib) { if (mIsWifiTrackerLib) {
if (mDialog2 != null && mDialog2.isShowing()) { if (mDialog2 != null && mDialog2.isShowing()) {
mDialog2.dismiss();
mDialog2 = null; mDialog2 = null;
} }
mWorkerThread.quit(); mWorkerThread.quit();
} else { } else {
if (mDialog != null && mDialog.isShowing()) { if (mDialog != null && mDialog.isShowing()) {
mDialog.dismiss();
mDialog = null; mDialog = null;
} }
} }