diff options
author | Eric Laurent <elaurent@google.com> | 2011-02-02 09:33:30 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-02-03 09:26:24 -0800 |
commit | 25101b0b9a84571ead15b26e9f4cd9c4298d7823 (patch) | |
tree | 8f339bdcc562671cd425144be54841f39c56754b /include/media | |
parent | 1cee14f154aadabcd9990bd73a197fbd744660ad (diff) | |
download | frameworks_base-25101b0b9a84571ead15b26e9f4cd9c4298d7823.zip frameworks_base-25101b0b9a84571ead15b26e9f4cd9c4298d7823.tar.gz frameworks_base-25101b0b9a84571ead15b26e9f4cd9c4298d7823.tar.bz2 |
Fix issue 3371080
Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC
Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode
Play sound FX (audible selections, keyboard clicks) at a fixed volume.
Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.
Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/AudioSystem.h | 5 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 3 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 1e29d82..03f8944 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -204,8 +204,9 @@ public: // set audio mode in audio hardware (see AudioSystem::audio_mode) static status_t setMode(int mode); - // returns true in *state if tracks are active on the specified stream - static status_t isStreamActive(int stream, bool *state); + // returns true in *state if tracks are active on the specified stream or has been active + // in the past inPastMs milliseconds + static status_t isStreamActive(int stream, bool *state, uint32_t inPastMs = 0); // set/get audio hardware parameters. The function accepts a list of parameters // key value pairs in the form: key1=value1;key2=value2;... diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 70e505e..589f7cd 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -102,9 +102,6 @@ public: virtual status_t setMicMute(bool state) = 0; virtual bool getMicMute() const = 0; - // is any track active on this stream? - virtual bool isStreamActive(int stream) const = 0; - virtual status_t setParameters(int ioHandle, const String8& keyValuePairs) = 0; virtual String8 getParameters(int ioHandle, const String8& keys) = 0; diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index 49eee59..5afceaa 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -81,6 +81,7 @@ public: int session, int id) = 0; virtual status_t unregisterEffect(int id) = 0; + virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const = 0; }; |