Files
frameworks_base/core/java/android/service
Yuri Lin 36fd35b4ee Handle several daylight savings related edge cases in ScheduleCalendar.
The core functionality changes that were previously broken that this change fixes are:
- a schedule such as 02:30-03:15 would incorrectly span the next full day on the day 2AM is skipped
- getNextChangeTime would return an incorrect time when called on the day clocks change when the next change is on the next day

The new behavior changes only when a schedule's start time is during a skipped hour; in those cases, the schedule then "begins" at the next valid time (3AM in the case of something that would start at 2:xx).

This change also adds a bunch of unit tests surrounding daylight savings time: schedule starts and ends on both daylight adjustment periods, and time adjustment in various time zones.

Test: atest ScheduleCalendarTest
Bug: 74521742
Change-Id: Ia59ef296a3b54de5cadccab82d87cbb81ded0733
2021-06-16 15:45:58 -04:00
..
…