summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2012-07-18 13:13:37 -0700
committerNick Pelly <npelly@google.com>2012-07-20 10:07:07 -0700
commit2eeeec248a38ff33999c83f4b8d5bab7d50e79d2 (patch)
tree2886aaefdd09bbafa7853dbbbb29aa866846045f /api
parentb8acd060d409f0e81ab3510b429cb86d3f34adb8 (diff)
downloadframeworks_base-2eeeec248a38ff33999c83f4b8d5bab7d50e79d2.zip
frameworks_base-2eeeec248a38ff33999c83f4b8d5bab7d50e79d2.tar.gz
frameworks_base-2eeeec248a38ff33999c83f4b8d5bab7d50e79d2.tar.bz2
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
Diffstat (limited to 'api')
-rw-r--r--api/current.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index 8ae12a2..093d4c3 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10504,6 +10504,7 @@ package android.location {
method public float getAccuracy();
method public double getAltitude();
method public float getBearing();
+ method public long getElapsedRealtimeNano();
method public android.os.Bundle getExtras();
method public double getLatitude();
method public double getLongitude();
@@ -10523,6 +10524,7 @@ package android.location {
method public void setAccuracy(float);
method public void setAltitude(double);
method public void setBearing(float);
+ method public void setElapsedRealtimeNano(long);
method public void setExtras(android.os.Bundle);
method public void setLatitude(double);
method public void setLongitude(double);