Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e15b5619 authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan Committed by android-build-merger
Browse files

Merge "Reword analog audio not supported notification" into oc-dr1-dev am: 69840ca3

am: 89163cf0

Change-Id: Idf481243ae12d62e2fe492d7834ef0d8e7476a04
parents 055bbecb 89163cf0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -3131,9 +3131,9 @@
    <!-- See USB_PREFERENCES. This is the message. -->
    <!-- See USB_PREFERENCES. This is the message. -->
    <string name="usb_notification_message">Tap for more options.</string>
    <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 -->
    <!-- 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. -->
    <!-- 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. -->
    <!-- Title of notification shown when ADB is actively connected to the phone. -->
+10 −4
Original line number Original line Diff line number Diff line
@@ -1153,8 +1153,7 @@ public class UsbDeviceManager {
                                        .usb_unsupported_audio_accessory_message);
                                        .usb_unsupported_audio_accessory_message);
                    }
                    }


                    Notification notification =
                    Notification.Builder builder = new Notification.Builder(mContext, channel)
                            new Notification.Builder(mContext, channel)
                                    .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
                                    .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
                                    .setWhen(0)
                                    .setWhen(0)
                                    .setOngoing(true)
                                    .setOngoing(true)
@@ -1166,8 +1165,15 @@ public class UsbDeviceManager {
                                    .setContentTitle(title)
                                    .setContentTitle(title)
                                    .setContentText(message)
                                    .setContentText(message)
                                    .setContentIntent(pi)
                                    .setContentIntent(pi)
                                    .setVisibility(Notification.VISIBILITY_PUBLIC)
                                    .setVisibility(Notification.VISIBILITY_PUBLIC);
                                    .build();

                    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,
                    mNotificationManager.notifyAsUser(null, id, notification,
                            UserHandle.ALL);
                            UserHandle.ALL);