For each location provider, call getInternalState() to see if it has any
state information to include in a bugreport. If the returned string is not
null, then print a header with the provided name followed by the returned
string.
Change-Id: I0a388d7fba14ac8cadcb80eda0a0ceb95032410b
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
This does not need to be publc until we unbundle the network location provider.
Change-Id: Ib4109d2392624242eee33f271a8151588e3f0c56
Signed-off-by: Mike Lockwood <lockwood@android.com>
This is the framework part, moving classes around so the framework
no longer needs to link to android-common. Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
Fixes http://code.google.com/p/android/issues/detail?id=4151
(Satellite count not being provided by Location class any more. Location.getExtras() returns null.)
Change-Id: I4cf2922f4a5ed216541f8a8553523d1f6a1c1d0c
Signed-off-by: Mike Lockwood <lockwood@android.com>
The passive location provider allows receiving location updates without
actually triggering them. This allows an application to receive location
updates that are being generated due to other clients of the location manager.
Change-Id: Ibf7a96b089c56875d4f62d3210252ae8d9f32768
Signed-off-by: Mike Lockwood <lockwood@android.com>
LocationManagerService now uses new Java interface LocationProviderInterface
rather than LocationProviderProxy to refer to location providers internally.
LocationProviderProxy and the ILocationProvider binder interface are only
used for location providers implemented as services (NetworkLocationProvider)
Built-in location providers (GpsLocationProvider and mock providers) now just
implement LocationProviderInterface rather than using a Binder interface and proxy object.
Delete obsolete and unused TestLocationProvider class.
Change-Id: Id800e7c1864f7c666f8e37125c05896493b9c8c4
Signed-off-by: Mike Lockwood <lockwood@android.com>
The network location and geocode provider services are now started on demand
and their interfaces are now retrieved via bindService().
Remove obsolete LocationManager installLocationProvider() and installGeocodeProvider() methods.
Add abstract class android.location.provider.GeocodeProvider to provide a public wrapper to
the IGeocodeProvider Binder interface. Replaces the LocationManager.GeocodeProvider interface.
Rename LocationProviderImpl to android.location.provider.LocationProvider.
Move LocationManager.reportLocation() to android.location.provider.LocationProvider,
so all methods related to external location providers are now all in one class.
Avoid calling from the Location Manager Service into providers that are disabled so we
do not start the network location service unnecessarily.
Change-Id: If3ed2d5d62b83ba508006711d575cad09f4a0007
Signed-off-by: Mike Lockwood <lockwood@android.com>
GPS_STATUS_SESSION_BEGIN now implies GPS_STATUS_ENGINE_ON
and GPS_STATUS_ENGINE_OFF now implies GPS_STATUS_SESSION_END.
Change-Id: I7217dc5213ae9a5658ac81b0a14b61d3e36ca0f6
Signed-off-by: Mike Lockwood <lockwood@android.com>
This should have been removed in my previous change.
Change-Id: I3a080888f995e77a61e3ebf1c194ccd65686af1e
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit '47d302a001c71f90bee8dc31d868b463a47f2d51'
* commit '47d302a001c71f90bee8dc31d868b463a47f2d51':
Be tolerant of GPS session and engine on status messages arriving out of order.
Location providers implemented outside of the core android platform (like network location)
can subclass LocationManagerImpl to implement the location provider interface
without being bound too tightly to the location manager internals.
Change-Id: Id193d4d09f9a14bea13e81af03c914074cd37cb9
Use ConnectivityManager.CONNECTIVITY_ACTION broadcast in LocationManagerService
to notify GPS when SUPL connection is ready instead of TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED,
which is not sent in all cases.
Expand LocationProvider.updateNetworkState() to include NetworkInfo object.
Fixes bug b/2155661
Change-Id: Iee227ace7d536b36cf7973e3e6a8b7a621ce6565
Signed-off-by: Mike Lockwood <lockwood@android.com>
NMEA sentences are passed from the GPS engine to the GpsLocationProvider.
They are then sent via the IGpsStatusListener binder interface to clients
using the same path as the other GPS status information.
Signed-off-by: Mike Lockwood <lockwood@android.com>
This flag was unnecessary because the lower level GPS code already checks for this
and this was causing problems for a GPS implementation that does not use /etc/gps.conf
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit '2e418428987132ea66533cbc05f9c526eb59519a'
* commit '2e418428987132ea66533cbc05f9c526eb59519a':
Possibly fix an issue where we thought an app was always using GPS.
There may be some race conditions in the gps provider where it can cause a uid
to be double booked for gps usage and never released. Address this by tweaking
some locking (so mLocation and the uid array are protected by a lock both when
reading and writing). Also add some code to log a warning if someone tries to
note a particular uid multiple times, since the code will break in that case.
Finally, fix a problem in the battery stats where we weren't allowing a new Uid
structure to be created in many cases for calls coming in.
Merge commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c'
* commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c':
gps: Check for null APN name to avoid a runtime restart.
Merge commit 'f781b39cb89dc19e6ad090bd3eb1bedbe7928429'
* commit 'f781b39cb89dc19e6ad090bd3eb1bedbe7928429':
gps: Set SUPL server via hostname rather than IP address.
The GPS engine needs the hostname for the secure SUPL case
and deferring the DNS lookup to the HAL might be helpful in the future
if the SUPL server is on a carrier's private network.
Signed-off-by: Mike Lockwood <lockwood@android.com>
This change replaces ILocationCollector with a more general mechanism that
passes locations received from a provider to all other providers.
The network location provider now uses this to implement the location collector.
In the future, this could be used to inject network locations to the GPS
as aiding data.
This change also removes the now obsolete permission INSTALL_LOCATION_COLLECTOR.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit '2d10ba33190c2ff1b24d6c48dd621c55a25bf2cc'
* commit '2d10ba33190c2ff1b24d6c48dd621c55a25bf2cc':
GPS: Add support for forcing NTP time and XTRA data injection.
Merge commit '02c1c46fff22490f884f05520d58eadae1442db8'
* commit '02c1c46fff22490f884f05520d58eadae1442db8':
gps: Time out after 1 minute if we are unable to get a fix and our fix interval is long.