152 Commits

Author SHA1 Message Date
Mike Lockwood
8900c32986 andriod.location.Criteria: Simplify new location criteria APIs a bit.
Remove ACCURACY_BEST and only use ACCURACY_MEDIUM for horizontal accuracy.
Remove accuracy priority support, since it be difficult to implement in some cases.

Change-Id: I785a781f8d8f3bf3be6693ad71d077b6eb280c31
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-23 14:34:03 -04:00
Mike Lockwood
1e11e95f61 Merge "Add Geocorder.isImplemented()" into kraken 2010-05-24 12:59:27 -07:00
Mark Vandevoorde
01ac80b715 Add Geocorder.isImplemented()
The Geocorder interface is not part of the Android core.  It
requires a backend service which may or may not be available
on a device.  The new isImplemented static method allows
apps to discover whether the Geocorder is in fact available
on the device.

Change-Id: I2b5cf7bcc9cce4766bcbb156e91edf34b01f9296
2010-05-21 15:43:26 -07:00
Mike Lockwood
965b3d2b84 Fix broken Javadoc links
Change-Id: I6896d6ec16b522e9e63776c0992ef55a6db82d50
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-21 15:19:42 -04:00
Mike Lockwood
71677f84e7 Unhide new location manager APIs:
Criteria.java
LocationManager.java
New APIs for criteria based location requests and single shot support.

GeocoderParams.java
GeocodeProvider.java
LocationProvider.java
APIs for network location unbundling.

Change-Id: I3311fa01ce76fe4cba3537617e5b1c8d1f1d42b7
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-21 14:03:45 -04:00
Mike Lockwood
03ca216ac1 New Location Manager APIs for Criteria based requests and single shot mode.
Use MS-Assisted mode for single shot GPS fixes if it is supported.

Add finer grained control over accuracy to the android.location.Criteria class
and location criteria logic from LocationManager to LocationManagerService

Change-Id: I156b1f6c6a45d255c87ff917cf3e9726a6d7a75b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-21 11:47:19 -04:00
The Android Open Source Project
e88ae544e3 am b6f0cbdc: merge from open-source master
Merge commit 'b6f0cbdcbb566368ebe0468f61de024f644db6e1' into kraken

* commit 'b6f0cbdcbb566368ebe0468f61de024f644db6e1':
  Include the API level 4 fields in the Parcel.
2010-05-10 13:50:32 -07:00
The Android Open Source Project
b6f0cbdcbb merge from open-source master
Change-Id: Ia4cbea9d94b2ff34fc8ce97c1fe35ca5898d6c1c
2010-05-10 13:48:37 -07:00
Jean-Baptiste Queru
855a9e6d12 Merge "Include the API level 4 fields in the Parcel." 2010-05-10 11:14:01 -07:00
The Android Open Source Project
f4dffd8a45 merge from open-source master
Change-Id: I4c28751bd84b41259b12b0f3e3307e11234c8b64
2010-05-06 15:18:59 -07:00
Hakan Gustavsson
fa94ff074d GpsLocationProvider: Store new Location before onGpsStatusChanged is sent
In reportLocation() the new location is now stored before the callback
onGpsStatusChanged(GPS_EVENT_FIRST_FIX) is sent. This will prevent users
from getting a faulty location from LocationManager.getLastKnownLocation()
after receiving onGpsStatusChanged(GPS_EVENT_FIRST_FIX).

