Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c3248c4 authored by Lyn Han's avatar Lyn Han
Browse files

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
parent 7315b727
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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();
    }