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

Commit eccf494a authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where group children had rounded corners

Children that were close to the clipping boundary before
were not being reset when they were added as a child.
This could happen with auto groups when collapsed or
with heads up notifications.

Change-Id: I873b65da6778840c4542b4324f69d2ec9b5c1dc5
Fixes: 80276391
Test: add autobundleable children while collapsed, observe no corners
parent c0797c85
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -710,6 +710,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        updateClickAndFocus();
        if (mNotificationParent != null) {
            setOverrideTintColor(NO_COLOR, 0.0f);
            // Let's reset the distance to top roundness, as this isn't applied to group children
            setDistanceToTopRoundness(NO_ROUNDNESS);
            mNotificationParent.updateBackgroundForGroupState();
        }
        updateIconVisibilities();
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import java.util.ArrayList;
 */
public abstract class ExpandableView extends FrameLayout {

    public static final float NO_ROUNDNESS = -1;
    protected OnHeightChangedListener mOnHeightChangedListener;
    private int mActualHeight;
    protected int mClipTopAmount;
+2 −1
Original line number Diff line number Diff line
@@ -775,7 +775,8 @@ public class NotificationStackScrollLayout extends ViewGroup
            boolean clip = clipStart > start && clipStart < end
                    || clipEnd >= start && clipEnd <= end;
            clip &= !(first && mOwnScrollY == 0);
            child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0) : -1);
            child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0)
                    : ExpandableView.NO_ROUNDNESS);
            first = false;
        }
    }