OSDN Git Service

Add (disabled) time zone update system server impl
authorNeil Fuller <nfuller@google.com>
Thu, 16 Mar 2017 18:32:21 +0000 (18:32 +0000)
committerNeil Fuller <nfuller@google.com>
Thu, 4 May 2017 18:28:49 +0000 (19:28 +0100)
commit328532ab13768a6303231b670708d750c4d7aa5f
treef80b792421915c135618e2a9b0f4142a7d47a911
parent009e77a7bb256def8100f432b608e888ca8dffd4
Add (disabled) time zone update system server impl

This commit builds on top of prior API commits. It
adds code to the system server, but in a disabled way.

The system server is responsible for monitoring two
(configured) package names: one for the "updater app"
(provided by the platform) and one for the "data app"
(provided by the OEM). When either package changes
the updater app is triggered via a privileged
intent.

The updater is then required to communicate with the
data app and report back to the system server.

Unit tests are included for the major components.

To run:
make -j30 FrameworksServicesTests
adb install -r -g "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w com.android.frameworks.servicestests \
    "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Bug: 31008728
Change-Id: I8f82cdcc2b574778a7e0d0184270f305b69ee17b
25 files changed:
core/java/android/app/SystemServiceRegistry.java
core/res/res/values/config.xml
core/res/res/values/symbols.xml
services/core/java/com/android/server/timezone/CheckToken.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/ClockHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/ConfigHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/FileDescriptorHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/IntentHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/IntentHelperImpl.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageManagerHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageStatus.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageStatusStorage.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageTracker.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageTrackerHelperImpl.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PackageVersions.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/PermissionHelper.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/RulesManagerService.java [new file with mode: 0644]
services/core/java/com/android/server/timezone/RulesManagerServiceHelperImpl.java [new file with mode: 0644]
services/java/com/android/server/SystemServer.java
services/tests/servicestests/src/com/android/server/timezone/CheckTokenTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/timezone/PackageStatusStorageTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/timezone/PackageStatusTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/timezone/PackageTrackerTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/timezone/PackageVersionsTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/timezone/RulesManagerServiceTest.java [new file with mode: 0644]