summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorOliver Woodman <olly@google.com>2021-11-17 20:38:01 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-24 23:22:42 +0000
commitb0fd66ff136e510af9ef2e2d99f58020f7a19583 (patch)
treebaae7a9725e2166882b7d9b247797877759ad99f /rs/java/android/renderscript/ProgramStore.java
parent06ad525359baf9037679878fbec54efdb0e5b183 (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 Merged-In: Ic44b48bb5605699b476af05407b90f2be5d70cd3 Change-Id: Ic44b48bb5605699b476af05407b90f2be5d70cd3 (cherry picked from commit 771b7ebe5d10f867a44101aa7a0b0a779bacfd32) Merged-In:Ic44b48bb5605699b476af05407b90f2be5d70cd3
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions