"Charging this device via USB" notification isn't relevant for automotive.

Bug: 124302589
Test: Manual
Change-Id: Icaa56c5f9ead79ce0306a95229f915073d1b6a1f
This commit is contained in:
Priyank Singh
2019-04-15 08:39:36 -07:00
parent 6e77293d29
commit 41efb403c8

View File

@@ -1095,6 +1095,14 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
Slog.d(TAG, "Clear notification");
mUsbNotificationId = 0;
}
// Not relevant for automotive.
if (mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_AUTOMOTIVE)
&& id == SystemMessage.NOTE_USB_CHARGING) {
mUsbNotificationId = 0;
return;
}
if (id != 0) {
CharSequence title = r.getText(titleRes);
PendingIntent pi;