summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-12-20 00:38:23 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-20 00:38:23 +0000
commitd8be13b8d964b7edb02cb2ad64dee86ff247c911 (patch)
treea0fd518a691d4baebbfc69c783109cca28529e46 /services/audiopolicy
parentbae511e3b982355fbc75ae2ba13bb88feab9fe8c (diff)
parentcaf17e316c7b7c22e877397f6bb3f882e4f68279 (diff)
downloadframeworks_av-d8be13b8d964b7edb02cb2ad64dee86ff247c911.zip
frameworks_av-d8be13b8d964b7edb02cb2ad64dee86ff247c911.tar.gz
frameworks_av-d8be13b8d964b7edb02cb2ad64dee86ff247c911.tar.bz2
am caf17e31: am 0a0662ea: Merge "audio policy: improve accessibility routing" into lmp-mr1-dev
* commit 'caf17e316c7b7c22e877397f6bb3f882e4f68279': 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);
}