Loading core/res/res/values/lineage_config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,7 @@ <!-- The list of components which should be forced to be enabled. --> <string-array name="config_forceEnabledComponents" translatable="false"> </string-array> <!-- Component names of the packages to force allow notification permissions --> <string name="config_forceNotificationPermission" translatable="false">foundation.e.blisslauncher</string> </resources> core/res/res/values/lineage_symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -25,4 +25,5 @@ <java-symbol type="array" name="config_deviceDisabledComponents" /> <java-symbol type="array" name="config_globallyDisabledComponents" /> <java-symbol type="array" name="config_forceEnabledComponents" /> <java-symbol type="string" name="config_forceNotificationPermission" /> </resources> services/core/java/com/android/server/notification/NotificationManagerService.java +25 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,7 @@ public class NotificationManagerService extends SystemService { if (DBG) Slog.d(TAG, "loadPolicyFile"); synchronized (mPolicyFile) { InputStream infile = null; mListeners.loadForceNotificationEnabledServices(); try { infile = mPolicyFile.openRead(); readPolicyXml(infile, false /*forRestore*/, UserHandle.USER_ALL); Loading Loading @@ -9564,6 +9565,30 @@ public class NotificationManagerService extends SystemService { } } protected void loadForceNotificationEnabledServices() { String forceEnabledPackages = mContext.getResources().getString( R.string.config_forceNotificationPermission); if (forceEnabledPackages != null) { String[] packages = forceEnabledPackages.split(ManagedServices.ENABLED_SERVICES_SEPARATOR); for (int i = 0; i < packages.length; i++) { if (TextUtils.isEmpty(packages[i])) { continue; } ArraySet<ComponentName> approvedListeners = this.queryPackageForServices(listeners[i], MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, USER_SYSTEM); for (int k = 0; k < approvedListeners.size(); k++) { ComponentName cn = approvedListeners.valueAt(k); addDefaultComponentOrPackage(cn.flattenToString()); } } } } @Override protected int getBindFlags() { // Most of the same flags as the base, but also add BIND_NOT_PERCEPTIBLE Loading Loading
core/res/res/values/lineage_config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,7 @@ <!-- The list of components which should be forced to be enabled. --> <string-array name="config_forceEnabledComponents" translatable="false"> </string-array> <!-- Component names of the packages to force allow notification permissions --> <string name="config_forceNotificationPermission" translatable="false">foundation.e.blisslauncher</string> </resources>
core/res/res/values/lineage_symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -25,4 +25,5 @@ <java-symbol type="array" name="config_deviceDisabledComponents" /> <java-symbol type="array" name="config_globallyDisabledComponents" /> <java-symbol type="array" name="config_forceEnabledComponents" /> <java-symbol type="string" name="config_forceNotificationPermission" /> </resources>
services/core/java/com/android/server/notification/NotificationManagerService.java +25 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,7 @@ public class NotificationManagerService extends SystemService { if (DBG) Slog.d(TAG, "loadPolicyFile"); synchronized (mPolicyFile) { InputStream infile = null; mListeners.loadForceNotificationEnabledServices(); try { infile = mPolicyFile.openRead(); readPolicyXml(infile, false /*forRestore*/, UserHandle.USER_ALL); Loading Loading @@ -9564,6 +9565,30 @@ public class NotificationManagerService extends SystemService { } } protected void loadForceNotificationEnabledServices() { String forceEnabledPackages = mContext.getResources().getString( R.string.config_forceNotificationPermission); if (forceEnabledPackages != null) { String[] packages = forceEnabledPackages.split(ManagedServices.ENABLED_SERVICES_SEPARATOR); for (int i = 0; i < packages.length; i++) { if (TextUtils.isEmpty(packages[i])) { continue; } ArraySet<ComponentName> approvedListeners = this.queryPackageForServices(listeners[i], MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, USER_SYSTEM); for (int k = 0; k < approvedListeners.size(); k++) { ComponentName cn = approvedListeners.valueAt(k); addDefaultComponentOrPackage(cn.flattenToString()); } } } } @Override protected int getBindFlags() { // Most of the same flags as the base, but also add BIND_NOT_PERCEPTIBLE Loading