| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Document a section of code that prevents an NTP-related CTS test working
if the device is not connected to Wifi. The reason the code exists took
a little bit of research, so here it is.
Bug: 213393821
Test: Comment-only change
Change-Id: I0b5d9f298ef36e861f780a29fdf74f0226fa1567
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the ability to configure NTP port for tests via the command line and
the associated plumbing / knock-ons.
In-progress CTS tests will run a fake NTP server on the device itself.
Binding to NTP's default port of 123 is restricted. Therefore, we need
to be able to override the port for tests.
adb shell cmd network_time_update_service set_server_config --port 9999
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe false>
adb shell cmd network_time_update_service set_server_config
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe true>
Bug: 213393821
Test: See above
Change-Id: I21e8b735fab268df0d617848b8a562f86560ad16
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable NTP failure / timeout testing by providing an ability for testers
to change the NTP configuration. Also improve debugging information from
dumpsys and logs.
Testing:
adb shell cmd network_time_update_service set_server_config --hostname localhost
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false>
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service set_server_config --hostname localhost --timeout_millis 1000
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false, but faster>
adb shell cmd network_time_update_service set_server_config --hostname localhost --timeout_millis 10000
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false, but slower>
adb shell cmd network_time_update_service set_server_config
adb shell cmd network_time_update_service force_refresh
<observe true>
Bug: 213393821
Test: See above
Change-Id: Ic66c7fabe0b42a3d5c86f8b85f17096bf64a8209
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initial command-line interface for NetworkTimeUpdateService for use in
tests.
To be joined by more commands as they are identified.
Bug: 213393821
Test: adb shell cmd network_time_update_service help
Test: adb shell cmd network_time_update_service clear_time
&& adb shell dumpsys network_time_update_service
Test: adb shell cmd network_time_update_service force_refresh
&& adb shell dumpsys network_time_update_service
Change-Id: I033764a7df9759e9fd4da0b0776f6535a574ff59
|
| |
|
|
|
|
| |
Bug: b/217357882
Test: Changes adds local logs. Existing unit tests still pass.
Change-Id: I2876a479c5219b6e4af6dfe25ba0942d82115ca5
|
| |
|
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes a number of changes:
1) Documents / enforces thread safety, removes or deprecates unsafe
check-then-do methods / adds a way to get the NTP query result
atomically.
2) Delays configuration lookup until point of use: the config can change
due to various possible config overlays, e.g. MCC-based config.
(1) is because the threading model is currently unclear / possibly
unsafe - it looks like NtpTrustedTime is supposed to be single threaded
but it's also a singleton so could be accessed from multiple threads.
If NtpTrustedTime were not a singleton things might be easier but the
@UnsupportedAppUsage makes it difficult to change now.
(2) is to address the same issue as https://r.android.com/1182530,
contributed by Luca Stefani.
Bug: 140712361
Test: build only
Merged-In: Ie09da9db5d853b59829886a020de21a88da5dd51
Change-Id: Ie09da9db5d853b59829886a020de21a88da5dd51
(cherry picked from commit 65f0f31bdee65d1bbe76fcd14a13151a476a51ec)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
Merged-In: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
|
| |/
|
|
|
|
|
|
|
|
|
| |
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
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e5445fcfc0b3e4084095e2850d28a3fb4)
|
| |
|
|
|
|
|
|
|
|
| |
Fix copy and paste errors from commit 4ab8a199de8 -
the API is new so does not need @UnsupportedAppUsage and
the debug log was incorrect.
Bug: 140712361
Test: build only
Change-Id: I123f76d011d7505d3dc053cb48c40353f0579d17
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves some logic associated with time detection out of the
NetworkTimeUpdateServiceImpl and moves it to the TimeDetectorStrategy
called by the TimeDetectorService.
The TimeDetectorStategy implementation now decides when to use an
NTP-derived time instead. The logic implemented here is effectively the
same as it was: NITZ takes priority over NTP until the latest NITZ
signal becomes "too old".
The motivating reasons for the change:
1) The "what signal is used when several are available?" logic should be
in one place: the TimeDetectoryStrategy not scattered around the
platform. Centralizing will enable different strategies and time sources
to be introduced over time.
2) It will allow removal of the ACTION_NETWORK_SET_TIME intent in a
follow-up commit; this intent was used to coordinate the NTP vs NITZ
logic should no longer be required.
The "bonus" effect of this change is that NetworkTimeUpdateServiceImpl
becomes more general: It can now be the authority for the NTP time on a
device independently of how the system clock should be set. e.g. it
could be used in future to back the
AlarmManager.currentNetworkTimeMillis() API call. Anything that needs a
"what is the best time according to NTP?" answer could use this service.
Note: The NetworkTimeUpdateServiceImpl still observes the AUTO_TIME
setting and will perform an NTP lookup "on demand" (if required) when
the user enables the setting. This should be a temporary state and
likely to be removed in future; knowledge of AUTO_TIME shouldn't be
required for the NTP info to be correct and if
NetworkTimeUpdateServiceImpl is doing the right thing.
Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest android.app.timedetector
Change-Id: I4b2936a42c552c4dd4cb55010306bb81bca0c712
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.util.proto
android.util.jar
android.util.apk
android.util
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I18848448a81132399f6878812acf5031ed8cec9f
Merged-In: Ia0f48c244b0fbe33d40d797702a82303648196ed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).
This CL is in support of ag/3776564
Bug: 32663274
Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
(cherry-pick of pi-dev Ic9fc169cf75457810d4992121d85d7642e350b90)
Merged-In: I339c77063c72a9d76a5c4cb17052e20fb6e045a6
Merged-In: I8dfd1cad99c63efdc14c174c19f094a61cdfc44f
Change-Id: I44df66688292b144ec7dfcdd9ae5d82489f82774
|
| |\
| |
| |
| |
| |
| |
| | |
a network connection." into lmp-mr1-dev
* commit '3d992507a09b4d32c1e961a99d77027db050f01b':
Only try to fetch time from NTP if there is a network connection.
|
| | |
| |
| |
| |
| | |
Bug: 19046107
Change-Id: Iff647ee33fe0eb9b530d7baad636d32b386e4fa7
|
| |/
|
|
|
|
|
|
| |
mServer cannot set null, because string from resource always returns
non-null charsequence
Change-Id: I8d6a6fdbc34267ee361e7bd20719887268161870
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
|
| |
|
|
|
|
|
| |
Also add better ConnectivityService logging.
Bug: 7157464
Change-Id: Ia235a7e62ed809240913c4782920c1410c7d597d
|
| |
|
|
|
| |
Bug: 7157464
Change-Id: Ief10fd37940f62420f5684940994c9f93802e0be
|
| |
|
|
|
|
|
|
|
| |
Uses NTP server and timeout from secure settings, or fallback to
defaults in resources. Update various system services to use cached
NTP time when fresh enough, or force updates as needed.
Bug: 4517273
Change-Id: Ie1c4c4883836013d02ca0bbd850cf8949f93b34b
|
| |
|
|
|
| |
Bug: 4377651
Change-Id: Ia950a1e62d39ce9148827ebb4535f6441911b195
|
|
|
Wrote initial suite of tests for ThrottleService, checking a variety
of edge cases. Checks going over limits, updating policies, and reset
after cycle elapses.
Moved NTP code in ThrottleService into new TrustedTime interface,
which makes it easier to understand, and allows tests to provide custom
clocks.
Change-Id: I0d62b8b3a169516a2ab2d33025f6fe30dc792be8
|