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
Loading
Please register or sign in to comment