diff options
| author | 2020-10-26 09:08:49 -0700 | |
|---|---|---|
| committer | 2021-02-09 01:23:48 +0000 | |
| commit | 8e4928820e972a00342c00cf67e8795a094e6e68 (patch) | |
| tree | 9b3cc356fdc13123d63642b0bfe557494b02f7f3 | |
| parent | 70a5fd9979ee7ff2a4071db0335813c0c5a72399 (diff) | |
RESTRICT AUTOMERGE
Prevent non-system overlays from showing over CDM UI
Since CDM grants privileges, it should have the same overlay
policy as permission UI
Test: use an app wit ha visible overlay to ensure
the overlay disappears when CDM is shown
Fixes: 171221090
Change-Id: I004843edf5a156dc07fb961edf80272f5cb50163
(cherry picked from commit ea4ce4d48eb22e05f03b36e281149f1e944674fa)
(cherry picked from commit 3c2fece4a52512c7dc7a0101bc6b435c44490450)
| -rw-r--r-- | packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java index e501e1269aeb..5ac059be2010 100644 --- a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java +++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceChooserActivity.java @@ -17,6 +17,7 @@ package com.android.companiondevicemanager; import static android.companion.BluetoothDeviceFilterUtils.getDeviceMacAddress; +import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static java.util.Objects.requireNonNull; @@ -58,6 +59,8 @@ public class DeviceChooserActivity extends Activity { Log.e(LOG_TAG, "About to show UI, but no devices to show"); } + getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); + if (getService().mRequest.isSingleDevice()) { setContentView(R.layout.device_confirmation); final DeviceFilterPair selectedDevice = getService().mDevicesFound.get(0); |