Fix null pointer exception when MTP/PTP device is detached.

FIXED=27743872

Change-Id: I9b754ba7efbc4958a47aafe332f1909bc0d50457
This commit is contained in:
Daichi Hirono
2016-03-22 11:05:22 +09:00
parent 07db6f3969
commit e80b147cf7

View File

@@ -291,7 +291,7 @@ class MtpManager {
if (usbInterface.getInterfaceClass() == UsbConstants.USB_SUBCLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == SUBCLASS_MTP &&
usbInterface.getInterfaceProtocol() == PROTOCOL_MTP &&
usbInterface.getName().equals("MTP")) {
"MTP".equals(usbInterface.getName())) {
return true;
}
}