summaryrefslogtreecommitdiff
path: root/api/api_test.go
diff options
context:
space:
mode:
author Jean-Michel Trivi <jmtrivi@google.com> 2023-03-16 02:22:50 +0000
committer Jean-Michel Trivi <jmtrivi@google.com> 2023-03-17 14:34:46 +0000
commit8776acf76878c2ad3b1e13ccb713421db6f5f836 (patch)
treeba7f03479a96e5a4d06a22f58db457b1f37ebbb4 /api/api_test.go
parentf7fa5cb414efb6cd05a30d035ca64eb83d094126 (diff)
SeekBarVolumizer: fix handling of routing change
Bug cause: when audio routing changes, SeekBarVolumizer handles the STREAM_DEVICES_CHANGED_ACTION intent action. When this event is associated with a charging animation, the Fragment handling the sliders causes VolumeSeekBarPreference.onActivityPause to call SeekBarVolumizer.stop, which in turns sets a stop time, and thus causes isDelay to always be false while the action is handled. As a result the volume sliders are not updated with the new values. Fix: when the routing is not handled, post a message to reevaluate the conditions for update at a later time. Other fix: when handling STREAM_DEVICES_CHANGED_ACTION, first consider if the device is using stream types, and only then test for isDelay(), otherwise the VolumeGroup code path is wrongly executed. Optimization: do not cause AudioManager to construct a list of AudioProductStrategy for each event, just query once in constructor and cache the result. Bug: 265446544 Test: with Settings > Sound open, dock/undock the device (on a dock w/ speakers) Change-Id: I1ac02854328aa16aacc9db77921cdf4cae019ead
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions