diff options
| author | 2024-02-06 17:02:06 +0000 | |
|---|---|---|
| committer | 2024-02-08 14:16:45 +0000 | |
| commit | 0629a3e7330cd2bd65db51428b41a0ddfcceb4d4 (patch) | |
| tree | 9fb84e70d4d762939bb89eff56f4f027731906e4 | |
| parent | a55384966de6d431572872765038ae6a91b5ac38 (diff) | |
Rename a few more animations classes to cover transitions in general.
Soon they will be used for both launches and returns, so these names
are more accurate.
Bug: 323863002
Flag: NA
Test: still builds (no functionality change)
Change-Id: I17738a7bf1241bb3784b950114c717854b1864d7
22 files changed, 58 insertions, 54 deletions
diff --git a/ktfmt_includes.txt b/ktfmt_includes.txt index e4bf4c26dc7d..a926fcb8d3d1 100644 --- a/ktfmt_includes.txt +++ b/ktfmt_includes.txt @@ -507,7 +507,7 @@ -packages/SystemUI/tests/src/com/android/systemui/ScreenDecorHwcLayerTest.kt -packages/SystemUI/tests/src/com/android/systemui/animation/DialogLaunchAnimatorTest.kt -packages/SystemUI/tests/src/com/android/systemui/animation/FontInterpolatorTest.kt --packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewLaunchAnimatorControllerTest.kt +-packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewTransitionAnimatorControllerTest.kt -packages/SystemUI/tests/src/com/android/systemui/animation/TextAnimatorTest.kt -packages/SystemUI/tests/src/com/android/systemui/animation/TextInterpolatorTest.kt -packages/SystemUI/tests/src/com/android/systemui/animation/ViewHierarchyAnimatorTest.kt diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt index c489795d861b..1b99e19eeb95 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt @@ -399,7 +399,7 @@ class ActivityTransitionAnimator( return null } - return GhostedViewLaunchAnimatorController(view, cujType) + return GhostedViewTransitionAnimatorController(view, cujType) } } diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/DelegateLaunchAnimatorController.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/DelegateTransitionAnimatorController.kt index a53ab62ef077..e24656276111 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/DelegateLaunchAnimatorController.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/DelegateTransitionAnimatorController.kt @@ -21,6 +21,6 @@ package com.android.systemui.animation * delegates most of its call to [delegate]. This is mostly useful for Java code which can't easily * create such a delegated class. */ -open class DelegateLaunchAnimatorController( +open class DelegateTransitionAnimatorController( protected val delegate: ActivityTransitionAnimator.Controller ) : ActivityTransitionAnimator.Controller by delegate diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt index ed7f31cd2c0c..a3b3a0acd68d 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt @@ -633,7 +633,7 @@ private class AnimatedDialog( val background = dialogContentWithBackground.background originalDialogBackgroundColor = - GhostedViewLaunchAnimatorController.findGradientDrawable(background) + GhostedViewTransitionAnimatorController.findGradientDrawable(background) ?.color ?.defaultColor ?: Color.BLACK @@ -895,11 +895,11 @@ private class AnimatedDialog( if (isLaunching) { controller.createTransitionController() } else { - GhostedViewLaunchAnimatorController(dialogContentWithBackground!!) + GhostedViewTransitionAnimatorController(dialogContentWithBackground!!) } val endController = if (isLaunching) { - GhostedViewLaunchAnimatorController(dialogContentWithBackground!!) + GhostedViewTransitionAnimatorController(dialogContentWithBackground!!) } else { controller.createExitController() } @@ -968,7 +968,7 @@ private class AnimatedDialog( // Therefore we update the end state to the new position/size. Usually the // dialog dimension or position will change in the early frames, so changing the // end state shouldn't really be noticeable. - if (endController is GhostedViewLaunchAnimatorController) { + if (endController is GhostedViewTransitionAnimatorController) { endController.fillGhostedViewState(endState) } } diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewTransitionAnimatorController.kt index f7148d779828..e4dc9beb51f8 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewTransitionAnimatorController.kt @@ -39,7 +39,7 @@ import java.util.LinkedList import kotlin.math.min import kotlin.math.roundToInt -private const val TAG = "GhostedViewLaunchAnimatorController" +private const val TAG = "GhostedViewTransitionAnimatorController" /** * A base implementation of [ActivityTransitionAnimator.Controller] which creates a @@ -53,7 +53,7 @@ private const val TAG = "GhostedViewLaunchAnimatorController" * Note: Avoid instantiating this directly and call [ActivityTransitionAnimator.Controller.fromView] * whenever possible instead. */ -open class GhostedViewLaunchAnimatorController +open class GhostedViewTransitionAnimatorController @JvmOverloads constructor( /** The view that will be ghosted and from which the background will be extracted. */ diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ViewDialogLaunchAnimatorController.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ViewDialogLaunchAnimatorController.kt index e2a29ab41f61..e07f945e069b 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ViewDialogLaunchAnimatorController.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ViewDialogLaunchAnimatorController.kt @@ -69,7 +69,7 @@ internal constructor( } override fun createTransitionController(): TransitionAnimator.Controller { - val delegate = GhostedViewLaunchAnimatorController(source) + val delegate = GhostedViewTransitionAnimatorController(source) return object : TransitionAnimator.Controller by delegate { override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) { // Remove the temporary ghost added by [startDrawingInOverlayOf]. Another @@ -95,7 +95,7 @@ internal constructor( } override fun createExitController(): TransitionAnimator.Controller { - return GhostedViewLaunchAnimatorController(source) + return GhostedViewTransitionAnimatorController(source) } override fun shouldAnimateExit(): Boolean { diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java index eae77898a5e8..a7c6546c69eb 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java +++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java @@ -82,7 +82,7 @@ import com.android.internal.widget.CachingIconView; import com.android.settingslib.widget.AdaptiveIcon; import com.android.systemui.ActivityIntentHelper; import com.android.systemui.animation.ActivityTransitionAnimator; -import com.android.systemui.animation.GhostedViewLaunchAnimatorController; +import com.android.systemui.animation.GhostedViewTransitionAnimatorController; import com.android.systemui.bluetooth.BroadcastDialogController; import com.android.systemui.broadcast.BroadcastSender; import com.android.systemui.dagger.qualifiers.Background; @@ -1320,7 +1320,7 @@ public class MediaControlPanel { // TODO(b/174236650): Make sure that the carousel indicator also fades out. // TODO(b/174236650): Instrument the animation to measure jank. - return new GhostedViewLaunchAnimatorController(player, + return new GhostedViewTransitionAnimatorController(player, InteractionJankMonitor.CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER) { @Override protected float getCurrentTopCornerRadius() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTransitionAnimatorController.kt index 02d1e6fd458a..eb0870a5de44 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTransitionAnimatorController.kt @@ -31,7 +31,7 @@ import kotlin.math.max private const val TAG = "NotificationLaunchAnimatorController" -/** A provider of [NotificationLaunchAnimatorController]. */ +/** A provider of [NotificationTransitionAnimatorController]. */ class NotificationLaunchAnimatorControllerProvider( private val notificationLaunchAnimationInteractor: NotificationLaunchAnimationInteractor, private val notificationListContainer: NotificationListContainer, @@ -42,8 +42,8 @@ class NotificationLaunchAnimatorControllerProvider( fun getAnimatorController( notification: ExpandableNotificationRow, onFinishAnimationCallback: Runnable? = null - ): NotificationLaunchAnimatorController { - return NotificationLaunchAnimatorController( + ): NotificationTransitionAnimatorController { + return NotificationTransitionAnimatorController( notificationLaunchAnimationInteractor, notificationListContainer, headsUpManager, @@ -59,7 +59,7 @@ class NotificationLaunchAnimatorControllerProvider( * instance of this class can be passed to [ActivityTransitionAnimator.startIntentWithAnimation] to * animate a notification expanding into an opening window. */ -class NotificationLaunchAnimatorController( +class NotificationTransitionAnimatorController( private val notificationLaunchAnimationInteractor: NotificationLaunchAnimationInteractor, private val notificationListContainer: NotificationListContainer, private val headsUpManager: HeadsUpManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java index 92b0c048f3fc..2a1ec3e9c64f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java @@ -169,11 +169,12 @@ public interface NotificationsModule { /** Provides notification launch animator. */ @Provides @SysUISingleton - static NotificationLaunchAnimatorControllerProvider provideNotifLaunchAnimControllerProvider( - NotificationLaunchAnimationInteractor notificationLaunchAnimationInteractor, - NotificationListContainer notificationListContainer, - HeadsUpManager headsUpManager, - InteractionJankMonitor jankMonitor) { + static NotificationLaunchAnimatorControllerProvider + provideNotificationTransitionAnimatorControllerProvider( + NotificationLaunchAnimationInteractor notificationLaunchAnimationInteractor, + NotificationListContainer notificationListContainer, + HeadsUpManager headsUpManager, + InteractionJankMonitor jankMonitor) { return new NotificationLaunchAnimatorControllerProvider( notificationLaunchAnimationInteractor, notificationListContainer, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationLaunchAnimationInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationLaunchAnimationInteractor.kt index a3189a01bdf7..27f2810efb55 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationLaunchAnimationInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationLaunchAnimationInteractor.kt @@ -33,7 +33,7 @@ constructor(private val repository: NotificationLaunchAnimationRepository) { * Emits true if an animation that expands a notification object into an opening window is * running and false otherwise. * - * See [com.android.systemui.statusbar.notification.NotificationLaunchAnimatorController]. + * See [com.android.systemui.statusbar.notification.NotificationTransitionAnimatorController]. */ val isLaunchAnimationRunning: StateFlow<Boolean> get() = repository.isLaunchAnimationRunning diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 5eeb0665da0e..5686c08e1dea 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -87,7 +87,7 @@ import com.android.systemui.statusbar.notification.AboveShelfChangedListener; import com.android.systemui.statusbar.notification.FeedbackIcon; import com.android.systemui.statusbar.notification.LaunchAnimationParameters; import com.android.systemui.statusbar.notification.NotificationFadeAware; -import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorController; +import com.android.systemui.statusbar.notification.NotificationTransitionAnimatorController; import com.android.systemui.statusbar.notification.NotificationUtils; import com.android.systemui.statusbar.notification.SourceType; import com.android.systemui.statusbar.notification.collection.NotificationEntry; @@ -2343,7 +2343,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView // top. Otherwise, we just take the top directly. float expandProgress = Interpolators.FAST_OUT_SLOW_IN.getInterpolation( params.getProgress(0, - NotificationLaunchAnimatorController.ANIMATION_DURATION_TOP_ROUNDING)); + NotificationTransitionAnimatorController + .ANIMATION_DURATION_TOP_ROUNDING)); int startTop = params.getStartNotificationTop(); top = (int) Math.min(MathUtils.lerp(startTop, params.getTop(), expandProgress), startTop); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 0a11eb26cc07..4c88c720ba41 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -101,7 +101,7 @@ import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.FakeShadowView; import com.android.systemui.statusbar.notification.LaunchAnimationParameters; -import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorController; +import com.android.systemui.statusbar.notification.NotificationTransitionAnimatorController; import com.android.systemui.statusbar.notification.NotificationUtils; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager; @@ -5886,7 +5886,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mRoundedRectClippingBottom); float expandProgress = Interpolators.FAST_OUT_SLOW_IN.getInterpolation( mLaunchAnimationParams.getProgress(0, - NotificationLaunchAnimatorController.ANIMATION_DURATION_TOP_ROUNDING)); + NotificationTransitionAnimatorController.ANIMATION_DURATION_TOP_ROUNDING)); int top = (int) Math.min(MathUtils.lerp(mRoundedRectClippingTop, mLaunchAnimationParams.getTop() - absoluteCoords[1], expandProgress), mRoundedRectClippingTop); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt index 80d45fb9a4d8..270b94b1893e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt @@ -32,7 +32,7 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.ActivityIntentHelper import com.android.systemui.animation.ActivityTransitionAnimator import com.android.systemui.animation.ActivityTransitionAnimator.PendingIntentStarter -import com.android.systemui.animation.DelegateLaunchAnimatorController +import com.android.systemui.animation.DelegateTransitionAnimatorController import com.android.systemui.assist.AssistManager import com.android.systemui.camera.CameraIntents.Companion.isInsecureCameraIntent import com.android.systemui.dagger.SysUISingleton @@ -851,7 +851,7 @@ constructor( // If the view is not in the status bar, then we are animating a view in the shade. // We have to make sure that we collapse it when the animation ends or is cancelled. if (dismissShade) { - return StatusBarLaunchAnimatorController( + return StatusBarTransitionAnimatorController( animationController, shadeViewControllerLazy.get(), shadeAnimationInteractor, @@ -873,7 +873,7 @@ constructor( animationController: ActivityTransitionAnimator.Controller? ): ActivityTransitionAnimator.Controller? { return animationController?.let { - object : DelegateLaunchAnimatorController(it) { + object : DelegateTransitionAnimatorController(it) { override fun onIntentStarted(willAnimate: Boolean) { delegate.onIntentStarted(willAnimate) if (willAnimate) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index e69210a14813..c79a0901f5eb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -654,7 +654,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { // Lazys due to b/298099682. Lazy<NotificationPresenter> notificationPresenterLazy, Lazy<NotificationActivityStarter> notificationActivityStarterLazy, - NotificationLaunchAnimatorControllerProvider notifLaunchAnimatorControllerProvider, + NotificationLaunchAnimatorControllerProvider notifTransitionAnimatorControllerProvider, DozeParameters dozeParameters, ScrimController scrimController, Lazy<BiometricUnlockController> biometricUnlockControllerLazy, @@ -760,7 +760,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotifListContainer = mStackScrollerController.getNotificationListContainer(); mPresenterLazy = notificationPresenterLazy; mNotificationActivityStarterLazy = notificationActivityStarterLazy; - mNotificationAnimationProvider = notifLaunchAnimatorControllerProvider; + mNotificationAnimationProvider = notifTransitionAnimatorControllerProvider; mDozeServiceHost = dozeServiceHost; mPowerManager = powerManager; mDozeParameters = dozeParameters; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java index 273758044a56..4fd33ba458d8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java @@ -441,7 +441,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit mLogger.logStartNotificationIntent(entry); try { ActivityTransitionAnimator.Controller animationController = - new StatusBarLaunchAnimatorController( + new StatusBarTransitionAnimatorController( mNotificationAnimationProvider.getAnimatorController(row, null), mShadeViewController, mShadeAnimationInteractor, @@ -483,7 +483,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit public boolean onDismiss() { AsyncTask.execute(() -> { ActivityTransitionAnimator.Controller animationController = - new StatusBarLaunchAnimatorController( + new StatusBarTransitionAnimatorController( mNotificationAnimationProvider.getAnimatorController(row), mShadeViewController, mShadeAnimationInteractor, @@ -534,7 +534,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit ); ActivityTransitionAnimator.Controller animationController = viewController == null ? null - : new StatusBarLaunchAnimatorController( + : new StatusBarTransitionAnimatorController( viewController, mShadeViewController, mShadeAnimationInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt index 7ff5f6e357db..7e907d80d277 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt @@ -9,10 +9,10 @@ import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor import com.android.systemui.statusbar.NotificationShadeWindowController /** - * A [ActivityTransitionAnimator.Controller] that takes care of collapsing the status bar at the right - * time. + * A [ActivityTransitionAnimator.Controller] that takes care of collapsing the status bar at the + * right time. */ -class StatusBarLaunchAnimatorController( +class StatusBarTransitionAnimatorController( private val delegate: ActivityTransitionAnimator.Controller, private val shadeViewController: ShadeViewController, private val shadeAnimationInteractor: ShadeAnimationInteractor, @@ -39,7 +39,8 @@ class StatusBarLaunchAnimatorController( shadeAnimationInteractor.setIsLaunchingActivity(true) if (!isExpandingFullyAbove) { shadeViewController.collapseWithDuration( - ActivityTransitionAnimator.TIMINGS.totalDuration.toInt()) + ActivityTransitionAnimator.TIMINGS.totalDuration.toInt() + ) } } @@ -63,4 +64,4 @@ class StatusBarLaunchAnimatorController( shadeAnimationInteractor.setIsLaunchingActivity(false) shadeController.onLaunchAnimationCancelled(isLaunchForActivity) } -}
\ No newline at end of file +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java index 65c2e20350ed..21f1a3dfc23a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java @@ -48,7 +48,7 @@ import android.view.WindowManager; import com.android.internal.policy.SystemBarUtils; import com.android.systemui.animation.ActivityTransitionAnimator; -import com.android.systemui.animation.DelegateLaunchAnimatorController; +import com.android.systemui.animation.DelegateTransitionAnimatorController; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.fragments.FragmentHostManager; @@ -195,7 +195,7 @@ public class StatusBarWindowController { } animationController.setTransitionContainer(mLaunchAnimationContainer); - return Optional.of(new DelegateLaunchAnimatorController(animationController) { + return Optional.of(new DelegateTransitionAnimatorController(animationController) { @Override public void onTransitionAnimationStart(boolean isExpandingFullyAbove) { getDelegate().onTransitionAnimationStart(isExpandingFullyAbove); diff --git a/packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewLaunchAnimatorControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewTransitionAnimatorControllerTest.kt index 8442a62d7c40..b31fe21f8e91 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewLaunchAnimatorControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/animation/GhostedViewTransitionAnimatorControllerTest.kt @@ -29,12 +29,12 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidTestingRunner::class) @TestableLooper.RunWithLooper -class GhostedViewLaunchAnimatorControllerTest : SysuiTestCase() { +class GhostedViewTransitionAnimatorControllerTest : SysuiTestCase() { @Test fun animatingOrphanViewDoesNotCrash() { val state = TransitionAnimator.State(top = 0, bottom = 0, left = 0, right = 0) - val controller = GhostedViewLaunchAnimatorController(LaunchableFrameLayout(mContext)) + val controller = GhostedViewTransitionAnimatorController(LaunchableFrameLayout(mContext)) controller.onIntentStarted(willAnimate = true) controller.onTransitionAnimationStart(isExpandingFullyAbove = true) controller.onTransitionAnimationProgress(state, progress = 0f, linearProgress = 0f) @@ -44,7 +44,7 @@ class GhostedViewLaunchAnimatorControllerTest : SysuiTestCase() { @Test fun creatingControllerFromNormalViewThrows() { assertThrows(IllegalArgumentException::class.java) { - GhostedViewLaunchAnimatorController(FrameLayout(mContext)) + GhostedViewTransitionAnimatorController(FrameLayout(mContext)) } } -}
\ No newline at end of file +} diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationTransitionAnimatorControllerTest.kt index 3315e68ab9af..6f16d65e14f9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationTransitionAnimatorControllerTest.kt @@ -36,7 +36,7 @@ import org.mockito.junit.MockitoJUnit @SmallTest @RunWith(AndroidTestingRunner::class) @RunWithLooper -class NotificationLaunchAnimatorControllerTest : SysuiTestCase() { +class NotificationTransitionAnimatorControllerTest : SysuiTestCase() { @Mock lateinit var notificationListContainer: NotificationListContainer @Mock lateinit var headsUpManager: HeadsUpManager @Mock lateinit var jankMonitor: InteractionJankMonitor @@ -44,7 +44,7 @@ class NotificationLaunchAnimatorControllerTest : SysuiTestCase() { private lateinit var notificationTestHelper: NotificationTestHelper private lateinit var notification: ExpandableNotificationRow - private lateinit var controller: NotificationLaunchAnimatorController + private lateinit var controller: NotificationTransitionAnimatorController private val notificationLaunchAnimationInteractor = NotificationLaunchAnimationInteractor(NotificationLaunchAnimationRepository()) @@ -62,7 +62,7 @@ class NotificationLaunchAnimatorControllerTest : SysuiTestCase() { NotificationTestHelper(mContext, mDependency, TestableLooper.get(this)) notification = notificationTestHelper.createRow() controller = - NotificationLaunchAnimatorController( + NotificationTransitionAnimatorController( notificationLaunchAnimationInteractor, notificationListContainer, headsUpManager, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java index 9c60a2b6fd12..15421ad29f33 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java @@ -250,7 +250,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private StatusBarStateControllerImpl mStatusBarStateController; @Mock private BatteryController mBatteryController; @Mock private DeviceProvisionedController mDeviceProvisionedController; - @Mock private NotificationLaunchAnimatorControllerProvider mNotifLaunchAnimControllerProvider; + @Mock private NotificationLaunchAnimatorControllerProvider + mNotifTransitionAnimControllerProvider; @Mock private StatusBarNotificationPresenter mNotificationPresenter; @Mock private NotificationActivityStarter mNotificationActivityStarter; @Mock private AmbientDisplayConfiguration mAmbientDisplayConfiguration; @@ -504,7 +505,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mStackScrollerController, (Lazy<NotificationPresenter>) () -> mNotificationPresenter, (Lazy<NotificationActivityStarter>) () -> mNotificationActivityStarter, - mNotifLaunchAnimControllerProvider, + mNotifTransitionAnimControllerProvider, mDozeParameters, mScrimController, mBiometricUnlockControllerLazy, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerProviderKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerProviderKosmos.kt index c3db34bdddb7..dc5a2f8cdc4e 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerProviderKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorControllerProviderKosmos.kt @@ -19,5 +19,5 @@ package com.android.systemui.statusbar.notification import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock -var Kosmos.notificationLaunchAnimatorControllerProvider by +var Kosmos.notificationTransitionAnimatorControllerProvider by Kosmos.Fixture { mock<NotificationLaunchAnimatorControllerProvider>() } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt index c83710acb7de..41c11ad61c7f 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt @@ -35,7 +35,7 @@ import com.android.systemui.shade.shadeController import com.android.systemui.shade.shadeViewController import com.android.systemui.statusbar.notification.collection.provider.launchFullScreenIntentProvider import com.android.systemui.statusbar.notification.collection.render.notificationVisibilityProvider -import com.android.systemui.statusbar.notification.notificationLaunchAnimatorControllerProvider +import com.android.systemui.statusbar.notification.notificationTransitionAnimatorControllerProvider import com.android.systemui.statusbar.notification.row.onUserInteractionCallback import com.android.systemui.statusbar.notificationClickNotifier import com.android.systemui.statusbar.notificationLockscreenUserManager @@ -80,7 +80,7 @@ val Kosmos.statusBarNotificationActivityStarter by notificationShadeWindowController, activityTransitionAnimator, shadeAnimationInteractor, - notificationLaunchAnimatorControllerProvider, + notificationTransitionAnimatorControllerProvider, launchFullScreenIntentProvider, powerInteractor, userTracker, |