Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit be0adabd authored by Justin Weir's avatar Justin Weir
Browse files

Add a unique ID to MediaDeviceData

Both InfoMediaDevice and PhoneMediaDevice implement getIcon by calling
mContext.getDrawable and do not cache the result. Each time, they appear
to supply a fresh icon object inside MediaDeviceManager.updateCurrent,
causing it to always update the field MediaDeviceManager.current in its
setter. This resulted in a lot of unnecessary work being sent to the
fgExecutor on every volume change event, causing jank in the volume
dialog. Adding each device's unique ID to the media data and not setting
the field on ID matches eliminates the unnecessary calls.

Fixes: 225624315
Test: Manually tested and verified lack of dropped frames in Perfetto
Change-Id: I5d8fdcdf18c30a87274a8bf07e3f6a07afd650e1
parent 851b2e6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment