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

Commit 008dfadb authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Remove obsolete AudioManager audio dock plugged Intents

We have no code that listens for AudioManager.ACTION_ANALOG_AUDIO_DOCK_PLUG
and AudioManager.ACTION_DIGITAL_AUDIO_DOCK_PLUG

Change-Id: I96a746c84e5a4b17df1b9fbdbb5de77e6bc39714
parent 683f37db
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -182,8 +182,6 @@
    <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />

    <protected-broadcast android:name="android.intent.action.HEADSET_PLUG" />
    <protected-broadcast android:name="android.media.action.ANALOG_AUDIO_DOCK_PLUG" />
    <protected-broadcast android:name="android.media.action.DIGITAL_AUDIO_DOCK_PLUG" />
    <protected-broadcast android:name="android.media.action.HDMI_AUDIO_PLUG" />
    <protected-broadcast android:name="android.media.action.USB_AUDIO_ACCESSORY_PLUG" />
    <protected-broadcast android:name="android.media.action.USB_AUDIO_DEVICE_PLUG" />
+0 −30
Original line number Diff line number Diff line
@@ -266,36 +266,6 @@ public class AudioManager {
     */
    public static final String EXTRA_ENCODINGS = "android.media.extra.ENCODINGS";

    /**
     * Broadcast Action: An analog audio speaker/headset plugged in or unplugged.
     *
     * <p>The intent will have the following extra values:
     * <ul>
     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
     *   <li><em>name</em> - Headset type, human readable string </li>
     * </ul>
     * </ul>
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_ANALOG_AUDIO_DOCK_PLUG =
            "android.media.action.ANALOG_AUDIO_DOCK_PLUG";

    /**
     * Broadcast Action: A digital audio speaker/headset plugged in or unplugged.
     *
     * <p>The intent will have the following extra values:
     * <ul>
     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
     *   <li><em>name</em> - Headset type, human readable string </li>
     * </ul>
     * </ul>
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_DIGITAL_AUDIO_DOCK_PLUG =
            "android.media.action.DIGITAL_AUDIO_DOCK_PLUG";

    /**
     * Broadcast Action: A USB audio accessory was plugged in or unplugged.
     *
+0 −6
Original line number Diff line number Diff line
@@ -4673,12 +4673,6 @@ public class AudioService extends IAudioService.Stub {
            connType = AudioRoutesInfo.MAIN_HEADPHONES;
            intent.setAction(Intent.ACTION_HEADSET_PLUG);
            intent.putExtra("microphone", 0);
        } else if (device == AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET) {
            connType = AudioRoutesInfo.MAIN_DOCK_SPEAKERS;
            intent.setAction(AudioManager.ACTION_ANALOG_AUDIO_DOCK_PLUG);
        } else if (device == AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET) {
            connType = AudioRoutesInfo.MAIN_DOCK_SPEAKERS;
            intent.setAction(AudioManager.ACTION_DIGITAL_AUDIO_DOCK_PLUG);
        } else if (device == AudioSystem.DEVICE_OUT_HDMI) {
            connType = AudioRoutesInfo.MAIN_HDMI;
            configureHdmiPlugIntent(intent, state);