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

Commit ac5b7586 authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Encapsulate background width updates to ActivatableNotificationView"...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17205159

Change-Id: I8a649a173ebda5247094326eafef233d3504fcd9
parents 6f374c26 da824133
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