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

Commit d14aac5e authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[NotificationContentView] fallback to available view" into main

parents 27381dc1 f8d9f0a6
Loading
Loading
Loading
Loading
+26 −13
Original line number Diff line number Diff line
@@ -1240,7 +1240,14 @@ public class NotificationContentView extends FrameLayout implements Notification
                height = mContentHeight;
            }
            int expandedVisualType = getVisualTypeForHeight(height);
            int collapsedVisualType = mIsChildInGroup && !isGroupExpanded()
            final boolean shouldShowSingleLineView = mIsChildInGroup && !isGroupExpanded();
            final boolean isSingleLineViewPresent = mSingleLineView != null;

            if (shouldShowSingleLineView && !isSingleLineViewPresent) {
                Log.wtf(TAG, "calculateVisibleType: SingleLineView is not available!");
            }

            final int collapsedVisualType = shouldShowSingleLineView && isSingleLineViewPresent
                    ? VISIBLE_TYPE_SINGLELINE
                    : getVisualTypeForHeight(mContainingNotification.getCollapsedHeight());
            return mTransformationStartVisibleType == collapsedVisualType
@@ -1261,7 +1268,13 @@ public class NotificationContentView extends FrameLayout implements Notification
        if (!noExpandedChild && viewHeight == getViewHeight(VISIBLE_TYPE_EXPANDED)) {
            return VISIBLE_TYPE_EXPANDED;
        }
        if (!mUserExpanding && mIsChildInGroup && !isGroupExpanded()) {
        final boolean shouldShowSingleLineView = mIsChildInGroup && !isGroupExpanded();
        final boolean isSingleLinePresent =  mSingleLineView != null;
        if (shouldShowSingleLineView && !isSingleLinePresent) {
            Log.wtf(TAG, "getVisualTypeForHeight: singleLineView is not available.");
        }

        if (!mUserExpanding && shouldShowSingleLineView && isSingleLinePresent) {
            return VISIBLE_TYPE_SINGLELINE;
        }