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

Commit 527c6cc1 authored by Tomoharu Kasahara's avatar Tomoharu Kasahara Committed by android-build-merger
Browse files

Merge "The sonification sound is muted during a shutter sound" into pi-dev

am: 93e40cad

Change-Id: Ia221e76bb10f70261b9eab3dcdfe0bf5132d1eaa
parents 54d74f78 93e40cad
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1266,6 +1266,11 @@ status_t AudioPolicyManager::startSource(const sp<AudioOutputDescriptor>& output
        // We do not introduce additional delay here.
    }

    if (stream == AUDIO_STREAM_ENFORCED_AUDIBLE &&
            mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED) {
        setStrategyMute(STRATEGY_SONIFICATION, true, outputDesc);
    }

    return NO_ERROR;
}

@@ -1366,6 +1371,12 @@ status_t AudioPolicyManager::stopSource(const sp<AudioOutputDescriptor>& outputD
            // update the outputs if stopping one with a stream that can affect notification routing
            handleNotificationRoutingForStream(stream);
        }

        if (stream == AUDIO_STREAM_ENFORCED_AUDIBLE &&
                mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED) {
            setStrategyMute(STRATEGY_SONIFICATION, false, outputDesc);
        }

        if (stream == AUDIO_STREAM_MUSIC) {
            selectOutputForMusicEffects();
        }