summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorOliver Woodman <olly@google.com>2021-11-17 20:38:01 +0000
committerOliver Woodman <olly@google.com>2021-11-17 21:15:46 +0000
commit8907455ed7b145c55baa6a2ccf9babbd52b937ce (patch)
treef9516b6a3151a00c394a83b3b5bc9d7b259fa49d /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parentf68e7fb4897d8639f7d92d5423cf347115adf8e3 (diff)
Fix SysUI volume controls not appearing
SysUI listens to volume change events to trigger showing its volume control overlay UI. Normally when a hardware volume key is pressed, a volume (either locally or for a session corresponding to a remote playback) is changed, SysUI receives an event and the UI is displayed. In the case that a remote session doesn't allow volume adjustment, the key event is still routed to the session if that session is top of the stack. However, since the volume is not adjusted and an event is not dispatched, the SysUI volume control overlay doesn't appear. To the user it seems like the volume hardware key is broken, neither adjusting a volume or displaying the volume control overlay UI. This change fires volume change events for sessions that don't support actually changing the volume, to ensure that the SysUI is still displayed. It also seems more consistent, since there are other existing cases where the volume doesn't actually change for which an event is still fired (e.g., adjusting up when already at max volume). An alternative would be to change MediaSessionRecord's canHandleVolumeKey to return false for sessions that don't support volume adjustment, which would mean the key event would be handled by the next session in the stack (or, in most cases, to make a local volume adjustment). This is likely more confusing, since the user will generally expect the top session to be adjusted (surfacing that it could not is less confusing than just adjusting some other volume instead). Bug: 197586676 Bug: 202500642 Test: manual Change-Id: Ic44b48bb5605699b476af05407b90f2be5d70cd3
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions