diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 074c0327d992e..a8aa35f1d40cf 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3131,9 +3131,9 @@ Tap for more options. - Audio accessory not supported + Analog audio accessory detected - Tap for more info + The attached device is not compatible with this phone. Tap to learn more. diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 184dd73381ec5..774bf438995ce 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -1153,8 +1153,7 @@ public class UsbDeviceManager { .usb_unsupported_audio_accessory_message); } - Notification notification = - new Notification.Builder(mContext, channel) + Notification.Builder builder = new Notification.Builder(mContext, channel) .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb) .setWhen(0) .setOngoing(true) @@ -1166,8 +1165,15 @@ public class UsbDeviceManager { .setContentTitle(title) .setContentText(message) .setContentIntent(pi) - .setVisibility(Notification.VISIBILITY_PUBLIC) - .build(); + .setVisibility(Notification.VISIBILITY_PUBLIC); + + if (titleRes + == com.android.internal.R.string + .usb_unsupported_audio_accessory_title) { + builder.setStyle(new Notification.BigTextStyle() + .bigText(message)); + } + Notification notification = builder.build(); mNotificationManager.notifyAsUser(null, id, notification, UserHandle.ALL);