Merge ""Charging this device via USB" notification isn't relevant for automotive." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-16 18:07:55 +00:00
committed by Android (Google) Code Review

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;