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

Commit c646db1f authored by Yuri Lin's avatar Yuri Lin
Browse files

Only clone channel when necessary

Bug: 425047288
Test: abtd
Flag: android.app.notification_classification_ui
Change-Id: I4592fb041100717ebad711ff538ac9d32a8df6cf
parent df017879
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12228,7 +12228,7 @@ public class NotificationManagerService extends SystemService {
                    smartReplies = null;
                }
            }
            NotificationChannel effectiveChannel = record.getChannel().copy();
            NotificationChannel effectiveChannel = record.getChannel();
            if (notificationClassificationUi()) {
                // special handling for a notification's channel visibility when bundled: if the
                // notification's original channel had a more strict visibility than the current
@@ -12238,6 +12238,7 @@ public class NotificationManagerService extends SystemService {
                    int currentChannelVis = record.getChannel().getLockscreenVisibility();
                    if (currentChannelVis == VISIBILITY_NO_OVERRIDE
                            || record.getOriginalChannelVisibility() < currentChannelVis) {
                        effectiveChannel = record.getChannel().copy();
                        effectiveChannel.setLockscreenVisibility(
                                record.getOriginalChannelVisibility());
                    }