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

Skip to content
Commit 79998988 authored by Anton Potapov's avatar Anton Potapov
Browse files

Inject repeatWhenAttached CoroutineScope to prevent leaking

Before this CL @VolumeDialog CoroutineScope had slightly different
lifecycle rather than the scopes used in the ViewBinders. This along
side View#viewModel (which recreates the ViewModel when the view is
reattached) could lead to the CoroutinesScope used inside of the
ViewModel for stateIn to leak when the ViewModel is recreated insider the
ViewBinder.

Now @VolumeDialog is the same CoroutineScope and it's safe to inject it
whereever in the @VolumeDialogScope

Flag: com.android.systemui.volume_redesign
Bug: 369994101
Test: manual on the tablet. VolumeDialog appears after physical button
press

Change-Id: I683f4690eca40b76e37be83f4384872562299ee4
parent ac2a1f25
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