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

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

Fixed a group bug with a single expanded child

On the lockscreen the child wasn't expanded visually
when expanding the group.

Bug: 27419554
Change-Id: I5f191216d8736657099aa1a40ccc4a331b317d67
parent 43d30f03
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1023,7 +1023,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
     * @return whether the view state is currently expanded.
     */
    public boolean isExpanded() {
        return !mOnKeyguard
        return isExpanded(false /* allowOnKeyguard */);
    }

    public boolean isExpanded(boolean allowOnKeyguard) {
        return (!mOnKeyguard || allowOnKeyguard)
                && (!hasUserChangedExpansion() && (isSystemExpanded() || isSystemChildExpanded())
                || isUserExpanded());
    }
+3 −2
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ public class NotificationContentView extends FrameLayout {
    private int calculateVisibleType() {
        if (mUserExpanding) {
            int height = !mIsChildInGroup || isGroupExpanded()
                    || mContainingNotification.isExpanded()
                    || mContainingNotification.isExpanded(true /* allowOnKeyguard */)
                    ? mContainingNotification.getMaxContentHeight()
                    : mContainingNotification.getShowingLayout().getMinHeight();
            if (height == 0) {
@@ -588,7 +588,8 @@ public class NotificationContentView extends FrameLayout {
            }
        } else {
            if (noExpandedChild || (viewHeight <= mContractedChild.getHeight()
                    && (!mIsChildInGroup || !mContainingNotification.isExpanded()))) {
                    && (!mIsChildInGroup
                            || !mContainingNotification.isExpanded(true /* allowOnKeyguard */)))) {
                return VISIBLE_TYPE_CONTRACTED;
            } else {
                return VISIBLE_TYPE_EXPANDED;
+2 −2
Original line number Diff line number Diff line
@@ -511,7 +511,7 @@ public class NotificationChildrenContainer extends ViewGroup {
                break;
            }
            ExpandableNotificationRow child = mChildren.get(i);
            float childHeight = child.isExpanded()
            float childHeight = child.isExpanded(true /* allowOnKeyguard */)
                    ? child.getMaxExpandHeight()
                    : child.getShowingLayout().getMinHeight(true /* likeGroupExpanded */);
            maxContentHeight += childHeight;
@@ -532,7 +532,7 @@ public class NotificationChildrenContainer extends ViewGroup {
        int childCount = mChildren.size();
        for (int i = 0; i < childCount; i++) {
            ExpandableNotificationRow child = mChildren.get(i);
            float childHeight = child.isExpanded()
            float childHeight = child.isExpanded(true /* allowOnKeyguard */)
                    ? child.getMaxExpandHeight()
                    : child.getShowingLayout().getMinHeight(true /* likeGroupExpanded */);
            float singleLineHeight = child.getShowingLayout().getMinHeight(