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

Commit 9ae59f80 authored by Aaron Heuckroth's avatar Aaron Heuckroth Committed by Julia Reynolds
Browse files

Prevent default channel inheritance when other channels exist.

Test: runtest systemui-notification
Change-Id: Ib9216562c2cdc5c26f6920b2b7ada1f1e68d55ab
parent 148cd8c0
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -582,16 +582,15 @@ public class PreferencesHelper implements RankingConfig {
            updatedChannel.setLockscreenVisibility(
                    NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE);
        }
        if (!fromUser) {
            updatedChannel.unlockFields(updatedChannel.getUserLockedFields());
        }
        if (fromUser) {
            updatedChannel.lockFields(channel.getUserLockedFields());
            lockFieldsForUpdate(channel, updatedChannel);
        } else {
            updatedChannel.unlockFields(updatedChannel.getUserLockedFields());
        }
        r.channels.put(updatedChannel.getId(), updatedChannel);

        if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(updatedChannel.getId())) {
        if (onlyHasDefaultChannel(pkg, uid)) {
            // copy settings to app level so they are inherited by new channels
            // when the app migrates
            r.importance = updatedChannel.getImportance();
+354 −306

File changed.

Preview size limit exceeded, changes collapsed.