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

Commit 794da7a0 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioService: pause music when undocked

Send becomming noisy event also when disconnecting a dock
(analog, digital or USB) or HDMI.

Bug 6760590.

Change-Id: I497df35a3c6817d2b300f532d4cc3f12e3ce9ace
parent 694121c4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3294,7 +3294,9 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
    // sent if none of these devices is connected.
    int mBecomingNoisyIntentDevices =
            AudioSystem.DEVICE_OUT_WIRED_HEADSET | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE |
            AudioSystem.DEVICE_OUT_ALL_A2DP;
            AudioSystem.DEVICE_OUT_ALL_A2DP | AudioSystem.DEVICE_OUT_AUX_DIGITAL |
            AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET | AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET |
            AudioSystem.DEVICE_OUT_ALL_USB;

    // must be called before removing the device from mConnectedDevices
    private int checkSendBecomingNoisyIntent(int device, int state) {