Fix USB access control when adb is disabled.
When adb is disabled, the default usb mode would be "none", which would turn off the driver and prevent UsbDeviceManager from receiving any new USB connect / disconnect messages. This prevents the user from ever enabling MTP and sharing data when adb is turned off. As discussed in bug 21429947, we work around this problem by keeping the USB driver in MTP mode most of the time, so that we continue to receive USB connect / disconnect messages. To avoid leaking confidential user photos, we now explicitly unlock USB data after switching into MTP/PTP mode. Enabling MTP mode is now decoupled from exposing data on the USB connection. Bug: 21429947 Change-Id: Id8e9df4ac42fdcf22cc5b75b838bf46f6c225081
Loading
Please register or sign in to comment