Extract time zone storage logic from AlarmManager
Extract time zone storage logic from AlarmManagerService and add storage for new time zone metadata. This simplifies the AlarmManagerService, which would otherwise have to expose the time zone metadata (or more knowledge of the storage would be duplicated elsewhere). The new metadata describes the confidence Android has in the current time zone setting. It is intended to support upcoming APIs for SetUp Wizard, which should ask the user to confirm the time zone. Currently the SUW tries to infer this by watching for time zone changes, but this is error prone and prevents the time zone detector from defaulting the time zone using low-confidence (but still better than the hardcoded "GMT") time zones today. This change also includes small refactorings to how AlarmManagerService tries to keep the kernel's time zone offset in sync with Android's time zone setting. Code comments have also been added to try to clarify behavior. The system property defaulting behavior previously in SystemServer is moved to SystemTimeZone too so that all the logic associated with the system property is now in one place. Bug: 236612872 Test: manual testing + inspection / treehugger Test: atest services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java services/tests/mockingservicestests/src/com/android/server/alarm/AlarmManagerServiceTest.java Change-Id: I493d31043f22d32f12793e0c35110233c850ed85
Loading
Please register or sign in to comment