summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioPolicyService.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-03-12 16:29:55 -0700
committerGlenn Kasten <gkasten@google.com>2012-03-13 11:09:47 -0700
commite53b9ead781c36e96d6b6f012ddffc93a3d80f0d (patch)
tree4bcde0bc9a797851ec1bee4f630c8c4f0735f623 /services/audioflinger/AudioPolicyService.cpp
parentb87396f9ebabbb7b47683bceca96cbe635a1ca00 (diff)
downloadframeworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.zip
frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.gz
frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.bz2
Whitespace and indentation
Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
Diffstat (limited to 'services/audioflinger/AudioPolicyService.cpp')
-rw-r--r--services/audioflinger/AudioPolicyService.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index d57326b..c23eb04 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -649,7 +649,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop()
mLock.lock();
while (!exitPending())
{
- while(!mAudioCommands.isEmpty()) {
+ while (!mAudioCommands.isEmpty()) {
nsecs_t curTime = systemTime();
// commands are sorted by increasing time stamp: execute them from index 0 and up
if (mAudioCommands[0]->mTime <= curTime) {
@@ -693,16 +693,16 @@ bool AudioPolicyService::AudioCommandThread::threadLoop()
delete data;
}break;
case SET_PARAMETERS: {
- ParametersData *data = (ParametersData *)command->mParam;
- ALOGV("AudioCommandThread() processing set parameters string %s, io %d",
- data->mKeyValuePairs.string(), data->mIO);
- command->mStatus = AudioSystem::setParameters(data->mIO, data->mKeyValuePairs);
- if (command->mWaitStatus) {
- command->mCond.signal();
- mWaitWorkCV.wait(mLock);
- }
- delete data;
- }break;
+ ParametersData *data = (ParametersData *)command->mParam;
+ ALOGV("AudioCommandThread() processing set parameters string %s, io %d",
+ data->mKeyValuePairs.string(), data->mIO);
+ command->mStatus = AudioSystem::setParameters(data->mIO, data->mKeyValuePairs);
+ if (command->mWaitStatus) {
+ command->mCond.signal();
+ mWaitWorkCV.wait(mLock);
+ }
+ delete data;
+ }break;
case SET_VOICE_VOLUME: {
VoiceVolumeData *data = (VoiceVolumeData *)command->mParam;
ALOGV("AudioCommandThread() processing set voice volume volume %f",
@@ -916,19 +916,19 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma
AudioParameter param = AudioParameter(data->mKeyValuePairs);
AudioParameter param2 = AudioParameter(data2->mKeyValuePairs);
for (size_t j = 0; j < param.size(); j++) {
- String8 key;
- String8 value;
- param.getAt(j, key, value);
- for (size_t k = 0; k < param2.size(); k++) {
- String8 key2;
- String8 value2;
- param2.getAt(k, key2, value2);
- if (key2 == key) {
- param2.remove(key2);
- ALOGV("Filtering out parameter %s", key2.string());
- break;
- }
- }
+ String8 key;
+ String8 value;
+ param.getAt(j, key, value);
+ for (size_t k = 0; k < param2.size(); k++) {
+ String8 key2;
+ String8 value2;
+ param2.getAt(k, key2, value2);
+ if (key2 == key) {
+ param2.remove(key2);
+ ALOGV("Filtering out parameter %s", key2.string());
+ break;
+ }
+ }
}
// if all keys have been filtered out, remove the command.
// otherwise, update the key value pairs
@@ -1020,7 +1020,7 @@ int AudioPolicyService::startTone(audio_policy_tone_t tone,
ALOGE("startTone: illegal tone requested (%d)", tone);
if (stream != AUDIO_STREAM_VOICE_CALL)
ALOGE("startTone: illegal stream (%d) requested for tone %d", stream,
- tone);
+ tone);
mTonePlaybackThread->startToneCommand(ToneGenerator::TONE_SUP_CALL_WAITING,
AUDIO_STREAM_VOICE_CALL);
return 0;