Prevent overlay drawing on top of Bluetooth pairing dialog am: f3afef8419

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

Change-Id: I41bd60685dc58028a328c041ca4532b42881cec7
This commit is contained in:
Jakub Pawlowski
2020-06-22 19:03:01 +00:00
committed by Automerger Merge Worker

View File

@@ -26,6 +26,8 @@ import android.content.IntentFilter;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.VisibleForTesting; 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 * 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. * 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 @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
Intent intent = getIntent(); Intent intent = getIntent();
mBluetoothPairingController = new BluetoothPairingController(intent, this); mBluetoothPairingController = new BluetoothPairingController(intent, this);
// build the dialog fragment // build the dialog fragment