summaryrefslogtreecommitdiff
path: root/core/java/android/util/TimestampedValue.java
Commit message (Collapse)AuthorAgeFilesLines
* Rename android.util.TimestampedValue to android.osNeil Fuller2020-01-081-124/+0
| | | | | | | | | Rename android.util.TimestampedValue to android.os to avoid dependency from android.util onto android.os, which is disallowed by lint. Bug: 147012511 Test: boot Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
* Make TimestampedValue ParcelableNeil Fuller2019-10-101-51/+38
| | | | | | | | | | | | | | | | | | | | Make TimestampedValue Parcelable for simplicity. TimetampedValue objects are not generally parcelable, depending on the type of the value held. Previously, TimestampedValue did not implement Parcelable to avoid committing to a general contract. Developers parceling TimestampedValue objects were expected to call TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel() explicitly when they knew it was safe to do so. This also meant that TimestampedValues couldn't be used directly via AIDL. This change makes TimestampedValue parcelable because it's more familiar / convenient. Attempts to marshall a TimestampedValue that contains a non-parcelable value will still throw a RuntimeException. Bug: 140712361 Test: atest android.util.TimestampedValueTest Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
* Add more behavior to TimeDetectorServiceNeil Fuller2018-06-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add TimestampedValue.toString()Neil Fuller2018-06-131-0/+8
| | | | | | | | To make debug logging useful. Bug: 78217059 Test: Build Change-Id: I710b56d189afeb26ac50f55d9286d04219779ee7
* Simple pass-through TimeDetectorServiceNeil Fuller2018-06-121-0/+121
This is sufficient to wire up time detection from telephony to the new service without breaking time detection. This cherry-pick contains a small change: to use SystemClock.elapsedRealtime() instead of the newer SystemClock.elapsedRealtimeClock() with Clock.millis(). Bug: 78217059 Test: atest FrameworksServicesTests:com.android.server.timedetector Test: atest FrameworksCoreTests:android.util.TimestampedValueTest Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b (cherry picked from commit 24836bfb1564b1f98c322108a924965a8dbbee4f)