Skip to content
Commit 02d943f4 authored by Neil Fuller's avatar Neil Fuller
Browse files

Get ready to add System APIs for use by SUW

This commit introduces the TimeManager API class. It is intended to
provide access to the time and time zone detector services, which
historically have had their own (internal) API classes to access them.

This commit contains various fixes to the listener handling logic
noticed while testing the APIs.

The first APIs on TimeManager are being exposed for use by SetUp Wizard,
which requires System APIs.

The APIs enable the calling app to determine the capabilities for /
config of the current user that affect time zone detection and then
alter them.

The primary usecase:

The rules for who can do what and when for time zone detection are
becoming more complicated, and device and user capabilities will be
affected by compile time constants, device config (resources) and device
hardware. By exposing this API, the complex logic can be encoded in one
place (the system server), rather than duplicating them in multiple
client apps.

These APIs are also intended for use by SettingsUI (and the various form
factor versions of that), but settings apps do not currently require
them to be marked with @SystemApi.

Bug: 159891384
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Test: atest android.app.time
Change-Id: I9b59099748e2391c180e124edf83fa521beb1b51
parent 78733751
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment