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

Commit c3c2ff70 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Add support for USB notification when connected as a MIDI peripheral

Change-Id: Ib3efcda6af976c878e63b0d35a8e47a3ea9435a3
parent e55524ef
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3909,6 +3909,8 @@
    <string name="usb_mtp_notification_title">Connected as a media device</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in PTP mode.  This is the title -->
    <string name="usb_ptp_notification_title">Connected as a camera</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in MIDI mode.  This is the title -->
    <string name="usb_midi_notification_title">Connected as a MIDI device</string>
    <!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in mass storage mode (for installer CD image).  This is the title -->
    <string name="usb_cd_installer_notification_title">Connected as an installer</string>
    <!-- USB_PREFERENCES: Notification for when a USB accessory is attached.  This is the title -->
+1 −0
Original line number Diff line number Diff line
@@ -1750,6 +1750,7 @@
  <java-symbol type="string" name="usb_notification_message" />
  <java-symbol type="string" name="use_physical_keyboard" />
  <java-symbol type="string" name="usb_ptp_notification_title" />
  <java-symbol type="string" name="usb_midi_notification_title" />
  <java-symbol type="string" name="vpn_text" />
  <java-symbol type="string" name="vpn_text_long" />
  <java-symbol type="string" name="vpn_title" />
+2 −0
Original line number Diff line number Diff line
@@ -732,6 +732,8 @@ public class UsbDeviceManager {
                    id = com.android.internal.R.string.usb_mtp_notification_title;
                } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_PTP)) {
                    id = com.android.internal.R.string.usb_ptp_notification_title;
                } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_MIDI)) {
                    id = com.android.internal.R.string.usb_midi_notification_title;
                } else if (containsFunction(mCurrentFunctions,
                        UsbManager.USB_FUNCTION_MASS_STORAGE)) {
                    id = com.android.internal.R.string.usb_cd_installer_notification_title;