Prevent overlay drawing on top of Bluetooth pairing dialog am: 88815d1456
am: 103cc7cf29
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484060 Change-Id: Ifbdd0f3dabc0b487bfb5155f786cae6a9980557b
This commit is contained in:
@@ -27,6 +27,8 @@ import android.os.Bundle;
|
|||||||
import androidx.annotation.VisibleForTesting;
|
import androidx.annotation.VisibleForTesting;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
|
import static android.view.WindowManager.LayoutParams.SYSTEM_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.
|
||||||
@@ -64,6 +66,8 @@ public class BluetoothPairingDialog extends FragmentActivity {
|
|||||||
@Override
|
@Override
|
||||||
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);
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
if (intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE) == null) {
|
if (intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE) == null) {
|
||||||
// Error handler for the case that dialog is started from adb command.
|
// Error handler for the case that dialog is started from adb command.
|
||||||
|
Reference in New Issue
Block a user