audio policy: fix bad auto merge conflict resolution
When commit a81f098f1 was merged from aosp to pi-dev-plus-aosp
there was a problem where a code block already present in pi-dev
for the same fix (commit b62d78b72d9) was duplicated.
This caused double muting of notifications and alarms when a camera
sound is played in countries where this sound is enforced while unmuting
only once when camera sound stops.
Bug: 110913234
Test: force camera sound and verify mute/unmute counts after using the
camera.
Change-Id: Ie97e3642803310acbe5eb85a53a850e010a9f42f
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 96079cc..b0e6b0f 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -1514,11 +1514,6 @@
setStrategyMute(STRATEGY_SONIFICATION, true, outputDesc);
}
- 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;
}