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

Commit e030a090 authored by Wang Han's avatar Wang Han
Browse files

UsbDeviceManager: Check PTP FileDescriptor properly

 * A typo causes MTP one to be checked twice

Change-Id: If16bf5df43b6d51f6717aa7994b2f428fb3f1a69
parent b825510b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -279,8 +279,8 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver
        }
        mControlFds.put(UsbManager.FUNCTION_MTP, mtpFd);
        FileDescriptor ptpFd = nativeOpenControl(UsbManager.USB_FUNCTION_PTP);
        if (mtpFd == null) {
            Slog.e(TAG, "Failed to open control for mtp");
        if (ptpFd == null) {
            Slog.e(TAG, "Failed to open control for ptp");
        }
        mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd);