Reconcile Expandable.kt on master/tm-qpr-dev-plus-aosp and tm-qpr-dev

Bug: 262222023
Test: Builds
Change-Id: I97660c5a9a2758c5e19d037e635c21456b6085c3
Merged-In: I97660c5a9a2758c5e19d037e635c21456b6085c3
This commit is contained in:
Jordan Demeulenaere
2022-12-15 12:40:07 +01:00
parent a6fa69cb01
commit c14e8fec59
2 changed files with 33 additions and 1 deletions

View File

@@ -53,7 +53,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.Density
import androidx.lifecycle.ViewTreeLifecycleOwner import androidx.lifecycle.ViewTreeLifecycleOwner
import androidx.lifecycle.ViewTreeViewModelStoreOwner import androidx.lifecycle.ViewTreeViewModelStoreOwner
import androidx.savedstate.ViewTreeSavedStateRegistryOwner
import com.android.systemui.animation.LaunchAnimator import com.android.systemui.animation.LaunchAnimator
import kotlin.math.min import kotlin.math.min

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.compose.animation
import android.view.View
import androidx.savedstate.SavedStateRegistryOwner
import androidx.savedstate.ViewTreeSavedStateRegistryOwner as AndroidXViewTreeSavedStateRegistryOwner
// TODO(b/262222023): Remove this workaround and import the new savedstate libraries in tm-qpr-dev
// instead.
object ViewTreeSavedStateRegistryOwner {
fun set(view: View, owner: SavedStateRegistryOwner?) {
AndroidXViewTreeSavedStateRegistryOwner.set(view, owner)
}
fun get(view: View): SavedStateRegistryOwner? {
return AndroidXViewTreeSavedStateRegistryOwner.get(view)
}
}