Merge "Fix warning log in DialogLaunchAnimator" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7206db68f8
@@ -237,13 +237,17 @@ constructor(
|
|||||||
openedDialogs.firstOrNull {
|
openedDialogs.firstOrNull {
|
||||||
it.dialog.window.decorView.viewRootImpl == controller.viewRoot
|
it.dialog.window.decorView.viewRootImpl == controller.viewRoot
|
||||||
}
|
}
|
||||||
val animateFrom =
|
val controller =
|
||||||
animatedParent?.dialogContentWithBackground?.let {
|
animatedParent?.dialogContentWithBackground?.let {
|
||||||
Controller.fromView(it, controller.cuj)
|
Controller.fromView(it, controller.cuj)
|
||||||
}
|
}
|
||||||
?: controller
|
?: controller
|
||||||
|
|
||||||
if (animatedParent == null && animateFrom !is LaunchableView) {
|
if (
|
||||||
|
animatedParent == null &&
|
||||||
|
controller is ViewDialogLaunchAnimatorController &&
|
||||||
|
controller.source !is LaunchableView
|
||||||
|
) {
|
||||||
// Make sure the View we launch from implements LaunchableView to avoid visibility
|
// Make sure the View we launch from implements LaunchableView to avoid visibility
|
||||||
// issues. Given that we don't own dialog decorViews so we can't enforce it for launches
|
// issues. Given that we don't own dialog decorViews so we can't enforce it for launches
|
||||||
// from a dialog.
|
// from a dialog.
|
||||||
@@ -272,7 +276,7 @@ constructor(
|
|||||||
launchAnimator,
|
launchAnimator,
|
||||||
callback,
|
callback,
|
||||||
interactionJankMonitor,
|
interactionJankMonitor,
|
||||||
animateFrom,
|
controller,
|
||||||
onDialogDismissed = { openedDialogs.remove(it) },
|
onDialogDismissed = { openedDialogs.remove(it) },
|
||||||
dialog = dialog,
|
dialog = dialog,
|
||||||
animateBackgroundBoundsChange,
|
animateBackgroundBoundsChange,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import com.android.internal.jank.InteractionJankMonitor
|
|||||||
/** A [DialogLaunchAnimator.Controller] that can animate a [View] from/to a dialog. */
|
/** A [DialogLaunchAnimator.Controller] that can animate a [View] from/to a dialog. */
|
||||||
class ViewDialogLaunchAnimatorController
|
class ViewDialogLaunchAnimatorController
|
||||||
internal constructor(
|
internal constructor(
|
||||||
private val source: View,
|
internal val source: View,
|
||||||
override val cuj: DialogCuj?,
|
override val cuj: DialogCuj?,
|
||||||
) : DialogLaunchAnimator.Controller {
|
) : DialogLaunchAnimator.Controller {
|
||||||
override val viewRoot: ViewRootImpl?
|
override val viewRoot: ViewRootImpl?
|
||||||
|
|||||||
Reference in New Issue
Block a user