Handle the uncommon case that a name is null

Bug: 29037588
Change-Id: I697184bd1ae4d519f8f29bf612ba13843e6662cb
This commit is contained in:
Philip P. Moltmann
2016-05-31 10:16:30 -07:00
parent ce289e937e
commit 236b9e8eb4

View File

@@ -139,7 +139,7 @@ class MtpNotificationManager {
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;
}
}