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

Commit 03a1e229 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Vasyl Gello
Browse files

Prevent overlay drawing on top of Bluetooth pairing dialog

Bug: 155648639
Change-Id: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
Merged-In: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
(cherry picked from commit 3f5bf02f)
parent 6048a5c6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@ import com.android.settingslib.bluetooth.LocalBluetoothProfile;

import java.util.Locale;

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

/**
 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
 * for pairing with a remote Bluetooth device. It is an activity that appears as a dialog.
@@ -103,6 +105,8 @@ public final class BluetoothPairingDialog extends AlertActivity implements
        super.onCreate(savedInstanceState);
        mReceiverRegistered = false;

        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        Intent intent = getIntent();
        if (!intent.getAction().equals(BluetoothDevice.ACTION_PAIRING_REQUEST)) {
            Log.e(TAG, "Error: this activity may be started only with intent " +