summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-12-20 00:33:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-20 00:33:03 +0000
commitcaf17e316c7b7c22e877397f6bb3f882e4f68279 (patch)
tree51b2a1fa1c4650e77eb07d7448c2b0da3906e07b /services/audiopolicy
parent4af263bd15a8177f1e28a53a2765277022d7372e (diff)
parent0a0662ea48b060716e0e982661836df9a0958111 (diff)
downloadframeworks_av-caf17e316c7b7c22e877397f6bb3f882e4f68279.zip
frameworks_av-caf17e316c7b7c22e877397f6bb3f882e4f68279.tar.gz
frameworks_av-caf17e316c7b7c22e877397f6bb3f882e4f68279.tar.bz2
am 0a0662ea: Merge "audio policy: improve accessibility routing" into lmp-mr1-dev
* commit '0a0662ea48b060716e0e982661836df9a0958111': audio policy: improve accessibility routing
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index a3389e0..be7158f 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -596,6 +596,9 @@ void AudioPolicyManager::setPhoneState(audio_mode_t state)
}
handleIncallSonification((audio_stream_type_t)stream, false, true);
}
+
+ // force reevaluating accessibility routing when call starts
+ mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
}
// store previous phone state for management of sonification strategy below
@@ -1290,6 +1293,11 @@ status_t AudioPolicyManager::startOutput(audio_io_handle_t output,
outputDesc->mPolicyMix->mRegistrationId);
}
+ // force reevaluating accessibility routing when ringtone or alarm starts
+ if (strategy == STRATEGY_SONIFICATION) {
+ mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
+ }
+
if (waitMs > muteWaitMs) {
usleep((waitMs - muteWaitMs) * 2 * 1000);
}