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

Commit 07acca0d authored by Jerry Zhang's avatar Jerry Zhang Committed by android-build-merger
Browse files

Merge "Just broadcast intent to bring up MTP/PTP as soon as switching...

Merge "Just broadcast intent to bring up MTP/PTP as soon as switching function" am: a0360e38 am: cb6beee2 am: dbaabf76
am: 72ec482b

Change-Id: Ida7772d90fe444d3c47e97044c5283933e1570c8
parents 15227805 72ec482b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -641,8 +641,11 @@ public class UsbDeviceManager {
                // Set the new USB configuration.
                setUsbConfig(oemFunctions);

                if (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
                        || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP)) {
                    // Start up dependent services.
                    updateUsbStateBroadcastIfNeeded(true);
                }

                if (!waitForState(oemFunctions)) {
                    Slog.e(TAG, "Failed to switch USB config to " + functions);