[Notif] Allow locking importance on notification
Currently locking only works on channel - this CL allows doing
so on the overarching notification too. Added locking field in
appropriate places in record and surfaced it to other bits via
the RankingHelper.
Test: Visually, reproduced organically (+ deleting /data/ files)
Fixes: 77775657
Change-Id: Ie46093921dd6c1ae3533ded7b87faaa475a631e4
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
index 81dd9e8..8062064 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
@@ -523,7 +523,7 @@
} else {
// For notifications with more than one channel, update notification enabled
// state. If the importance was lowered, we disable notifications.
- mINotificationManager.setNotificationsEnabledForPackage(
+ mINotificationManager.setNotificationsEnabledWithImportanceLockForPackage(
mPackageName, mAppUid, mNewImportance >= mCurrentImportance);
}
} catch (RemoteException e) {