History log of /frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
450a16b33f5d58370d181a7539aa113779efa247 19-Sep-2013 Amith Yamasani <yamasani@google.com> Use a separate thread for services that do NTP lookup

Some services do periodic network time lookups and can wedge the other operations on
BackgroundThread and IO Thread, causing Watchdog to kill the runtime. So best to put
those handlers on separate threads.

Going forward, should convert NTP lookups to be async with callbacks.

Bug: 10646480
Change-Id: I8c7ba6052cb3539575712c2099a706b14ff60196
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
a00271533f639c8ed36429c663889ac9f654bc72 25-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Refactoring of the print sub-system and API clean up.

1. Now a user state has ins own spooler since the spooler app is
running per user. The user state registers an observer for the state
of the spooler to get information needed to orchestrate unbinding
from print serivces that have no work and eventually unbinding from
the spooler when all no service has any work.

2. Abstracted a remote print service from the perspective of the system
in a class that is transparently managing binding and unbinding to
the remote instance.

3. Abstracted the remote print spooler to transparently manage binding
and unbinding to the remote instance when there is work and when
there is no work, respectively.

4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to
enable implementing the all callbacks on a thread of choice. If
the document is really small, using the main thread makes sense.

Now if an app that does not need the UI state to layout the printed
content, it can schedule all the work for allocating resources, laying
out, writing, and releasing resources on a dedicated thread.

5. Added info class for the printed document that is now propagated
the the print services. A print service gets an instance of a
new document class that encapsulates the document info and a method
to access the document's data.

6. Added APIs for describing the type of a document to the new document
info class. This allows a print service to do smarts based on the
doc type. For now we have only photo and document types.

7. Renamed the systemReady method for system services that implement
it with different semantics to systemRunning. Such methods assume
the the service can run third-party code which is not the same as
systemReady.

8. Cleaned up the print job configuration activity.

9. Sigh... code clean up here and there. Factoring out classes to
improve readability.

Change-Id: I637ba28412793166cbf519273fdf022241159a92
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
8d044e8bc287c1a567d82aedbe30085b011544c3 01-May-2013 Dianne Hackborn <hackbod@google.com> Start combining threads in system process.

This introduces four generic thread that services can
use in the system process:

- Background: part of the framework for all processes, for
work that is purely background (no timing constraint).
- UI: for time-critical display of UI.
- Foreground: normal foreground work.
- IO: performing IO operations.

I went through and moved services into these threads in the
places I felt relatively comfortable about understanding what
they are doing. There are still a bunch more we need to look
at -- lots of networking stuff left, 3 or so different native
daemon connectors which I didn't know how much would block,
audio stuff, etc.

Also updated Watchdog to be aware of and check these new
threads, with a new API for other threads to also participate
in this checking.

Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
c3560b81dbb143dd4e1ba64edf37fd19af76ad49 20-Nov-2012 Jaewan Kim <jaewan@google.com> Make NTP constants configurable.

Bug: 6943067
Change-Id: I0b0f9076fba99e9c457ef7180b9936c0d2a7d589
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
bf6f6f9de72c9fd15e6bda9f228c05a9b37d6324 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Update references to migrated global settings.

Fixed one setting that was migrated but not marked deprecated.

Removed a hidden setting that is no longer used by the new
power manager service.

Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
708d5d444bd47db96a47cf5153bdfb8b0f3b975b 02-May-2012 Amith Yamasani <yamasani@google.com> On first boot and NTP lookup, set the time even if it's not off by 5+ secs.

This enables SetupWizard to get an ACTION_TIME_CHANGED event.

Bug: 6432127

Change-Id: I42b8d6672372dc1aa4aa43128b5d801875ccf057
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
a5abdb9e580f7598ae5553f4490d16871453f9f5 09-Nov-2011 Mike Lockwood <lockwood@android.com> NetworkTimeUpdateService: Schedule NTP on ethernet connect as well as wifi

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
5e61331da59921413a8e2a144146a8451a054020 30-Jan-2012 Jeff Sharkey <jsharkey@android.com> Move away from deprecated NetworkInfo extra.

Because the NetworkInfo included in CONNECTIVITY_ACTION broadcast
extra does not reflect the state applicable to the calling UID, and
the last sticky broadcast may have stale state, transition to calling
ConnectivityManager.getActiveNetworkInfo() directly.

Change-Id: I86b316fbedd0273585ad5f1248b091bc3a3a5520
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
104344e507610be42fb70c7deda3c422c543bfcb 10-Jul-2011 Jeff Sharkey <jsharkey@android.com> Cached NTP time for system services.

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
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
8d394fa8993f7143dee6f894a41be888bdd16bc0 01-Mar-2011 Amith Yamasani <yamasani@google.com> Check for NTP time as soon as WIFI is connected.

Listen for connectivity changes. If WIFI is connected, check if
we have recently checked for NTP time. If we haven't yet checked the
time or it has been long enough (a day), then connect to the NTP server
and get the latest time. Update the time if it is significantly out of sync.

This doesn't poll the NTP server every time there is connectivity, only
if it hasn't been checked since boot or has been a day.

This fixes the problem that during SetupWizard, we try to contact the NTP
server before there is connectivity and fail. Now, as soon as the user
chooses a WiFi network to connect to, it will update the time before
getting to the Date/Time step. Then as soon as the user corrects the TZ,
the date/time should be correct.

Bug: 3491920
Change-Id: I62664156616510b67ecd6a1c24dd838b98d5204f
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java
6734b9f68062b04e602be0069ab028045c1fe3ec 14-Sep-2010 Amith Yamasani <yamasani@google.com> Provide automatic date/time based on NTP lookup.

Do this on a periodic basis as well as when the AUTO_TIME setting changes to true.

If we recently acquired NITZ time from the telephony provider, then don't override
with NTP time.
/frameworks/base/services/java/com/android/server/NetworkTimeUpdateService.java