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

Commit 9f186645 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where the notification could be blank

Because we were changing the visible type but not actually
making it visible, the view could remain blank for a while
until another layout selection came in.

Change-Id: Ica5a5ff806311429883c0a0212e33efccfd8d460
Fixes: 117272628
Test: Add headsup , ambient and let them time out, observe regular notifications
parent ab4a8d2e
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -492,12 +492,12 @@ public class NotificationContentView extends FrameLayout {
        if (child == null) {
            mExpandedChild = null;
            mExpandedWrapper = null;
            if (mVisibleType == VISIBLE_TYPE_EXPANDED) {
                mVisibleType = VISIBLE_TYPE_CONTRACTED;
            }
            if (mTransformationStartVisibleType == VISIBLE_TYPE_EXPANDED) {
                mTransformationStartVisibleType = UNDEFINED;
            }
            if (mVisibleType == VISIBLE_TYPE_EXPANDED) {
                selectLayout(false /* animate */, true /* force */);
            }
            return;
        }
        addView(child);
@@ -530,12 +530,12 @@ public class NotificationContentView extends FrameLayout {
        if (child == null) {
            mHeadsUpChild = null;
            mHeadsUpWrapper = null;
            if (mVisibleType == VISIBLE_TYPE_HEADSUP) {
                mVisibleType = VISIBLE_TYPE_CONTRACTED;
            }
            if (mTransformationStartVisibleType == VISIBLE_TYPE_HEADSUP) {
                mTransformationStartVisibleType = UNDEFINED;
            }
            if (mVisibleType == VISIBLE_TYPE_HEADSUP) {
                selectLayout(false /* animate */, true /* force */);
            }
            return;
        }
        addView(child);
@@ -557,12 +557,12 @@ public class NotificationContentView extends FrameLayout {
        if (child == null) {
            mAmbientChild = null;
            mAmbientWrapper = null;
            if (mVisibleType == VISIBLE_TYPE_AMBIENT) {
                mVisibleType = VISIBLE_TYPE_CONTRACTED;
            }
            if (mTransformationStartVisibleType == VISIBLE_TYPE_AMBIENT) {
                mTransformationStartVisibleType = UNDEFINED;
            }
            if (mVisibleType == VISIBLE_TYPE_AMBIENT) {
                selectLayout(false /* animate */, true /* force */);
            }
            return;
        }
        addView(child);