From c1dcf4b2523afdd57c44ab04f25f522a2e2c1454 Mon Sep 17 00:00:00 2001 From: Luca Zuccarini Date: Thu, 19 Jan 2023 11:21:17 +0000 Subject: [PATCH] Introduce defaults to ActivityLaunchAnimator.Callback. This way usages that are never on keyguard require less boilerplate. Bug: 250588519 Test: N/A Change-Id: Ib9d77fab991635fc8a3e997aefb5c79b034ebd72 --- .../android/systemui/animation/ActivityLaunchAnimator.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index 8f70dcc022898..c729b09628af0 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -301,10 +301,13 @@ class ActivityLaunchAnimator( interface Callback { /** Whether we are currently on the keyguard or not. */ - fun isOnKeyguard(): Boolean + @JvmDefault fun isOnKeyguard(): Boolean = false /** Hide the keyguard and animate using [runner]. */ - fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) + @JvmDefault + fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) { + throw UnsupportedOperationException() + } /* Get the background color of [task]. */ fun getBackgroundColor(task: TaskInfo): Int