Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfa7a755 authored by Eugene Susla's avatar Eugene Susla Committed by Sterling Huber
Browse files

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
parent 025633bd
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,8 @@


package com.android.settings.notification;
package com.android.settings.notification;


import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_COMPONENT_NAME;
import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_COMPONENT_NAME;
import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_PACKAGE_TITLE;
import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_PACKAGE_TITLE;
import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_USER_ID;
import static com.android.internal.notification.NotificationAccessConfirmationActivityContract.EXTRA_USER_ID;
@@ -55,6 +57,8 @@ public class NotificationAccessConfirmationActivity extends Activity
    protected void onCreate(@Nullable Bundle savedInstanceState) {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);


        getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
        mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);


        mComponentName = getIntent().getParcelableExtra(EXTRA_COMPONENT_NAME);
        mComponentName = getIntent().getParcelableExtra(EXTRA_COMPONENT_NAME);