SystemUI: QSFragmentCompose: wrap mediaHost.hostView in a FrameLayout
Otherwise, compose gets direct control over the mediaHost.hostView
which is a location-based singleton view. While recomposing, compose
may try to add the same view multiple times to the view hierarchy,
causing the following crash.
This can be reproduced by entering fullscreen on a YouTube video, for
example, as that would change qqsMediaInRow triggering a recomposition.
This has only started happening after I57a55c924be7e36d969af4382400e8f0d9415a84.
E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
E AndroidRuntime: at android.view.ViewGroup.addViewInner(ViewGroup.java:5286)
E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:5115)
E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:5055)
E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:5027)
E AndroidRuntime: at androidx.compose.ui.viewinterop.AndroidView_androidKt$createAndroidViewNodeFactory$1$1.invoke(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:51)
E AndroidRuntime: at androidx.compose.runtime.changelist.Operation$UpdateValue.execute(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:103)
E AndroidRuntime: at androidx.compose.runtime.changelist.Operations.executeAndFlushAllPendingOperations(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:33)
E AndroidRuntime: at androidx.compose.runtime.changelist.Operation$InsertSlotsWithFixups.execute(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:59)
E AndroidRuntime: at androidx.compose.runtime.changelist.Operations.executeAndFlushAllPendingOperations(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:33)
E AndroidRuntime: at androidx.compose.runtime.changelist.ChangeList.executeAndFlushAllPendingChanges(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:3)
E AndroidRuntime: at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:96)
E AndroidRuntime: at androidx.compose.runtime.CompositionImpl.applyChanges(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:6)
E AndroidRuntime: at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$$ExternalSyntheticLambda0.invoke(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:221)
E AndroidRuntime: at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:9)
E AndroidRuntime: at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(go/retraceme 95501455e03d07c14b9a508ce2fb9edb688169aecb482c09cf8c1cd98c692276:50)
E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1628)
E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1639)
E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:1235)
E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:1160)
E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1613)
E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:1070)
E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:125)
E AndroidRuntime: at android.os.Looper.dispatchMessage(Looper.java:333)
E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:263)
E AndroidRuntime: at android.os.Looper.loop(Looper.java:367)
E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:9287)
E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:566)
E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
E AndroidRuntime: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@225dbc, androidx.compose.ui.platform.MotionDurationScaleImpl@2996145, StandaloneCoroutine{Cancelling}@74fa09a, AndroidUiDispatcher@f27dcb]
Change-Id: Ic8fc2c17c36dc07efabe8bf87f0048a0e8e129cd
Loading
Please register or sign in to comment