Loading services/core/java/com/android/server/notification/NotificationManagerService.java +11 −3 Original line number Diff line number Diff line Loading @@ -4106,11 +4106,13 @@ public class NotificationManagerService extends SystemService { if (r == null) { return; } if (mAssistants.isAdjustmentAllowed(adjustment.getKey())) { if (adjustment.getSignals() != null) { Bundle.setDefusable(adjustment.getSignals(), true); r.addAdjustment(adjustment); } } } @GuardedBy("mNotificationLock") void addAutogroupKeyLocked(String key) { Loading Loading @@ -7313,6 +7315,12 @@ public class NotificationManagerService extends SystemService { } } protected boolean isAdjustmentAllowed(String type) { synchronized (mLock) { return mAllowedAdjustments.contains(type); } } protected void onNotificationsSeenLocked(ArrayList<NotificationRecord> records) { // There should be only one, but it's a list, so while we enforce // singularity elsewhere, we keep it general here, to avoid surprises. Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -353,7 +353,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { FileOutputStream fos = mPolicyFile.startWrite(); fos.write(preupgradeXml.getBytes()); mPolicyFile.finishWrite(fos); FileInputStream fStream = new FileInputStream(mFile); // Setup managed services mListener = mListeners.new ManagedServiceInfo( Loading @@ -369,6 +368,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { dndConfig.xmlTag = ConditionProviders.TAG_ENABLED_DND_APPS; when(mConditionProviders.getConfig()).thenReturn(dndConfig); when(mAssistants.isAdjustmentAllowed(anyString())).thenReturn(true); try { mService.init(mTestableLooper.getLooper(), mPackageManager, mPackageManagerClient, mockLightsManager, Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +11 −3 Original line number Diff line number Diff line Loading @@ -4106,11 +4106,13 @@ public class NotificationManagerService extends SystemService { if (r == null) { return; } if (mAssistants.isAdjustmentAllowed(adjustment.getKey())) { if (adjustment.getSignals() != null) { Bundle.setDefusable(adjustment.getSignals(), true); r.addAdjustment(adjustment); } } } @GuardedBy("mNotificationLock") void addAutogroupKeyLocked(String key) { Loading Loading @@ -7313,6 +7315,12 @@ public class NotificationManagerService extends SystemService { } } protected boolean isAdjustmentAllowed(String type) { synchronized (mLock) { return mAllowedAdjustments.contains(type); } } protected void onNotificationsSeenLocked(ArrayList<NotificationRecord> records) { // There should be only one, but it's a list, so while we enforce // singularity elsewhere, we keep it general here, to avoid surprises. Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -353,7 +353,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { FileOutputStream fos = mPolicyFile.startWrite(); fos.write(preupgradeXml.getBytes()); mPolicyFile.finishWrite(fos); FileInputStream fStream = new FileInputStream(mFile); // Setup managed services mListener = mListeners.new ManagedServiceInfo( Loading @@ -369,6 +368,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { dndConfig.xmlTag = ConditionProviders.TAG_ENABLED_DND_APPS; when(mConditionProviders.getConfig()).thenReturn(dndConfig); when(mAssistants.isAdjustmentAllowed(anyString())).thenReturn(true); try { mService.init(mTestableLooper.getLooper(), mPackageManager, mPackageManagerClient, mockLightsManager, Loading