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

Skip to content
Commit 4cd6a2ad authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Fix SysUI crash when locking while showing the Media Output Group dialog

This CL fixes a bug introduced by http://ag/15663086: When locking the
phone while showing the Media Output Group dialog, SystemUI would crash
because of a mismatch between MediaOutputAdapter.currentActivePosition
and MediaOutputController.mMediaDevices. That mismatch came from the
sharing of the controller between the 2 dialogs, that are now shown at
the same time (even though one is hidden).

Starting from this CL, both dialogs now use a separate instance of
MediaOutputController to avoid this kind of race condition. This CL also
adds a safeguard in MediaOutputBaseDialog to ensure that we notify an
item change within bounds, which would otherwise throw and crash.

Bug: 200781817
Test: Show media output group dialog then lock phone.
Change-Id: I7749cc963a5e145467b32aa3a9efb1e80009f324
parent 97a5f472
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