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

Commit ac24d089 authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Fix "null or empty system routes" crash in SysUI

This can happen when the media strategy is not available during startup,
so a legacy device route controller is instantiated, instead of the
"correct" audio manager route controller. This change fixes an
implementaiton issue in the legacy route controller, causing it to
return an empty collection of available routes, which is in turn used to
populate the provider info. This change makes the available routes
include the currently selected route.

Longer term, we want to get rid of the legacy route controller but, in
the meantime, this bugfix prevents a crash in sys ui.

Bug: b/357468728
Test: Manually by "forcing" a null media strat.
Test: atest LegacyDeviceRouteControllerTest
Flag: com.android.media.flags.enable_fix_for_empty_system_routes_crash
Change-Id: I5f84bbc9f1102b3df8966be27c7754cd05b53b6b
parent 5f61646a
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