Avoiding overlay activities when usb device is attached.
Adding property android.app.PROPERTY_RESTRICT_USB_OVERLAY_ACTIVITIES in manifest. This property will be honored only for applications which have MANAGE_USB permission(i.e only priviledged applications). If this property is set on application which is in foreground when usb device is attached then, usb flow would not resolveActivity. If there is no application in foreground with this field set, then usb attachment will start overlay activities. Bug: 307231174 Test: Manually tested the flow. Test: atest UsbManagerTests Change-Id: Ica4f557ec5eeb0887373f5bd1a44f05f1bdfeecd
Loading
Please register or sign in to comment