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

Commit 2f0b9d45 authored by Brandon Liu's avatar Brandon Liu
Browse files

Revert "Fix Expandable.kt to work with new Compose prebuilts"

Revert submission 22208109-lifecycle_9778738

Reason for revert: <ACA identified this is the culprit of build failure b/281883862>

Reverted changes: /q/submissionid:22208109-lifecycle_9778738

Change-Id: I003cf7a0a83135c48dc2ad3de0807a49442a3d17
parent 348e4716
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -70,10 +70,8 @@ import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import androidx.lifecycle.findViewTreeLifecycleOwner
import androidx.lifecycle.findViewTreeViewModelStoreOwner
import androidx.lifecycle.setViewTreeLifecycleOwner
import androidx.lifecycle.setViewTreeViewModelStoreOwner
import androidx.lifecycle.ViewTreeLifecycleOwner
import androidx.lifecycle.ViewTreeViewModelStoreOwner
import com.android.systemui.animation.Expandable
import com.android.systemui.animation.LaunchAnimator
import kotlin.math.max
@@ -370,10 +368,13 @@ private fun AnimatedContentInOverlay(
                    context,
                    overlay,
                )

            overlayViewGroup.setViewTreeLifecycleOwner(composeViewRoot.findViewTreeLifecycleOwner())
            overlayViewGroup.setViewTreeViewModelStoreOwner(
                composeViewRoot.findViewTreeViewModelStoreOwner()
            ViewTreeLifecycleOwner.set(
                overlayViewGroup,
                ViewTreeLifecycleOwner.get(composeViewRoot),
            )
            ViewTreeViewModelStoreOwner.set(
                overlayViewGroup,
                ViewTreeViewModelStoreOwner.get(composeViewRoot),
            )
            ViewTreeSavedStateRegistryOwner.set(
                overlayViewGroup,