summaryrefslogtreecommitdiff
path: root/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java')
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
index c0fecaf8ecb3..042c9d99eb8c 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
@@ -333,6 +333,17 @@ public class ScheduleCalendarTest extends UiServiceTestCase {
}
@Test
+ public void testMaybeSetNextAlarm_expiredOldAlarm() {
+ mScheduleInfo.exitAtAlarm = true;
+ mScheduleInfo.nextAlarm = 998;
+ mScheduleCalendar.setSchedule(mScheduleInfo);
+
+ mScheduleCalendar.maybeSetNextAlarm(1000, 1001);
+
+ assertEquals(1001, mScheduleInfo.nextAlarm);
+ }
+
+ @Test
@FlakyTest
public void testIsInSchedule_inScheduleOvernight() {
Calendar cal = new GregorianCalendar();