diff options
| author | 2017-08-01 19:03:55 +0000 | |
|---|---|---|
| committer | 2017-08-01 19:03:55 +0000 | |
| commit | fb80072f9926ea74f2e957fc86eb935ac753e01d (patch) | |
| tree | 7b67f7af115d8dc30d28fff32abac5ca5a5fbb33 | |
| parent | c199e3fdf18e23774dd0d9f6837dca8c0dc579c9 (diff) | |
| parent | 69840ca338347a1c2607d0f40d061c7be0e0c584 (diff) | |
Merge "Reword analog audio not supported notification" into oc-dr1-dev
am: 69840ca338
Change-Id: I6a9a611c13de7a63e6d5bdbf4718827f2295a28b
| -rw-r--r-- | core/res/res/values/strings.xml | 4 | ||||
| -rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 074c0327d992..a8aa35f1d40c 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3131,9 +3131,9 @@ <!-- See USB_PREFERENCES. This is the message. --> <string name="usb_notification_message">Tap for more options.</string> <!-- USB_PREFERENCES: Notification for when a type-c USB audio accessory is attached but not supported. This is the title --> - <string name="usb_unsupported_audio_accessory_title">Audio accessory not supported</string> + <string name="usb_unsupported_audio_accessory_title">Analog audio accessory detected</string> <!-- Message of notification shown when a type-c USB audio accessory is attached but not supported. --> - <string name="usb_unsupported_audio_accessory_message">Tap for more info</string> + <string name="usb_unsupported_audio_accessory_message">The attached device is not compatible with this phone. Tap to learn more.</string> <!-- Title of notification shown when ADB is actively connected to the phone. --> diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 184dd73381ec..774bf438995c 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); |