summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Yan Han <yanha@google.com> 2022-01-31 19:10:16 +0100
committer Yan Han <yanha@google.com> 2022-03-22 15:09:26 +0100
commit7d4198268d288ea88ab637d0592859194b536a05 (patch)
tree15e0deef5486431d5b2bbd9438d44c86d0dc04a9 /libs/androidfw/StringPool.cpp
parent19a4593771e9bc37422efe3e1acb41583645c891 (diff)
AudioService: Add general support for Absolute Volume behavior
- Adds a map to store information about audio devices using absolute volume behavior. The map is updated when devices change behavior. - setStreamVolume and adjustStreamVolume now notify absolute volume listeners after changing the stream state. - Added option for absolute volume dispatcher to dispatch abstract volume adjustments (e.g. raise, lower, mute) as a result of calls to adjustStreamVolume. When registering the listener, the controller specifies whether it handles adjustments; if it does, future calls to adjustStreamVolume are forwarded to the controller without affecting stream state. - Refactoring to support the changes above: - rescaleIndex is generalized to allow converting between stream and absolute volume ranges. - Volume adjustment mode constants are moved into AudioDeviceVolumeManager because they are needed when dispatching volume adjustments to absolute volume controllers. Bug: 205817863 Test: atest AbsoluteVolumeBehaviorTest Change-Id: Ie5fb2179adea2096bd2d226fe73b4f09b28b0cf1
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions