Loading services/core/java/com/android/server/notification/NotificationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -2049,10 +2049,12 @@ public class NotificationManagerService extends SystemService { if (!mUserProfiles.isProfileUser(userId)) { mConditionProviders.onUserUnlocked(userId); mListeners.onUserUnlocked(userId); if (!android.app.Flags.modesApi()) { mZenModeHelper.onUserUnlocked(userId); } } } } private boolean isProfileUnavailable(String action) { return allowPrivateProfile() ? Loading services/core/java/com/android/server/notification/ZenModeHelper.java +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ public class ZenModeHelper { } } // TODO: b/310620812 - Remove when MODES_API is inlined (no more callers). public void onUserUnlocked(int user) { loadConfigForUser(user, "onUserUnlocked"); } Loading services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -5202,7 +5202,7 @@ public class ZenModeHelperTest extends UiServiceTestCase { // rules for a missing package, created a long time ago and deleted a long time ago config.deletedRules.put("del6", newZenRule("bad_pkg", twoMonthsAgo, twoMonthsAgo)); mZenModeHelper.onUserUnlocked(42); // copies config and cleans it up. mZenModeHelper.onUserSwitched(42); // copies config and cleans it up. assertThat(mZenModeHelper.mConfig.automaticRules.keySet()) .containsExactly("ar1", "ar2", "ar3", "ar4"); Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -2049,10 +2049,12 @@ public class NotificationManagerService extends SystemService { if (!mUserProfiles.isProfileUser(userId)) { mConditionProviders.onUserUnlocked(userId); mListeners.onUserUnlocked(userId); if (!android.app.Flags.modesApi()) { mZenModeHelper.onUserUnlocked(userId); } } } } private boolean isProfileUnavailable(String action) { return allowPrivateProfile() ? Loading
services/core/java/com/android/server/notification/ZenModeHelper.java +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ public class ZenModeHelper { } } // TODO: b/310620812 - Remove when MODES_API is inlined (no more callers). public void onUserUnlocked(int user) { loadConfigForUser(user, "onUserUnlocked"); } Loading
services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -5202,7 +5202,7 @@ public class ZenModeHelperTest extends UiServiceTestCase { // rules for a missing package, created a long time ago and deleted a long time ago config.deletedRules.put("del6", newZenRule("bad_pkg", twoMonthsAgo, twoMonthsAgo)); mZenModeHelper.onUserUnlocked(42); // copies config and cleans it up. mZenModeHelper.onUserSwitched(42); // copies config and cleans it up. assertThat(mZenModeHelper.mConfig.automaticRules.keySet()) .containsExactly("ar1", "ar2", "ar3", "ar4"); Loading