[Security Report] Fix Settings WifiScanModeActivity Overlaid issue

- Disallowed non system overlay windows

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

Bug: 174047492
Test: manual test
Change-Id: Ia7acad6d456ce5ebea2d982d4cb063d4f28cbfff
This commit is contained in:
Weng Su
2021-01-29 17:24:51 +08:00
parent ba845f7fe4
commit d47d8e4fc5

View File

@@ -25,6 +25,7 @@ import android.content.pm.PackageManager;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.WindowManager;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
@@ -43,6 +44,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 && WifiManager.ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE