summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yuri Lin <yurilin@google.com> 2025-01-29 08:08:27 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-29 08:08:27 -0800
commit8ee3a09473aa5db9d734252084ebbe041c7a0e9d (patch)
tree3df0a3209effe561abcb5da243c8804578cc7e9c
parentb6f9dd15b84e885f04ff17dc71f1ed5f7bba9a89 (diff)
parent5a41c27228f3ca1e28d70627f8efa6f170197afb (diff)
Merge "Skip invalidating caches in NotificationManagerServiceTest" into main
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index c1c8211d6cbd..caff9139e26c 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -24,6 +24,7 @@ import static android.app.ActivityManagerInternal.ServiceNotificationPolicy.NOT_
import static android.app.ActivityManagerInternal.ServiceNotificationPolicy.SHOW_IMMEDIATELY;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.Flags.FLAG_KEYGUARD_PRIVATE_NOTIFICATIONS;
+import static android.app.Flags.FLAG_NM_BINDER_PERF_CACHE_CHANNELS;
import static android.app.Flags.FLAG_REDACT_SENSITIVE_CONTENT_NOTIFICATIONS_ON_LOCKSCREEN;
import static android.app.Flags.FLAG_SORT_SECTION_BY_TIME;
import static android.app.Notification.EXTRA_ALLOW_DURING_SETUP;
@@ -604,7 +605,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
@Parameters(name = "{0}")
public static List<FlagsParameterization> getParams() {
return FlagsParameterization.allCombinationsOf(
- FLAG_NOTIFICATION_CLASSIFICATION);
+ FLAG_NOTIFICATION_CLASSIFICATION, FLAG_NM_BINDER_PERF_CACHE_CHANNELS);
}
public NotificationManagerServiceTest(FlagsParameterization flags) {
@@ -826,6 +827,11 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
mService.setAttentionHelper(mAttentionHelper);
mService.setLockPatternUtils(mock(LockPatternUtils.class));
+ // make sure PreferencesHelper doesn't try to interact with any real caches
+ PreferencesHelper prefHelper = spy(mService.mPreferencesHelper);
+ doNothing().when(prefHelper).invalidateNotificationChannelCache();
+ mService.setPreferencesHelper(prefHelper);
+
// Return first true for RoleObserver main-thread check
when(mMainLooper.isCurrentThread()).thenReturn(true).thenReturn(false);
ModuleInfo moduleInfo = new ModuleInfo();