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

Commit 6e6d893e authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Ensure a publicVersion with MessagingStyle can inherit the conversationType of the private version.

Change-Id: Id3c6171b7f51f67acaed45d9dfb527a183378a33
Flag: EXEMPT bugfix
Test: post with sample app
Fixes: 383165068
parent d0b8249b
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -6938,6 +6938,12 @@ public class Notification implements Parcelable
        public RemoteViews makePublicContentView(boolean isLowPriority) {
        public RemoteViews makePublicContentView(boolean isLowPriority) {
            if (mN.publicVersion != null) {
            if (mN.publicVersion != null) {
                final Builder builder = recoverBuilder(mContext, mN.publicVersion);
                final Builder builder = recoverBuilder(mContext, mN.publicVersion);
                // copy non-sensitive style fields to the public style
                if (mStyle instanceof Notification.MessagingStyle privateStyle) {
                    if (builder.mStyle instanceof Notification.MessagingStyle publicStyle) {
                        publicStyle.mConversationType = privateStyle.mConversationType;
                    }
                }
                return builder.createContentView();
                return builder.createContentView();
            }
            }
            Bundle savedBundle = mN.extras;
            Bundle savedBundle = mN.extras;