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

Commit 8431bbe1 authored by Alex Shabalin's avatar Alex Shabalin Committed by Alexandr Shabalin
Browse files

Prevent making IPC calls during UI rendering.

`MediaSwitchingController` methods `getSelectableMediaDevice`,
`getDeselectableMediaDevice`, `getSelectedMediaDevice`, and
`getTransferableMediaDevice` end up in making expensive binder calls on
every item render.

This change puts `selected`, `transferable`, `selectable`, and
`deselectable` values as attributes of the MediaDevice and populates
them only whenever the device list is updated.

Bug: 414668703
Test: atest com.android.settingslib.media.InfoMediaManagerTest
Flag: com.android.media.flags.avoid_binder_calls_during_render
Change-Id: I0c95efcfc4a7645cde8e69e969e247f6a7a43d91
parent 66c38a10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment