Add support for USB notification when connected as a MIDI peripheral
Change-Id: Ib3efcda6af976c878e63b0d35a8e47a3ea9435a3
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user