summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/managerdefault
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2015-07-21 11:42:02 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2015-07-21 11:45:43 -0700
commit5de234b29141334c1bb5e40bc19c11836848841b (patch)
tree00cc7d27395e4705fb5e297b896eccac90714ccb /services/audiopolicy/managerdefault
parentf8f669d7a727e4ad5505cd85741f4d50dbaffbf9 (diff)
downloadframeworks_av-5de234b29141334c1bb5e40bc19c11836848841b.zip
frameworks_av-5de234b29141334c1bb5e40bc19c11836848841b.tar.gz
frameworks_av-5de234b29141334c1bb5e40bc19c11836848841b.tar.bz2
Prevent notifications from muting accessibility prompts
When evaluating on which device a sound is to be played, the policy must consider which current routing strategy, if any, has priority for overriding the choice. Here the playback of notifications, when duplicated over speaker and headphones, was causing the accessibility prompt to be muted because the it was of a higher priority, and incompatible with the accessibility routing. The fix consists in assigning a higher priority to the accessbility routing strategy over the notification routing strategy. Bug 18834451 Change-Id: I8228b30a7d80bd61d1c223afb030d9421d4f33cf
Diffstat (limited to 'services/audiopolicy/managerdefault')
-rw-r--r--services/audiopolicy/managerdefault/AudioPolicyManager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 6d99640..7530dcc 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -3908,12 +3908,12 @@ audio_devices_t AudioPolicyManager::getNewOutputDevice(const sp<AudioOutputDescr
// use device for strategy phone
// 3: the strategy for enforced audible is active but not enforced on the output:
// use the device for strategy enforced audible
- // 4: the strategy sonification is active on the output:
+ // 4: the strategy accessibility is active on the output:
+ // use device for strategy accessibility
+ // 5: the strategy sonification is active on the output:
// use device for strategy sonification
- // 5: the strategy "respectful" sonification is active on the output:
+ // 6: the strategy "respectful" sonification is active on the output:
// use device for strategy "respectful" sonification
- // 6: the strategy accessibility is active on the output:
- // use device for strategy accessibility
// 7: the strategy media is active on the output:
// use device for strategy media
// 8: the strategy DTMF is active on the output:
@@ -3928,12 +3928,12 @@ audio_devices_t AudioPolicyManager::getNewOutputDevice(const sp<AudioOutputDescr
device = getDeviceForStrategy(STRATEGY_PHONE, fromCache);
} else if (isStrategyActive(outputDesc, STRATEGY_ENFORCED_AUDIBLE)) {
device = getDeviceForStrategy(STRATEGY_ENFORCED_AUDIBLE, fromCache);
+ } else if (isStrategyActive(outputDesc, STRATEGY_ACCESSIBILITY)) {
+ device = getDeviceForStrategy(STRATEGY_ACCESSIBILITY, fromCache);
} else if (isStrategyActive(outputDesc, STRATEGY_SONIFICATION)) {
device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
} else if (isStrategyActive(outputDesc, STRATEGY_SONIFICATION_RESPECTFUL)) {
device = getDeviceForStrategy(STRATEGY_SONIFICATION_RESPECTFUL, fromCache);
- } else if (isStrategyActive(outputDesc, STRATEGY_ACCESSIBILITY)) {
- device = getDeviceForStrategy(STRATEGY_ACCESSIBILITY, fromCache);
} else if (isStrategyActive(outputDesc, STRATEGY_MEDIA)) {
device = getDeviceForStrategy(STRATEGY_MEDIA, fromCache);
} else if (isStrategyActive(outputDesc, STRATEGY_DTMF)) {