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

Commit 27bd15b4 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Prevent null conversationTitle

If a messaging notification doesn't have any messages from a sender that doesn't match the user, conversationTitle ends up being null, which can look bad.

Fix: 405025915
Test: manual, with a missed call conversation
Flag: android.app.notifications_redesign_templates
Change-Id: Ia3f83f040d034140d95c7f15f313863d7aa59609
parent 0ded5d19
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -9757,7 +9757,11 @@ public class Notification implements Parcelable
                    return sender.getName();
                }
            }
            return null;
            // If we've reached this point without finding a sender that doesn't match the user, it
            // likely points to an incorrect use of our API, where the user isn't being set
            // correctly. It's either that, or perhaps the user actually is having a conversation
            // with themselves ¯\_(ツ)_/¯ so let's not leave the name empty.
            return notificationsRedesignTemplates() ? mUser.getName() : null;
        }
        private boolean hasOnlyWhiteSpaceSenders() {