Loading packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +5 −17 Original line number Diff line number Diff line Loading @@ -191,23 +191,11 @@ class ActivityLaunchAnimator(context: Context) { fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {} /** * The animation was cancelled remotely. Note that [onLaunchAnimationEnd] will still be * called after this if the animation was already started, i.e. if [onLaunchAnimationStart] * was called before the cancellation. * The animation was cancelled. Note that [onLaunchAnimationEnd] will still be called after * this if the animation was already started, i.e. if [onLaunchAnimationStart] was called * before the cancellation. */ fun onLaunchAnimationCancelled() {} /** * The remote animation was not started within the expected time. It timed out and will * never [start][onLaunchAnimationStart]. */ fun onLaunchAnimationTimedOut() {} /** * The animation was aborted because the opening window was not found. It will never * [start][onLaunchAnimationStart]. */ fun onLaunchAnimationAborted() {} } /** The state of an expandable view during an [ActivityLaunchAnimator] animation. */ Loading Loading @@ -332,7 +320,7 @@ class ActivityLaunchAnimator(context: Context) { if (window == null) { removeTimeout() invokeCallback(iCallback) controller.onLaunchAnimationAborted() controller.onLaunchAnimationCancelled() return } Loading Loading @@ -486,7 +474,7 @@ class ActivityLaunchAnimator(context: Context) { } timedOut = true controller.onLaunchAnimationTimedOut() controller.onLaunchAnimationCancelled() } override fun onAnimationCancelled() { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt +0 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,6 @@ class NotificationLaunchAnimatorController( notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationTimedOut() { notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationAborted() { notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationStart(isExpandingFullyAbove: Boolean) { notification.isExpandAnimationRunning = true notificationListContainer.setExpandingNotification(notification) Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −12 Original line number Diff line number Diff line Loading @@ -2015,9 +2015,12 @@ public class StatusBar extends SystemUI implements DemoMode, /** A launch animation was cancelled. */ //TODO: These can / should probably be moved to NotificationPresenter or ShadeController public void onLaunchAnimationCancelled() { if (!mPresenter.isCollapsing()) { public void onLaunchAnimationCancelled(boolean isLaunchForActivity) { if (mPresenter.isPresenterFullyCollapsed() && !mPresenter.isCollapsing() && isLaunchForActivity) { onClosingFinished(); } else { mShadeController.collapsePanel(true /* animate */); } } Loading @@ -2031,16 +2034,6 @@ public class StatusBar extends SystemUI implements DemoMode, } } /** A launch animation timed out. */ public void onLaunchAnimationTimedOut(boolean isLaunchForActivity) { if (mPresenter.isPresenterFullyCollapsed() && !mPresenter.isCollapsing() && isLaunchForActivity) { onClosingFinished(); } else { mShadeController.collapsePanel(true /* animate */); } } /** Whether we should animate an activity launch. */ public boolean areLaunchAnimationsEnabled() { // TODO(b/184121838): Support lock screen launch animations. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +1 −11 Original line number Diff line number Diff line Loading @@ -43,16 +43,6 @@ class StatusBarLaunchAnimatorController( override fun onLaunchAnimationCancelled() { delegate.onLaunchAnimationCancelled() statusBar.onLaunchAnimationCancelled() } override fun onLaunchAnimationTimedOut() { delegate.onLaunchAnimationTimedOut() statusBar.onLaunchAnimationTimedOut(isLaunchForActivity) } override fun onLaunchAnimationAborted() { delegate.onLaunchAnimationAborted() statusBar.collapsePanelOnMainThread() statusBar.onLaunchAnimationCancelled(isLaunchForActivity) } } No newline at end of file packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +2 −10 Original line number Diff line number Diff line Loading @@ -106,12 +106,12 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { } @Test fun abortsIfNoOpeningWindowIsFound() { fun cancelsIfNoOpeningWindowIsFound() { val runner = activityLaunchAnimator.createRunner(controller) runner.onAnimationStart(0, emptyArray(), emptyArray(), emptyArray(), iCallback) waitForIdleSync() verify(controller).onLaunchAnimationAborted() verify(controller).onLaunchAnimationCancelled() verify(controller, never()).onLaunchAnimationStart(anyBoolean()) } Loading Loading @@ -177,12 +177,4 @@ private class TestLaunchAnimatorController( override fun onLaunchAnimationCancelled() { assertOnMainThread() } override fun onLaunchAnimationTimedOut() { assertOnMainThread() } override fun onLaunchAnimationAborted() { assertOnMainThread() } } Loading
packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +5 −17 Original line number Diff line number Diff line Loading @@ -191,23 +191,11 @@ class ActivityLaunchAnimator(context: Context) { fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {} /** * The animation was cancelled remotely. Note that [onLaunchAnimationEnd] will still be * called after this if the animation was already started, i.e. if [onLaunchAnimationStart] * was called before the cancellation. * The animation was cancelled. Note that [onLaunchAnimationEnd] will still be called after * this if the animation was already started, i.e. if [onLaunchAnimationStart] was called * before the cancellation. */ fun onLaunchAnimationCancelled() {} /** * The remote animation was not started within the expected time. It timed out and will * never [start][onLaunchAnimationStart]. */ fun onLaunchAnimationTimedOut() {} /** * The animation was aborted because the opening window was not found. It will never * [start][onLaunchAnimationStart]. */ fun onLaunchAnimationAborted() {} } /** The state of an expandable view during an [ActivityLaunchAnimator] animation. */ Loading Loading @@ -332,7 +320,7 @@ class ActivityLaunchAnimator(context: Context) { if (window == null) { removeTimeout() invokeCallback(iCallback) controller.onLaunchAnimationAborted() controller.onLaunchAnimationCancelled() return } Loading Loading @@ -486,7 +474,7 @@ class ActivityLaunchAnimator(context: Context) { } timedOut = true controller.onLaunchAnimationTimedOut() controller.onLaunchAnimationCancelled() } override fun onAnimationCancelled() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt +0 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,6 @@ class NotificationLaunchAnimatorController( notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationTimedOut() { notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationAborted() { notificationShadeWindowViewController.setExpandAnimationRunning(false) } override fun onLaunchAnimationStart(isExpandingFullyAbove: Boolean) { notification.isExpandAnimationRunning = true notificationListContainer.setExpandingNotification(notification) Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −12 Original line number Diff line number Diff line Loading @@ -2015,9 +2015,12 @@ public class StatusBar extends SystemUI implements DemoMode, /** A launch animation was cancelled. */ //TODO: These can / should probably be moved to NotificationPresenter or ShadeController public void onLaunchAnimationCancelled() { if (!mPresenter.isCollapsing()) { public void onLaunchAnimationCancelled(boolean isLaunchForActivity) { if (mPresenter.isPresenterFullyCollapsed() && !mPresenter.isCollapsing() && isLaunchForActivity) { onClosingFinished(); } else { mShadeController.collapsePanel(true /* animate */); } } Loading @@ -2031,16 +2034,6 @@ public class StatusBar extends SystemUI implements DemoMode, } } /** A launch animation timed out. */ public void onLaunchAnimationTimedOut(boolean isLaunchForActivity) { if (mPresenter.isPresenterFullyCollapsed() && !mPresenter.isCollapsing() && isLaunchForActivity) { onClosingFinished(); } else { mShadeController.collapsePanel(true /* animate */); } } /** Whether we should animate an activity launch. */ public boolean areLaunchAnimationsEnabled() { // TODO(b/184121838): Support lock screen launch animations. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +1 −11 Original line number Diff line number Diff line Loading @@ -43,16 +43,6 @@ class StatusBarLaunchAnimatorController( override fun onLaunchAnimationCancelled() { delegate.onLaunchAnimationCancelled() statusBar.onLaunchAnimationCancelled() } override fun onLaunchAnimationTimedOut() { delegate.onLaunchAnimationTimedOut() statusBar.onLaunchAnimationTimedOut(isLaunchForActivity) } override fun onLaunchAnimationAborted() { delegate.onLaunchAnimationAborted() statusBar.collapsePanelOnMainThread() statusBar.onLaunchAnimationCancelled(isLaunchForActivity) } } No newline at end of file
packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +2 −10 Original line number Diff line number Diff line Loading @@ -106,12 +106,12 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { } @Test fun abortsIfNoOpeningWindowIsFound() { fun cancelsIfNoOpeningWindowIsFound() { val runner = activityLaunchAnimator.createRunner(controller) runner.onAnimationStart(0, emptyArray(), emptyArray(), emptyArray(), iCallback) waitForIdleSync() verify(controller).onLaunchAnimationAborted() verify(controller).onLaunchAnimationCancelled() verify(controller, never()).onLaunchAnimationStart(anyBoolean()) } Loading Loading @@ -177,12 +177,4 @@ private class TestLaunchAnimatorController( override fun onLaunchAnimationCancelled() { assertOnMainThread() } override fun onLaunchAnimationTimedOut() { assertOnMainThread() } override fun onLaunchAnimationAborted() { assertOnMainThread() } }