From 4c3248c4b0c5fd40294e941a6ddc646adc906f0e Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Mon, 7 Feb 2022 19:40:06 -0600 Subject: [PATCH] Enable short shelf for split shade Bug: 213480466 Test: NotificationShelfTest Test: swipe down on lockscreen notifications, let go => short shelf expands, retracts width Test: swipe down on lockscreen notifications to go to unlocked shade => short shelf expands to full width Test: expand notification on lockscreen => short shelf expands to full width as shade opens Test: tap hidden/visible part of shelf => only visible part of shelf launches full shade Test: the above in LTR/RTL Change-Id: I3f7d488531be3af544a41f4fab496b3ccc137f24 --- .../com/android/systemui/statusbar/NotificationShelf.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 3411eab23d63b..ff9fc30768b19 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -86,7 +86,6 @@ public class NotificationShelf extends ActivatableNotificationView implements private float mCornerAnimationDistance; private NotificationShelfController mController; private int mActualWidth = -1; - private boolean mUseSplitShade; /** Fraction of lockscreen to shade animation (on lockscreen swipe down). */ private float mFractionToShade; @@ -138,9 +137,6 @@ public class NotificationShelf extends ActivatableNotificationView implements mCornerAnimationDistance = res.getDimensionPixelSize( R.dimen.notification_corner_animation_distance); - // TODO(b/213480466) enable short shelf on split shade - mUseSplitShade = Utils.shouldUseSplitNotificationShade(mContext.getResources()); - mShelfIcons.setInNotificationIconShelf(true); if (!mShowNotificationShelf) { setVisibility(GONE); @@ -233,7 +229,7 @@ public class NotificationShelf extends ActivatableNotificationView implements */ @VisibleForTesting public void updateStateWidth(ShelfState shelfState, float fraction, int shortestWidth) { - shelfState.actualWidth = !mUseSplitShade && mAmbientState.isOnKeyguard() + shelfState.actualWidth = mAmbientState.isOnKeyguard() ? (int) MathUtils.lerp(shortestWidth, getWidth(), fraction) : getWidth(); }