History log of /frameworks/base/location/java/android/location/Location.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a04c7a7c6442b8c6f87f5dd11fc5659cdb92decc 18-Mar-2016 Jeff Sharkey <jsharkey@android.com> Mark more Bundles as being defusable.

They're destined for the system, so they're okay to look inside.

Bug: 27726127
Change-Id: Ic85c308a8efe6f9b8652952717c72b3c663d328a
/frameworks/base/location/java/android/location/Location.java
923b2602583021b97ac7a8dcbca8395e309b938e 28-Oct-2015 David Christie <dnchrist@google.com> Make Location objects take less memory.

-Use bitmask for has*** methods.
-Use ThreadLocal for caching intermediate computations
rather than preallocating memory in every Location

Change-Id: If2fa17bfd59511ec0b809f4b7d7cd8028360c340
/frameworks/base/location/java/android/location/Location.java
5575ddfcc1a1a7873d493ad6bbc522a9652d4ffc 27-Oct-2015 David Christie <dnchrist@google.com> Correct range checking for location strings during conversion

Minute values in the range [0, 59] are valid if seconds are
present. If seconds are not present then minute values are
valid in the range [0, <60]

Second values are valid in the range [0, <60]

Examples:
50:59:59.99999 is valid
50:59.99999 is valid
50:59.1:1 is not valid

Patch taken from Motorola: partner gerrit 137210

Bug: 17958582
Change-Id: I0d1265534092157883af564119f723984362d436
Issues: 2667 and 2668
/frameworks/base/location/java/android/location/Location.java
71f0cd45eff088d26309564d6766003bb788a04b 30-Jan-2015 Soonil Nagarkar <sooniln@google.com> Update Location.convert() javadocs to reflect their inconsistency with locales.

The Location.convert() methods do not invert each other as might be
expected. Changing this would introduce breaking changes, so I've
updated the javadocs to make this clearer.

Bug: 13280976
Change-Id: If4bd3c83d5fb67915450849ca471aabc27544dac
/frameworks/base/location/java/android/location/Location.java
c20b795cf05b48fe5e024c19dab9c7e4b18cd10f 04-Sep-2014 David Christie <dnchrist@google.com> Add @SystemApi annotations to methods used by GmsCore.
-Currently these methods are called using reflection for location.
Bug: 17371392
Change-Id: I6546f5b485415beff69164ba0d526757ee831f69
/frameworks/base/location/java/android/location/Location.java
552bd68c2c592348b45fb823b939fb289afb4af7 17-Jun-2014 David Christie <dnchrist@google.com> Update Location documentation for altitude (WGS84 instead of sea level).

Change-Id: I9531fba75bc1fee7d0e7c1dc179e3d05fb3e8a42
/frameworks/base/location/java/android/location/Location.java
54ca7aef2e12b240caa6fb1a1e65abd234bea337 08-Jan-2013 Victoria Lease <violets@google.com> Annotate Locations coming from mock providers

LocationManagerService now annotates incoming Location objects that
have come from mock location providers. The new isFromMockProvider()
method can be called on any Location to determine whether the
provider that supplied the Location was a mock location provider.

Bug: 6813235
Change-Id: Ib5140e93ea427f2e0b0036151047f87a02b4d23a
/frameworks/base/location/java/android/location/Location.java
7ab7f538924371a9dd4be7a27a6ae3b4c04b301c 30-Oct-2012 Laurent Tu <laurentt@google.com> Hide new location APIs and undeprecate old ones

Hide all new location APIs related to LocationRequest/Geofence and
undeprecate all deprecated APIs consequently to the LocationRequest and
Geofence introduction. Also introduce LocationRequestUnbundled for
LocationProviders to use.

Change-Id: I5b116c7d342041f45b341c88a4b6813571118018
/frameworks/base/location/java/android/location/Location.java
779b77455fc51382ecafa210b8a805d2a616da55 31-Oct-2012 Victoria Lease <violets@google.com> fix NLP for COARSE applications, build FLP with SDK

In this commit, we provide a means for unbundled location providers
to attach an EXTRA_NO_GPS_LOCATION to the Locations that they report.

We also build FusedLocation against the SDK rather than the internal
tree.

Used in conjunction with I394ded497b8de40d1f85618bff282553cdf378cb
to fix NLP for applications with only ACCESS_COARSE_LOCATION
permission.

