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
Loading
Please register or sign in to comment