Merge "Just broadcast intent to bring up MTP/PTP as soon as switching function"
This commit is contained in:
@@ -570,8 +570,11 @@ public class UsbDeviceManager {
|
|||||||
// Set the new USB configuration.
|
// Set the new USB configuration.
|
||||||
setUsbConfig(functions);
|
setUsbConfig(functions);
|
||||||
|
|
||||||
|
if (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
|
||||||
|
|| UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP)) {
|
||||||
// Start up dependent services.
|
// Start up dependent services.
|
||||||
updateUsbStateBroadcastIfNeeded(true);
|
updateUsbStateBroadcastIfNeeded(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (!waitForState(functions)) {
|
if (!waitForState(functions)) {
|
||||||
Slog.e(TAG, "Failed to switch USB config to " + functions);
|
Slog.e(TAG, "Failed to switch USB config to " + functions);
|
||||||
|
|||||||
Reference in New Issue
Block a user