Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6bfc89fe authored by Neil Fuller's avatar Neil Fuller
Browse files

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
parent 8aa891d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment