packages/apps/Settings
リビジョン | 0c870fd7df49af5b4d5bca7176e26a2e187f2a1f (tree) |
---|---|
日時 | 2020-11-17 07:47:34 |
作者 | Eugene Susla <eugenesusla@goog...> |
コミッター | Sterling Huber |
RESTRICT AUTOMERGE
Prevent non-system overlays from showing over notification listener consent dialog
Bug: 170731783
Test: use a visible overlay, ensure it's gone when notification consent is open
Change-Id: I58e017982f385ffc0d0ba2174512490b1d83dd36
@@ -17,6 +17,8 @@ | ||
17 | 17 | |
18 | 18 | package com.android.settings.notification; |
19 | 19 | |
20 | +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; | |
21 | + | |
20 | 22 | import static com.android.internal.notification.NotificationAccessConfirmationActivityContract |
21 | 23 | .EXTRA_COMPONENT_NAME; |
22 | 24 | import static com.android.internal.notification.NotificationAccessConfirmationActivityContract |
@@ -58,6 +60,8 @@ public class NotificationAccessConfirmationActivity extends Activity | ||
58 | 60 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
59 | 61 | super.onCreate(savedInstanceState); |
60 | 62 | |
63 | + getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); | |
64 | + | |
61 | 65 | mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); |
62 | 66 | |
63 | 67 | mComponentName = getIntent().getParcelableExtra(EXTRA_COMPONENT_NAME); |