Allow updates to importance of default apps

As long as it's not IMPORTANCE_NONE

Test: manual
    1. Messages app > Settings > Notifications
    2. Change behavior from Prioritized to Gentle
    3. Back
    4. Click on Notifications again
    5. Observe: setting was changed to Gentle
Test: atest PreferencesHelperTest
Fixes: 131893709
Change-Id: I1710435e9dfa741b14a8de3da07bff1d17e884b8
diff --git a/services/core/java/com/android/server/notification/PreferencesHelper.java b/services/core/java/com/android/server/notification/PreferencesHelper.java
index 3f1a248..0804a73 100644
--- a/services/core/java/com/android/server/notification/PreferencesHelper.java
+++ b/services/core/java/com/android/server/notification/PreferencesHelper.java
@@ -736,7 +736,8 @@
             }
             updatedChannel.setImportanceLockedByCriticalDeviceFunction(
                     r.defaultAppLockedImportance);
-            if (updatedChannel.isImportanceLockedByCriticalDeviceFunction()) {
+            if (updatedChannel.isImportanceLockedByCriticalDeviceFunction()
+                    && updatedChannel.getImportance() == IMPORTANCE_NONE) {
                 updatedChannel.setImportance(channel.getImportance());
             }