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

Commit 9761b6b2 authored by Tyler Saunders's avatar Tyler Saunders Committed by Android (Google) Code Review
Browse files

Merge changes from topic "lifecycle-udc-mainline" into udc-mainline-prod

* changes:
  Revert "Revert "Updated AnimatedContentScope to AnimatedContentT..."
  Revert "Revert "Fix Expandable.kt to work with new Compose prebu..."
  Revert^2 "Lifecycle has to use kotlin syntax"
parents 5d0525f7 c1f15887
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.annotation.VisibleForTesting
import androidx.compose.animation.AnimatedContentScope
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
@@ -146,22 +146,26 @@ private fun NavControllerWrapperImpl.NavContent(
                arguments = spp.parameter,
                enterTransition = {
                    slideIntoContainer(
                        AnimatedContentScope.SlideDirection.Start, animationSpec = slideEffect
                        AnimatedContentTransitionScope.SlideDirection.Start,
                        animationSpec = slideEffect
                    ) + fadeIn(animationSpec = fadeEffect)
                },
                exitTransition = {
                    slideOutOfContainer(
                        AnimatedContentScope.SlideDirection.Start, animationSpec = slideEffect
                        AnimatedContentTransitionScope.SlideDirection.Start,
                        animationSpec = slideEffect
                    ) + fadeOut(animationSpec = fadeEffect)
                },
                popEnterTransition = {
                    slideIntoContainer(
                        AnimatedContentScope.SlideDirection.End, animationSpec = slideEffect
                        AnimatedContentTransitionScope.SlideDirection.End,
                        animationSpec = slideEffect
                    ) + fadeIn(animationSpec = fadeEffect)
                },
                popExitTransition = {
                    slideOutOfContainer(
                        AnimatedContentScope.SlideDirection.End, animationSpec = slideEffect
                        AnimatedContentTransitionScope.SlideDirection.End,
                        animationSpec = slideEffect
                    ) + fadeOut(animationSpec = fadeEffect)
                },
            ) { navBackStackEntry ->
+8 −9
Original line number Diff line number Diff line
@@ -70,8 +70,10 @@ 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.ViewTreeLifecycleOwner
import androidx.lifecycle.ViewTreeViewModelStoreOwner
import androidx.lifecycle.findViewTreeLifecycleOwner
import androidx.lifecycle.findViewTreeViewModelStoreOwner
import androidx.lifecycle.setViewTreeLifecycleOwner
import androidx.lifecycle.setViewTreeViewModelStoreOwner
import com.android.systemui.animation.Expandable
import com.android.systemui.animation.LaunchAnimator
import kotlin.math.max
@@ -368,13 +370,10 @@ private fun AnimatedContentInOverlay(
                    context,
                    overlay,
                )
            ViewTreeLifecycleOwner.set(
                overlayViewGroup,
                ViewTreeLifecycleOwner.get(composeViewRoot),
            )
            ViewTreeViewModelStoreOwner.set(
                overlayViewGroup,
                ViewTreeViewModelStoreOwner.get(composeViewRoot),

            overlayViewGroup.setViewTreeLifecycleOwner(composeViewRoot.findViewTreeLifecycleOwner())
            overlayViewGroup.setViewTreeViewModelStoreOwner(
                composeViewRoot.findViewTreeViewModelStoreOwner()
            )
            ViewTreeSavedStateRegistryOwner.set(
                overlayViewGroup,
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ open class ControlsEditingActivity @Inject constructor(
    private fun bindViews() {
        setContentView(R.layout.controls_management)

        getLifecycle().addObserver(
        lifecycle.addObserver(
            ControlsAnimations.observerForAnimations(
                requireViewById<ViewGroup>(R.id.controls_management_root),
                window,
+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ open class ControlsFavoritingActivity @Inject constructor(
    private fun bindViews() {
        setContentView(R.layout.controls_management)

        getLifecycle().addObserver(
        lifecycle.addObserver(
            ControlsAnimations.observerForAnimations(
                requireViewById<ViewGroup>(R.id.controls_management_root),
                window,
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ open class ControlsProviderSelectorActivity @Inject constructor(

        setContentView(R.layout.controls_management)

        getLifecycle().addObserver(
        lifecycle.addObserver(
            ControlsAnimations.observerForAnimations(
                requireViewById<ViewGroup>(R.id.controls_management_root),
                window,
Loading