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