[Security Report] Fix Settings WifiScanModeActivity Overlaid issue

- Disallowed non system overlay windows

- Screenshot
  https://screenshot.googleplex.com/77fJ9QN6pV4zFYc

Bug: 174047492
Test: manual test

Merged-In: Ia7acad6d456ce5ebea2d982d4cb063d4f28cbfff
Change-Id: Ia7acad6d456ce5ebea2d982d4cb063d4f28cbfff
(cherry picked from commit d47d8e4fc5)
This commit is contained in:
Weng Su
2021-01-29 17:24:51 +08:00
parent 12033fe425
commit faa5f6b5f6

View File

@@ -26,6 +26,7 @@ import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.WindowManager;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
@@ -44,6 +45,8 @@ public class WifiScanModeActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addSystemFlags(
WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
Intent intent = getIntent();
if (savedInstanceState == null) {
if (intent != null && intent.getAction()