Change-Id: I6c654b2acbf2e216c99058a20f068bf4721a1c7a
2010-04-19 16:16:23 -07:00
Mike Lockwood
a3d2d76983 GpsStatus: Bounds check PRN to avoid array indexing exceptions.
Change-Id: Iea8b525dd8681f32cb7ce7415dad0ec665d9016d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-14 19:38:26 -04:00
Mike Lockwood
00b74270c9 Move files internal to LocationManagerService from framework.jar to services.jar
Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-04 18:44:05 -04:00
Mike Lockwood
5b53244a4e GpsNetInitiatedHandler: whitespace cleanup
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-04 18:44:05 -04:00
Mike Lockwood
79e642e8ed Call LocationManager.sendNiResponse() instead of calling directly to GpsLocationProvider
Change-Id: I6a5b47abb0519f5228d29bc3340bb2490564803e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-04 18:44:05 -04:00
Mike Lockwood
8909631710 Wait until GpsLocationProvider is fully initialized before returning from the constructor.
Otherwise we are left with a race condition that might result in the provider
being called before it is ready.

BUG: 2539392
Change-Id: I05f4a2501c43d5fa95c0e68f5a963015cf9c6e8f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-24 12:38:42 -04:00
Mike Lockwood
62a8fc159a GpsLocationProvider: Do our work in a Handler running in a separate thread.
To avoid adding a new thread to the system, we take the functionality that was
in GpsNetworkThread for downloading NTP time and XTRA data and include this in
the new thread as well.

BUG: 2531728

Change-Id: I2a26b7f0aae0c60faceb36dc6bc29c915c039ae6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-22 15:14:31 -04:00
Mike Lockwood
69d63446d8 Remove unused file NmeaParser.java
Change-Id: I8027b98ccf1271870243ced8a7ccc61d25a224b2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-17 22:36:15 -04:00
Fred Fettinger
3c8fbdf5dd location: dump LocationProvider internal state
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>
2010-03-07 09:29:15 -05:00
Mike Lockwood
689e449b24 Check for null provider in LocationManager.getProviders()
Change-Id: I294ce0b1f364cfdf956ac55260f9d40f0704b5f7
BUG: 2485977

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-03 15:35:13 -05:00
Mike Lockwood
8754be5cac Hide GeocoderParams class from public API.
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>
2010-03-02 19:39:50 -05:00
Dianne Hackborn
2269d1572e Re-arrange android-common so framework no longer links with it.
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.
2010-02-25 11:39:33 -08:00
Mike Lockwood
b7be5447a0 GpsLocationProvider: Be less aggressive about getting fixes in bad conditions if we have a long fix interval.
Change-Id: I68bd884409ca15e584ab70e53cf142d60f318d9c
BUG: 2215714

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-24 14:44:18 -05:00
Mike Lockwood
63598a0619 Fix broken location extras in GpsLocationProvider.
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>
2010-02-24 11:56:33 -05:00
Mike Lockwood
a4903f254b Add passive location provider.
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>
2010-02-17 18:36:40 -05:00
Mike Lockwood
d03ff94fe5 Clean up interface between LocationManagerService and the location providers:
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>
2010-02-10 09:41:25 -05:00
Mike Lockwood
628fd6d9c1 Network Location unbundling:
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>
2010-02-08 23:20:27 -05:00
The Android Open Source Project
ad9bcb22d0 merge from open-source master 2010-02-05 13:55:16 -08:00
Mike Lockwood
8ab11f87ac Fix for GPS engines without separate session and engine status events.
GPS_STATUS_SESSION_BEGIN now implies GPS_STATUS_ENGINE_ON
and GPS_STATUS_ENGINE_OFF now implies GPS_STATUS_SESSION_END.

Change-Id: Ifeeb1d5094d1e7304974b7c3ac27dd83b1e65bca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-02 13:26:52 -05:00
Mike Lockwood
c2a6738215 Be tolerant of GPS session and engine on status messages arriving out of order.
BUG: 2366194

Change-Id: Iac152cc46f3647e12c9077f1bfa4183f19ac94b6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-02 13:26:33 -05:00
Mike Lockwood
2f3a615fea GpsLocationProvider: Do not release wakelock until the GPS engine is fully off
Change-Id: I705b1d33af2d70aa1084cca8f6280fade9461d2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-02 13:21:21 -05:00
Mike Lockwood
271f9f172b Fix for GPS engines without separate session and engine status events.
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>
2010-02-02 11:41:52 -05:00
Mike Lockwood
5310b36a37 resolved conflicts for merge of 21875ab3 to master
Change-Id: I447e813b3ec460bbc9050de6b95bd663bb33c86f
2010-02-02 09:15:37 -05:00
Mike Lockwood
56fcd69b14 Remove unused method LocationProviderImpl.isEnabled().
This should have been removed in my previous change.

