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

Commit b6abccc8 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Add new text for USB type C host.

If you use USB type C, you can charge Android from USB power or you can
supply power from Android to the other connected device.

Previously Android showed the notification saying "USB for charging".
The CL updates the text so that it shows the current power direction
explicitly.

Change-Id: Ic15ba70eaf8ade028283d8f490ac36e8d5e4db21
FIXED: 27706939
parent fe952f3a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2904,7 +2904,9 @@
    <string name="dlg_ok">OK</string>

    <!-- USB_PREFERENCES: Notification for when the user connected to the charger only.  This is the title -->
    <string name="usb_charging_notification_title">USB for charging</string>
    <string name="usb_charging_notification_title">USB charging this device</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to supply power to attached device.  This is the title -->
    <string name="usb_supplying_notification_title">USB supplying power to attached device</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in MTP mode.  This is the title -->
    <string name="usb_mtp_notification_title">USB for file transfer</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in PTP mode.  This is the title -->
+1 −0
Original line number Diff line number Diff line
@@ -1861,6 +1861,7 @@
  <java-symbol type="string" name="usb_notification_message" />
  <java-symbol type="string" name="usb_ptp_notification_title" />
  <java-symbol type="string" name="usb_midi_notification_title" />
  <java-symbol type="string" name="usb_supplying_notification_title" />
  <java-symbol type="string" name="vpn_text" />
  <java-symbol type="string" name="vpn_text_long" />
  <java-symbol type="string" name="vpn_title" />
+3 −1
Original line number Diff line number Diff line
@@ -780,7 +780,7 @@ public class UsbDeviceManager {
                    || ("0".equals(SystemProperties.get("persist.charging.notify")))) return;
            int id = 0;
            Resources r = mContext.getResources();
            if (mConnected || mHostConnected) {
            if (mConnected) {
                if (!mUsbDataUnlocked) {
                    id = com.android.internal.R.string.usb_charging_notification_title;
                } else if (UsbManager.containsFunction(mCurrentFunctions,
@@ -798,6 +798,8 @@ public class UsbDeviceManager {
                } else {
                    id = com.android.internal.R.string.usb_charging_notification_title;
                }
            } else if (mHostConnected) {
                id = com.android.internal.R.string.usb_supplying_notification_title;
            }
            if (id != mUsbNotificationId) {
                // clear notification if title needs changing