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

Commit 35354363 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by android-build-merger
Browse files

Merge "UsbDeviceManager: Check PTP FileDescriptor properly"

am: a0a67862

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