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

Commit f9003415 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Prevent overlay drawing on top of Bluetooth discovery request dialog am:...

Prevent overlay drawing on top of Bluetooth discovery request dialog am: c48d6375 am: e61467cd am: a44860c8

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484059

Change-Id: Id7e13d647b39dcaf514d15e6f8af58df8ada6c1c
parents 6325f173 a44860c8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ import androidx.appcompat.app.AlertDialog;
import com.android.settings.R;
import com.android.settingslib.bluetooth.BluetoothDiscoverableTimeoutReceiver;

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

/**
 * RequestPermissionActivity asks the user whether to enable discovery. This is
 * usually started by an application wanted to start bluetooth and or discovery
@@ -72,6 +74,8 @@ public class RequestPermissionActivity extends Activity implements
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        setResult(Activity.RESULT_CANCELED);

        // Note: initializes mBluetoothAdapter and returns true on error