Change-Id: I3a080888f995e77a61e3ebf1c194ccd65686af1e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-01 15:34:52 -05:00
Mike Lockwood
2cd543aad5 Remove ILocationProvider.isEnabled() binder call and use cached value instead.
Change-Id: Id6a9f6d2e2f5cc5810a2beeb0f869f06e2d18860
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-01 12:18:59 -05:00
Neal Nguyen
1a44d5dcab Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources.
Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code:
- database/DatabaseCursorTest.java
- database/DatabaseStatementTest.java
- net/UriTest.java
2010-01-29 13:35:51 -08:00
Mike Lockwood
f1218be2d8 Ignore NTP time fixes that differ from system time by more than 5 minutes.
Change-Id: I603195f6925e25baccd18190016cf8611bb9dc1b
BUG: 2402380
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-29 09:20:06 -05:00
Neal Nguyen
22e31e5b60 Moving framework core tests closer to their source files.
Phase 2 of test case cleanup; distributing CoreTests files closer to their respective sources under frameworks.
2010-01-27 13:36:38 -08:00
Mike Lockwood
345bf168db am 47d302a0: am bb79e5fd: Merge "Be tolerant of GPS session and engine on status messages arriving out of order." into eclair
Merge commit '47d302a001c71f90bee8dc31d868b463a47f2d51'

* commit '47d302a001c71f90bee8dc31d868b463a47f2d51':
  Be tolerant of GPS session and engine on status messages arriving out of order.
2010-01-22 17:04:47 -08:00
Paul Watts
e6ec57727e Include the API level 4 fields in the Parcel. 2010-01-20 17:04:08 -08:00
Mike Lockwood
cf1d8cb36f Be tolerant of GPS session and engine on status messages arriving out of order.
BUG: 2366194

Change-Id: I642dacd397202f671adba5a863394438ca62988d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-20 10:20:54 -05:00
Mike Lockwood
52eab1c760 Unhide LocationManager APIs needed for unbundled location providers.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-11 12:32:50 -05:00
Joe Onorato
f5d95cbc1a less log spew 2010-01-08 15:46:24 -05:00
Mike Lockwood
be5ed378d9 Fix broken Javadoc link.
Change-Id: Ia72dc3dccf95f95c6847eb52d8b210ed774a804b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-06 23:15:33 -05:00
Mike Lockwood
9d2f7a7d66 Add LocationManagerImpl class to act as a public wrapper for the ILocationProvider interface
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
2010-01-06 22:35:46 -05:00
Mike Lockwood
34901409a4 Cleanup and add public wrapper for IGeocodeProvider interface to prepare for network location unbundling.
Change-Id: I6523d115b56dbf450121e73d48e151f200827eb4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-05 23:39:29 -05:00
Paul Westbrook
7762d93621 Unbundling work
Moved AndroidHttpClient, Rfc822InputFilter, Rfc822Validator
NumberPicker, NumberPickerButton to android-common
---
2009-12-14 09:24:09 -08:00
Mike Lockwood
dbd6fd8ebb GpsLocationProvider: Do not release wakelock until the GPS engine is fully off
Change-Id: I705b1d33af2d70aa1084cca8f6280fade9461d2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-12-07 18:46:55 -05:00
Jean-Baptiste Queru
9db3d07b96 eclair snapshot 2009-11-13 13:53:39 -08:00
Mike Lockwood
03d246779e GPS: Fix problem with SUPL when SUPL APN is already active.
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>
2009-10-08 17:24:21 -04:00