packages/apps/Settings
Révision | faa5f6b5f6b67421f1327690f358f2fc5ee12c33 (tree) |
---|---|
l'heure | 2021-02-01 12:42:15 |
Auteur | Weng Su <wengsu@goog...> |
Commiter | Weng Su |
[Security Report] Fix Settings WifiScanModeActivity Overlaid issue
- Disallowed non system overlay windows
- Screenshot
Bug: 174047492
Test: manual test
Merged-In: Ia7acad6d456ce5ebea2d982d4cb063d4f28cbfff
Change-Id: Ia7acad6d456ce5ebea2d982d4cb063d4f28cbfff
(cherry picked from commit d47d8e4fc5959ea5cc57dc074d572a81ec6ddcb0)
@@ -26,6 +26,7 @@ import android.net.wifi.WifiManager; | ||
26 | 26 | import android.os.Bundle; |
27 | 27 | import android.provider.Settings; |
28 | 28 | import android.text.TextUtils; |
29 | +import android.view.WindowManager; | |
29 | 30 | |
30 | 31 | import androidx.appcompat.app.AlertDialog; |
31 | 32 | import androidx.fragment.app.DialogFragment; |
@@ -44,6 +45,8 @@ public class WifiScanModeActivity extends FragmentActivity { | ||
44 | 45 | @Override |
45 | 46 | protected void onCreate(Bundle savedInstanceState) { |
46 | 47 | super.onCreate(savedInstanceState); |
48 | + getWindow().addSystemFlags( | |
49 | + WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); | |
47 | 50 | Intent intent = getIntent(); |
48 | 51 | if (savedInstanceState == null) { |
49 | 52 | if (intent != null && intent.getAction() |