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

Commit 27c30e44 authored by Eric Laurent's avatar Eric Laurent
Browse files

fix condition to send ACTION_AUDIO_BECOMING_NOISY intent

In checkSendBecomingNoisyIntent(), only output devices
must be taken into account when checking if the device
type is in mBecomingNoisyIntentDevices

Bug: 17298383.
Bug: 16403219.
Change-Id: I2213681184ab9fb3b874029143f2bbd34032d6b8
parent 20ce284f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4290,7 +4290,8 @@ public class AudioService extends IAudioService.Stub {
        if ((state == 0) && ((device & mBecomingNoisyIntentDevices) != 0)) {
            int devices = 0;
            for (int dev : mConnectedDevices.keySet()) {
                if ((dev & mBecomingNoisyIntentDevices) != 0) {
                if (((dev & AudioSystem.DEVICE_BIT_IN) == 0) &&
                        ((dev & mBecomingNoisyIntentDevices) != 0)) {
                   devices |= dev;
                }
            }