Bug: 7453355
Change-Id: Ie696f7abff9ef5237740ab87fe9f537a1c812c54
/frameworks/base/location/java/android/location/Location.java
4118012da9a22694b3353040a485f8cdc27e2f17 26-Sep-2012 Philip Milne <pmilne@google.com> Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()

Change-Id: Ie38952bbaace080e81e41e61350cda172951d548
/frameworks/base/location/java/android/location/Location.java
bc391d58c8d09bd58b57dda20dd9d2281d90db32 24-Sep-2012 Philip Milne <pmilne@google.com> Merge "Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"" into jb-mr1-dev
53fe75677212d0eb45e256a78599d7866256bc6a 24-Sep-2012 Philip Milne <pmilne@google.com> Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"

This reverts commit 2f6d8829524dfca3a77e9a57c3b9c3862209877d

Change-Id: Id5af767a09fc319127c4ebef837c5b7a7f75cb01
/frameworks/base/location/java/android/location/Location.java
b00df8e929f9ba865a95a7df3f949e6169332954 24-Sep-2012 Philip Milne <pmilne@google.com> Merge "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()" into jb-mr1-dev
17e3e9e53c5fb9c92c8972a8d92659c6bef85831 24-Sep-2012 Victoria Lease <violets@google.com> Merge "Do not use passive GPS data for COARSE only apps." into jb-mr1-dev
2f6d8829524dfca3a77e9a57c3b9c3862209877d 21-Sep-2012 Philip Milne <pmilne@google.com> Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()

Change-Id: I71c24ea10093ece07a0780e97bc641ff548c1a44
/frameworks/base/location/java/android/location/Location.java
09016ab4dd056a16809419d612cb865a14980880 16-Sep-2012 Victoria Lease <violets@google.com> Do not use passive GPS data for COARSE only apps.

FusionEngine now attaches a secondary location that has never seen
GPS data to its result. LocationFudger uses the GPS-less location so
that COARSE apps never see data from the GPS provider.

When the previous location is updated, the previous GPS-less location
is carried over if the location update was GPS-only.

Additionally, apps without FINE permission are not notified when GPS
location changes, and any attempt to use GPS_PROVIDER without FINE
permission is met by a stern SecurityException.

Bug: 7153659
Change-Id: I12f26725782892038ce1133561e1908d91378a4a
/frameworks/base/location/java/android/location/Location.java
8a624ef0fe5e86031f15f4120205c869e34f6637 21-Sep-2012 Romain Guy <romainguy@google.com> API REVIEW: Undeprecate Location.dump()
Bug #7173109

Change-Id: Ia2f4a5b6255dae7ace4702f7d66ec30a077c9c79
/frameworks/base/location/java/android/location/Location.java
5584b497b7fcd8660cc49cfc8ab4dd0c6dad1060 20-Aug-2012 Nick Pelly <npelly@google.com> Print timestamp (instead of age) in Location#toString()

Age was a bad idea, since it depends when toString() was called

Change-Id: Ica0b6bfa9a93b5a452ba3def5fbb2b0a0194c401
/frameworks/base/location/java/android/location/Location.java
4e31c4fffbc42b4c2b5dca6431cfeef9e078f5b4 14-Aug-2012 Nick Pelly <npelly@google.com> Add javadoc for new location API's.

Change-Id: If15024ee88421c07ba3a174747774fc451fd002e
/frameworks/base/location/java/android/location/Location.java
6fa9ad4afcd762aea519ff61811386c23d18ddb2 16-Jul-2012 Nick Pelly <npelly@google.com> Location overhaul, major commit.

Themes: Fused Location, Geofencing, LocationRequest.

