Merge "UsbDeviceManager: Check PTP FileDescriptor properly"

am: a0a67862aa

Change-Id: Iec90d582bd3efae558f0b6a1f6c790d56cc6ce4f
This commit is contained in:
Philip P. Moltmann
2018-08-30 12:38:20 -07:00
committed by android-build-merger

View File

@@ -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);