OSDN Git Service

Add more behavior to TimeDetectorService
authorNeil Fuller <nfuller@google.com>
Tue, 12 Jun 2018 20:06:20 +0000 (21:06 +0100)
committerNeil Fuller <nfuller@google.com>
Mon, 25 Jun 2018 18:34:05 +0000 (19:34 +0100)
commit4980bbcd300e2ec2565bc13ef85fcb1081ab0b5e
tree48ee8104f144051990dc7384921d694718fffb5a
parent3580a6a9966ee6fcb487e09b49445ac8c318b76a
Add more behavior to TimeDetectorService

The client code now "suggests" time updates
to the time detection service. The current implementation
of the time detection service will validate and set the
device system clock as needed. In future it will ignore
these suggestions if better information is available.

Responsibility for sending the
TelephonyIntents.ACTION_NETWORK_SET_TIME intent has
been moved to the time detection service until it can be
removed or replaced.

The telephony code is still responsible for basic rate
limiting but the majority of the decision logic has been
moved to the service.

There is an associated change in telephony code to switch to
using the server.

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: I4f7a10ac06b2d32da22689e1ddf309e0a2795f30
core/java/android/util/TimestampedValue.java
core/tests/coretests/src/android/util/TimestampedValueTest.java
services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java
services/core/java/com/android/server/timedetector/TimeDetectorService.java
services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java