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

Commit da824133 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge "Encapsulate background width updates to ActivatableNotificationView" into tm-dev

parents 0d1d776e 1e9d3043
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -226,10 +226,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
                ? MathUtils.lerp(shortestWidth, getWidth(), fractionToShade)
                : getWidth();
        ActivatableNotificationView anv = (ActivatableNotificationView) this;
        NotificationBackgroundView bg = anv.getBackgroundNormal();
        if (bg != null) {
            anv.getBackgroundNormal().setActualWidth((int) actualWidth);
        }
        anv.setBackgroundWidth((int) actualWidth);
        if (mShelfIcons != null) {
            mShelfIcons.setActualLayoutWidth((int) actualWidth);
        }
+6 −3
Original line number Diff line number Diff line
@@ -163,10 +163,13 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
    }

    /**
     * @return The background of this view.
     * @param width The actual width to apply to the background view.
     */
    public NotificationBackgroundView getBackgroundNormal() {
        return mBackgroundNormal;
    public void setBackgroundWidth(int width) {
        if (mBackgroundNormal == null) {
            return;
        }
        mBackgroundNormal.setActualWidth(width);
    }

    @Override