API changes
o Fused location is always returned when asking for location by Criteria.
o Fused location is never returned as a LocationProvider object, nor returned
as a provider String. This wouldn't make sense because the current API
design assumes that LocationProvider's have fixed properties (accuracy, power
etc).
o The fused location engine will tune itself based on the criteria passed
by applications.
o Deprecate LocationProvider. Apps should use fused location (via Criteria
class), instead of enumerating through LocationProvider objects. It is
also over-engineered: designed for a world with a plethora of location
providers that never materialized.
o The Criteria class is also over-engineered, with many methods that aren't
currently used, but for now we won't deprecate them since they may have
value in the future. It is now used to tune the fused location engine.
o Deprecate getBestProvider() and getProvider().
o Add getLastKnownLocation(Criteria), so we can return last known
fused locations.
o Apps with only ACCESS_COARSE_LOCATION _can_ now use the GPS, but the location
they receive will be fudged to a 1km radius. They can also use NETWORK
and fused locatoins, which are fudged in the same way if necessary.
o Totally deprecate Criteria, in favor of LocationRequest.
Criteria was designed to map QOS to a location provider. What we
really need is to map QOS to _locations_.
The death knell was the conflicting ACCURACY_ constants on
Criteria, with values 1, 2, 3, 1, 2. Yes not a typo.
o Totally deprecate LocationProvider.
o Deprecate test/mock provider support. They require a named provider,
which is a concept we are moving away from. We do not yet have a
replacement, but I think its ok to deprecate since you also
need to have 'allow mock locations' checked in developer settings.
They will continue to work.
o Deprecate event codes associated with provider status. The fused
provider is _always_ available.
o Introduce Geofence data object to provide an easier path fowards
for polygons etc.

Implementation changes
o Fused implementation: incoming (GPS and NLP) location fixes are given
a weight, that exponentially decays with respect to age and accuracy.
The half-life of age is ~60 seconds, and the half-life of accuracy is
~20 meters. The fixes are weighted and combined to output a fused
location.
o Move Fused Location impl into
frameworks/base/packages/FusedLocation
o Refactor Fused Location behind the IProvider AIDL interface. This allow us
to distribute newer versions of Fused Location in a new APK, at run-time.
o Introduce ServiceWatcher.java, to refactor code used for run-time upgrades of
Fused Location, and the NLP.
o Fused Location is by default run in the system server (but can be moved to
any process or pacakge, even at run-time).
o Plumb the Criteria requirements through to the Fused Location provider via
ILocation.sendExtraCommand(). I re-used this interface to avoid modifying the
ILocation interface, which would have broken run-time upgradability of the
NLP.
o Switch the geofence manager to using fused location.
o Clean up 'adb shell dumpsys location' output.
o Introduce config_locationProviderPackageNames and
config_overlay_locationProviderPackageNames to configure the default
and overlay package names for Geocoder, NLP and FLP.
o Lots of misc cleanup.
o Improve location fudging. Apply random vector then quantize.
o Hide internal POJO's from clients of com.android.location.provider.jar
(NLP and FLP). Introduce wrappers ProviderRequestUnbundled and
ProviderPropertiesUnbundled.
o Introduce ProviderProperties to collapse all the provider accuracy/
bearing/altitude/power plumbing (that is deprecated anyway).
o DELETE lots of code: DummyLocationProvider,
o Rename the (internal) LocationProvider to LocationProviderBase.
o Plumb pid, uid and packageName throughout
LocationManagerService#Receiver to support future features.

TODO: The FLP and Geofencer have a lot of room to be more intelligent
TODO: Documentation
TODO: test test test

Change-Id: Iacefd2f176ed40ce1e23b090a164792aa8819c55
/frameworks/base/location/java/android/location/Location.java
2eeeec248a38ff33999c83f4b8d5bab7d50e79d2 18-Jul-2012 Nick Pelly <npelly@google.com> Improve Location object.

Add getElapsedRealtimeNano():

Currently Location just has getTime() and setTime() based on UTC time.
This is entirely unreliable since it is not guaranteed monotonic.
There is a lot of code that compares fix age based on deltas -
and it is all broken in the case of a system clock change. System
clock can change when switching cellular networks (and in some
cases when switching towers).

Document the meaning of getAccuracy():
It is the horizontal, 95% confidence radius.

Make some fields mandatory if they are reported by a LocationProvider:

All Locations returned by a LocationProvider must include at the
minimum a lat, long, timestamps, and accuracy. This is necessary
to perform fused location. There are no public API's for applications
to feed locations into a location provider so this should not cause
any breakage.

If a LocationProvider does not fill in enough fields on a Location
object then it is dropped, and logged.

Bug: 4305998
Change-Id: I7df77125d8a64e174d7bc8c2708661b4f33461ea
/frameworks/base/location/java/android/location/Location.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/location/java/android/location/Location.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/location/java/android/location/Location.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/location/java/android/location/Location.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/location/java/android/location/Location.java