Don't set the Wi-Fi dialog to the topmost UI

- Set Wi-Fi dialog to topmost UI only when called by SysUI

Bug: 293965733
Flag: None
Test: Manual testing
atest -c WifiDialogActivityTest

Change-Id: I9215b3e7f86c0d31fa0c4c492f29032c3d14ad6d
This commit is contained in:
Weng Su
2024-05-03 21:12:54 +08:00
parent e1303ffa3a
commit a955648be4
2 changed files with 9 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.SetupWizardUtils;
import com.android.settings.Utils;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.wifi.dpp.WifiDppUtils;
import com.android.settingslib.core.lifecycle.ObservableActivity;
@@ -172,7 +173,10 @@ public class WifiDialogActivity extends ObservableActivity implements WifiDialog
} else {
if (mIsWifiTrackerLib) {
mDialog2 = new WifiDialog2(this, this,
mNetworkDetailsTracker.getWifiEntry(), WifiConfigUiBase2.MODE_CONNECT);
mNetworkDetailsTracker.getWifiEntry(), WifiConfigUiBase2.MODE_CONNECT,
0 /* style */, false /* hideSubmitButton */,
false /* hideMeteredAndPrivacy */,
Utils.SYSTEMUI_PACKAGE_NAME.equals(getLaunchedFromPackage()));
} else {
mDialog = WifiDialog.createModal(
this, this, mAccessPoint, WifiConfigUiBase.MODE_CONNECT);