Hides non-system overlays on USB debugging dialog.

This is necessary since some apps may use overlays that cannot be
seen. This prevents those overlays from preventing the USB dialog
from being accepted.

Bug: 62187985
Test: manual
Change-Id: Ic58ddd6d54e96f522445e67b90760dcfed13c27d
This commit is contained in:
Beverly
2017-08-22 15:31:04 -04:00
parent a743c01d00
commit f5bb43097a

View File

@@ -53,6 +53,7 @@ public class UsbDebuggingActivity extends AlertActivity
@Override
public void onCreate(Bundle icicle) {
Window window = getWindow();
window.addPrivateFlags(WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
super.onCreate(icicle);