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

Commit 8028dc94 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Made sure that the media section has no background" into rvc-dev am:...

Merge "Made sure that the media section has no background" into rvc-dev am: 0c5fe51a am: 785bfbf4

Change-Id: Id913ba9d9180eebbb59ac3b1143b1e9628a75c48
parents cf2e2635 785bfbf4
Loading
Loading
Loading
Loading
+1 −22
Original line number Diff line number Diff line
@@ -24,25 +24,4 @@
    android:paddingEnd="0dp"
    android:focusable="true"
    android:clickable="true"
>

    <!-- Background views required by ActivatableNotificationView. -->
    <com.android.systemui.statusbar.notification.row.NotificationBackgroundView
        android:id="@+id/backgroundNormal"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    />

    <com.android.systemui.statusbar.notification.row.NotificationBackgroundView
        android:id="@+id/backgroundDimmed"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
/>

    <com.android.systemui.statusbar.notification.FakeShadowView
        android:id="@+id/fake_shadow"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    />

</com.android.systemui.statusbar.notification.stack.MediaHeaderView>
+5 −12
Original line number Diff line number Diff line
@@ -123,8 +123,6 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
    private float mAppearAnimationFraction = -1.0f;
    private float mAppearAnimationTranslation;
    private int mNormalColor;
    private boolean mLastInSection;
    private boolean mFirstInSection;
    private boolean mIsBelowSpeedBump;

    private float mNormalBackgroundVisibilityAmount;
@@ -430,27 +428,21 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
        mBackgroundDimmed.setDistanceToTopRoundness(distanceToTopRoundness);
    }

    public boolean isLastInSection() {
        return mLastInSection;
    }

    public boolean isFirstInSection() {
        return mFirstInSection;
    }

    /** Sets whether this view is the last notification in a section. */
    @Override
    public void setLastInSection(boolean lastInSection) {
        if (lastInSection != mLastInSection) {
            mLastInSection = lastInSection;
            super.setLastInSection(lastInSection);
            mBackgroundNormal.setLastInSection(lastInSection);
            mBackgroundDimmed.setLastInSection(lastInSection);
        }
    }

    /** Sets whether this view is the first notification in a section. */
    @Override
    public void setFirstInSection(boolean firstInSection) {
        if (firstInSection != mFirstInSection) {
            mFirstInSection = firstInSection;
            super.setFirstInSection(firstInSection);
            mBackgroundNormal.setFirstInSection(firstInSection);
            mBackgroundDimmed.setFirstInSection(firstInSection);
        }
@@ -963,6 +955,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
        return false;
    }

    @Override
    public int getHeadsUpHeightWithoutHeader() {
        return getHeight();
    }
+2 −8
Original line number Diff line number Diff line
@@ -262,10 +262,7 @@ public abstract class ExpandableOutlineView extends ExpandableView {
        setClipToOutline(mAlwaysRoundBothCorners);
    }

    /**
     * Set the topRoundness of this view.
     * @return Whether the roundness was changed.
     */
    @Override
    public boolean setTopRoundness(float topRoundness, boolean animate) {
        if (mTopRoundness != topRoundness) {
            mTopRoundness = topRoundness;
@@ -302,10 +299,7 @@ public abstract class ExpandableOutlineView extends ExpandableView {
        return mCurrentBottomRoundness * mOutlineRadius;
    }

    /**
     * Set the bottom roundness of this view.
     * @return Whether the roundness was changed.
     */
    @Override
    public boolean setBottomRoundness(float bottomRoundness, boolean animate) {
        if (mBottomRoundness != bottomRoundness) {
            mBottomRoundness = bottomRoundness;
+40 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable {
    protected int mContentShift;
    private final ExpandableViewState mViewState;
    private float mContentTranslation;
    protected boolean mLastInSection;
    protected boolean mFirstInSection;

    public ExpandableView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -771,6 +773,44 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable {
        return true;
    }

    /** Sets whether this view is the first notification in a section. */
    public void setFirstInSection(boolean firstInSection) {
        mFirstInSection = firstInSection;
    }

    /** Sets whether this view is the last notification in a section. */
    public void setLastInSection(boolean lastInSection) {
        mLastInSection = lastInSection;
    }

    public boolean isLastInSection() {
        return mLastInSection;
    }

    public boolean isFirstInSection() {
        return mFirstInSection;
    }

    /**
     * Set the topRoundness of this view.
     * @return Whether the roundness was changed.
     */
    public boolean setTopRoundness(float topRoundness, boolean animate) {
        return false;
    }

    /**
     * Set the bottom roundness of this view.
     * @return Whether the roundness was changed.
     */
    public boolean setBottomRoundness(float bottomRoundness, boolean animate) {
        return false;
    }

    public int getHeadsUpHeightWithoutHeader() {
        return getHeight();
    }

    /**
     * A listener notifying when {@link #getActualHeight} changes.
     */
+3 −3
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class AmbientState {
    private int mZDistanceBetweenElements;
    private int mBaseZHeight;
    private int mMaxLayoutHeight;
    private ActivatableNotificationView mLastVisibleBackgroundChild;
    private ExpandableView mLastVisibleBackgroundChild;
    private float mCurrentScrollVelocity;
    private int mStatusBarState;
    private float mExpandingVelocity;
@@ -346,11 +346,11 @@ public class AmbientState {
     * view in the shade, without the clear all button.
     */
    public void setLastVisibleBackgroundChild(
            ActivatableNotificationView lastVisibleBackgroundChild) {
            ExpandableView lastVisibleBackgroundChild) {
        mLastVisibleBackgroundChild = lastVisibleBackgroundChild;
    }

    public ActivatableNotificationView getLastVisibleBackgroundChild() {
    public ExpandableView getLastVisibleBackgroundChild() {
        return mLastVisibleBackgroundChild;
    }

Loading