From 8b883c1f488c21fa6b12220b2d43ab73066f6ec0 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Fri, 29 Apr 2022 14:56:42 -0400 Subject: [PATCH] Disable smartspace transition on tablet. Bug: 197636887 Test: on tablet, no shared element Change-Id: I61515f379b019f24109baea5a3c9d28f618eeb47 --- .../systemui/keyguard/KeyguardUnlockAnimationController.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index b21a886b037d8..fb09132684ebc 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -38,6 +38,7 @@ import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.plugins.BcSmartspaceDataPlugin +import com.android.systemui.shared.recents.utilities.Utilities import com.android.systemui.shared.system.ActivityManagerWrapper import com.android.systemui.shared.system.QuickStepContract import com.android.systemui.shared.system.smartspace.ILauncherUnlockAnimationController @@ -819,6 +820,12 @@ class KeyguardUnlockAnimationController @Inject constructor( return false } + // We don't do the shared element on tablets because they're large and the smartspace has to + // fly across large distances, which is distracting. + if (Utilities.isTablet(context)) { + return false + } + return true }