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

Commit dedaea4d authored by Steve Elliott's avatar Steve Elliott Committed by Automerger Merge Worker
Browse files

Merge "Fix missing icon for one-to-one convos" into rvc-dev am: 05e10b59 am: ce90e803

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11727185

Change-Id: I1d93efacf55222a5f6c1ed2727d007593ad68e0e
parents 810612fb ce90e803
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -7625,7 +7625,6 @@ public class Notification implements Parcelable
            }
            boolean isConversationLayout = mConversationType != CONVERSATION_TYPE_LEGACY;
            boolean isImportantConversation = mConversationType == CONVERSATION_TYPE_IMPORTANT;
            Icon conversationIcon = mShortcutIcon;
            Icon largeIcon = mBuilder.mN.mLargeIcon;
            TemplateBindResult bindResult = new TemplateBindResult();
            StandardTemplateParams p = mBuilder.mParams.reset()
@@ -7671,7 +7670,7 @@ public class Notification implements Parcelable
                    "setConversationTitle", conversationTitle);
            if (isConversationLayout) {
                contentView.setIcon(R.id.status_bar_latest_event_content,
                        "setConversationIcon", conversationIcon);
                        "setShortcutIcon", mShortcutIcon);
                contentView.setBoolean(R.id.status_bar_latest_event_content,
                        "setIsImportantConversation", isImportantConversation);
            }
+17 −18
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ public class ConversationLayout extends FrameLayout
    private Rect mAppOpsTouchRect = new Rect();
    private float mMinTouchSize;
    private Icon mConversationIcon;
    private Icon mShortcutIcon;
    private View mAppNameDivider;

    public ConversationLayout(@NonNull Context context) {
@@ -465,10 +466,9 @@ public class ConversationLayout extends FrameLayout
    private void updateConversationLayout() {
        // Set avatar and name
        CharSequence conversationText = mConversationTitle;
        mConversationIcon = mShortcutIcon;
        if (mIsOneToOne) {
            // Let's resolve the icon / text from the last sender
            mConversationIconView.setVisibility(VISIBLE);
            mConversationFacePile.setVisibility(GONE);
            CharSequence userKey = getKey(mUser);
            for (int i = mGroups.size() - 1; i >= 0; i--) {
                MessagingGroup messagingGroup = mGroups.get(i);
@@ -490,11 +490,11 @@ public class ConversationLayout extends FrameLayout
                    break;
                }
            }
        } else {
            if (mConversationIcon == null && mLargeIcon != null) {
        }
        if (mConversationIcon == null) {
            mConversationIcon = mLargeIcon;
        }
            if (mConversationIcon != null) {
        if (mIsOneToOne || mConversationIcon != null) {
            mConversationIconView.setVisibility(VISIBLE);
            mConversationFacePile.setVisibility(GONE);
            mConversationIconView.setImageIcon(mConversationIcon);
@@ -506,7 +506,6 @@ public class ConversationLayout extends FrameLayout
            mConversationFacePile = findViewById(R.id.conversation_face_pile);
            bindFacePile();
        }
        }
        if (TextUtils.isEmpty(conversationText)) {
            conversationText = mIsOneToOne ? mFallbackChatName : mFallbackGroupChatName;
        }
@@ -712,7 +711,7 @@ public class ConversationLayout extends FrameLayout
    }

    @RemotableViewMethod
    public void setConversationIcon(Icon conversationIcon) {
    public void setShortcutIcon(Icon conversationIcon) {
        mConversationIcon = conversationIcon;
    }