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

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

Fixed a bug where redacted notifications had the wrong height

When redacted notifications were added on the lockscreen,
it's size might have been incorrect sometimes.

Bug: 22235304
Change-Id: I30f665bc8e725cdd40a20051e995b10e77f96918
parent 4daf600e
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -1763,6 +1763,7 @@ public class NotificationStackScrollLayout extends ViewGroup
    }
    }


    private void onViewAddedInternal(View child) {
    private void onViewAddedInternal(View child) {
        updateHideSensitiveForChild(child);
        mStackScrollAlgorithm.notifyChildrenChanged(this);
        mStackScrollAlgorithm.notifyChildrenChanged(this);
        ((ExpandableView) child).setOnHeightChangedListener(this);
        ((ExpandableView) child).setOnHeightChangedListener(this);
        generateAddAnimation(child, false /* fromMoreCard */);
        generateAddAnimation(child, false /* fromMoreCard */);
@@ -1775,6 +1776,13 @@ public class NotificationStackScrollLayout extends ViewGroup
        }
        }
    }
    }


    private void updateHideSensitiveForChild(View child) {
        if (mAmbientState.isHideSensitive() && child instanceof ExpandableView) {
            ExpandableView expandableView = (ExpandableView) child;
            expandableView.setHideSensitiveForIntrinsicHeight(true);
        }
    }

    public void notifyGroupChildRemoved(View row) {
    public void notifyGroupChildRemoved(View row) {
        onViewRemovedInternal(row);
        onViewRemovedInternal(row);
    }
    }