From d2dcd46518d7e68fa4d27f858d711f64ebd62765 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Fri, 20 Mar 2020 17:18:52 -0700 Subject: Fixed an issue where the largeIcon wouldn't be shown for non-shortcuts We should only use the shortcut icon if it's available Bug: 150905003 Test: add group message from Notify with largeIcon Change-Id: Icd5b0991b34fbfb517344cc6c908a2588973cdca --- core/java/android/app/Notification.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/java/android/app/Notification.java') diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index b58a85e9b985..36898ec922d0 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -7585,7 +7585,9 @@ public class Notification implements Parcelable } boolean isConversationLayout = mConversationType != CONVERSATION_TYPE_LEGACY; boolean isImportantConversation = mConversationType == CONVERSATION_TYPE_IMPORTANT; - Icon largeIcon = isConversationLayout ? mShortcutIcon : mBuilder.mN.mLargeIcon; + Icon largeIcon = isConversationLayout && mShortcutIcon != null + ? mShortcutIcon + : mBuilder.mN.mLargeIcon; TemplateBindResult bindResult = new TemplateBindResult(); StandardTemplateParams p = mBuilder.mParams.reset() .hasProgress(false) -- cgit v1.2.3