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

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

Fixed a bug where the single line view would be invisible

When updating a child notification, the single line view was
removed leading to invisible group children.

Bug: 27137268
Change-Id: Id9e6ce2ae081ec746118f4367644ea8843d51f10
parent 3362c130
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -527,6 +527,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
            mGuts.setVisibility(oldGuts.getVisibility());
            mGuts.setVisibility(oldGuts.getVisibility());
            addView(mGuts, index);
            addView(mGuts, index);
        }
        }
        mPrivateLayout.reInflateViews();
        mPublicLayout.reInflateViews();
    }
    }


    public interface ExpansionLogger {
    public interface ExpansionLogger {
+14 −1
Original line number Original line Diff line number Diff line
@@ -248,14 +248,16 @@ public class NotificationContentView extends FrameLayout {
    public void reset(boolean resetActualHeight) {
    public void reset(boolean resetActualHeight) {
        if (mContractedChild != null) {
        if (mContractedChild != null) {
            mContractedChild.animate().cancel();
            mContractedChild.animate().cancel();
            removeView(mContractedChild);
        }
        }
        if (mExpandedChild != null) {
        if (mExpandedChild != null) {
            mExpandedChild.animate().cancel();
            mExpandedChild.animate().cancel();
            removeView(mExpandedChild);
        }
        }
        if (mHeadsUpChild != null) {
        if (mHeadsUpChild != null) {
            mHeadsUpChild.animate().cancel();
            mHeadsUpChild.animate().cancel();
            removeView(mHeadsUpChild);
        }
        }
        removeAllViews();
        mContractedChild = null;
        mContractedChild = null;
        mExpandedChild = null;
        mExpandedChild = null;
        mHeadsUpChild = null;
        mHeadsUpChild = null;
@@ -569,6 +571,9 @@ public class NotificationContentView extends FrameLayout {
        if (mIsChildInGroup) {
        if (mIsChildInGroup) {
            mSingleLineView = mHybridViewManager.bindFromNotification(
            mSingleLineView = mHybridViewManager.bindFromNotification(
                    mSingleLineView, mStatusBarNotification.getNotification());
                    mSingleLineView, mStatusBarNotification.getNotification());
        } else if (mSingleLineView != null) {
            removeView(mSingleLineView);
            mSingleLineView = null;
        }
        }
    }
    }


@@ -685,4 +690,12 @@ public class NotificationContentView extends FrameLayout {
    public void requestSelectLayout(boolean needsAnimation) {
    public void requestSelectLayout(boolean needsAnimation) {
        selectLayout(needsAnimation, false);
        selectLayout(needsAnimation, false);
    }
    }

    public void reInflateViews() {
        if (mIsChildInGroup && mSingleLineView != null) {
            removeView(mSingleLineView);
            mSingleLineView = null;
            updateSingleLineView();
        }
    }
}
}