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

Commit c253fbc1 authored by Eugene Susla's avatar Eugene Susla Committed by Anis Assi
Browse files

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: I4daaee7d8b710a72f6166cbb2252ef8af84c2c60
(cherry picked from commit 9cbc2c3d)
parent 9b277661
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.companiondevicemanager;

import static android.companion.BluetoothDeviceFilterUtils.getDeviceMacAddress;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

import android.app.Activity;
import android.companion.CompanionDeviceManager;
@@ -55,6 +56,8 @@ public class DeviceChooserActivity extends Activity {
            Log.e(LOG_TAG, "About to show UI, but no devices to show");
        }

        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        if (getService().mRequest.isSingleDevice()) {
            setContentView(R.layout.device_confirmation);
            final DeviceFilterPair selectedDevice = getService().mDevicesFound.get(0);