summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2022-05-23 17:24:29 -0400
committer Justin Weir <justinweir@google.com> 2022-05-23 17:52:26 -0400
commitbe0adabd7a775be7071f862816139360688506a3 (patch)
tree42e3164f3c09f42deddafb616519201a92f1d1f9 /libs/androidfw/StringPool.cpp
parent851b2e6a4d912ef493579731a8b94ad94f396fb0 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions