From f3afef8419de2910b03c3670ca25e63ac3c08407 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Thu, 14 May 2020 02:03:14 +0200 Subject: [PATCH] Prevent overlay drawing on top of Bluetooth pairing dialog Bug: 155648639 Change-Id: I99643ee9084f3a9bc1ad9a459ac27c587d832c91 Merged-In: I99643ee9084f3a9bc1ad9a459ac27c587d832c91 --- .../android/settings/bluetooth/BluetoothPairingDialog.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java index 22cb3a683ec..316f541f13f 100644 --- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java @@ -26,6 +26,8 @@ import android.content.IntentFilter; import android.os.Bundle; import android.support.annotation.VisibleForTesting; +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. @@ -63,6 +65,8 @@ public class BluetoothPairingDialog extends Activity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); Intent intent = getIntent(); mBluetoothPairingController = new BluetoothPairingController(intent, this); // build the dialog fragment