• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revisão8a9fafb37d089789b2017676942da2da001ac47d (tree)
Hora2021-04-06 20:02:10
AutorArc Wang <arcwang@goog...>
CommiterArc Wang

Mensagem de Log

Hide non-system overlay window on ActivityPicker

To improve security.

Bug: 181962311
Test: manual

Show an AlertDialog and observe if it will hide after below command.
adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker

Change-Id: I6e2845cc19dc012cba2933318a067bbb8db90a23
Merged-In: I6e2845cc19dc012cba2933318a067bbb8db90a23
(cherry picked from commit 3b4853e109a5d95656f73d31dace4099d5dfbca7)

Mudança Sumário

Diff

--- a/src/com/android/settings/ActivityPicker.java
+++ b/src/com/android/settings/ActivityPicker.java
@@ -16,6 +16,8 @@
1616
1717 package com.android.settings;
1818
19+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
20+
1921 import android.app.Activity;
2022 import android.content.Context;
2123 import android.content.DialogInterface;
@@ -71,6 +73,8 @@ public class ActivityPicker extends AlertActivity implements
7173 @Override
7274 protected void onCreate(Bundle savedInstanceState) {
7375 super.onCreate(savedInstanceState);
76+
77+ getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
7478
7579 final Intent intent = getIntent();
7680