From 236b9e8eb4ad14068ef42ee2f4f89460f36ed37d Mon Sep 17 00:00:00 2001 From: "Philip P. Moltmann" Date: Tue, 31 May 2016 10:16:30 -0700 Subject: [PATCH] Handle the uncommon case that a name is null Bug: 29037588 Change-Id: I697184bd1ae4d519f8f29bf612ba13843e6662cb --- .../usb/java/com/android/server/usb/MtpNotificationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/usb/java/com/android/server/usb/MtpNotificationManager.java b/services/usb/java/com/android/server/usb/MtpNotificationManager.java index 101e2008d3e9f..5c46222b2feb6 100644 --- a/services/usb/java/com/android/server/usb/MtpNotificationManager.java +++ b/services/usb/java/com/android/server/usb/MtpNotificationManager.java @@ -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; } }