summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorKyunglyul Hyun <klhyun@google.com>2020-05-13 21:31:26 +0900
committerKyunglyul Hyun <klhyun@google.com>2020-05-14 20:12:41 +0900
commitf8f170cb2120f1c101be062b8601a2a76e20505e (patch)
tree218cfea1efe62e5ad4f38ee68c64e2d4a96d1cfc /tools/aapt2/java/JavaClassGenerator.cpp
parentf92fd5a117680d50773a5c47f1ab472cd411dc0f (diff)
Handles volume for device route and bt routes.
AudioManager#getStreamVolume() is used to get volume info. Which returns device volume or bluetooth volume according to the current active device. The selected route of the system media route provider can be different from the one in AudioManager, which results in having wrong volume in MediaRoute2Info. This CL updates the volume of the correct media route depending on AudioManager#getDevicesForStream. It assumes that there are 3 volumes (device volume, bluetooth volume, and hearing aid volume). The limitation of this CL is that when the user transfers to a route first time, the volume could be 0. About after 4~600ms volume info is updated. This seems inevitable because I couldn't find an API to get the volume of inactive device. Bug: 155279794 Test: manually switching between phone <-> bt route. Reboot multiple times to check "first transfer" Change-Id: I4edcab9e6e436801b64c9434b683ddddbbc02bef
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions