[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/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 5067e19..5461c0c 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -54,6 +54,13 @@
     void setShowBadge(String pkg, int uid, boolean showBadge);
     boolean canShowBadge(String pkg, int uid);
     void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled);
+    /**
+     * Updates the notification's enabled state. Additionally locks importance for all of the
+     * notifications belonging to the app, such that future notifications aren't reconsidered for
+     * blocking helper.
+     */
+    void setNotificationsEnabledWithImportanceLockForPackage(String pkg, int uid, boolean enabled);
+
     boolean areNotificationsEnabledForPackage(String pkg, int uid);
     boolean areNotificationsEnabled(String pkg);
     int getPackageImportance(String pkg);