summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2016-01-13 13:14:03 -0800
committerSteve Kondik <steve@cyngn.com>2016-07-02 10:54:35 -0700
commit47ea7c7916fb8bd5e9441e339dbb65d2b36537c6 (patch)
tree7294a6c2a21103ec2563a0324663946a996cac04 /services
parent914b672445bc6abc6d045b2fe208216621614da3 (diff)
downloadframeworks_base-47ea7c7916fb8bd5e9441e339dbb65d2b36537c6.zip
frameworks_base-47ea7c7916fb8bd5e9441e339dbb65d2b36537c6.tar.gz
frameworks_base-47ea7c7916fb8bd5e9441e339dbb65d2b36537c6.tar.bz2
combo bug when location reported by providers do not come with extras
LocationManagerService tries to create an extra bundle and stick it into the location object, but it is not doing it correctly. As a result, combo drops report. Change-Id: I6f5886dd7f14819ecc7a4ed96c867a0ec486faf7 CRs-Fixed: 962746
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/LocationManagerService.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index ebe8759..6cd8e10 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -2418,11 +2418,8 @@ public class LocationManagerService extends ILocationManager.Stub {
Bundle extras = location.getExtras();
boolean isBeingScreened = false;
- if (extras == null) {
- extras = new Bundle();
- }
- if (!extras.containsKey(mComboNlpReadyMarker)) {
+ if (extras == null || !extras.containsKey(mComboNlpReadyMarker)) {
// see if Combo Nlp is a passive listener
ArrayList<UpdateRecord> records =
mRecordsByProvider.get(LocationManager.PASSIVE_PROVIDER);
@@ -2431,6 +2428,10 @@ public class LocationManagerService extends ILocationManager.Stub {
if (r.mReceiver.mPackageName.equals(mComboNlpPackageName)) {
if (!isBeingScreened) {
isBeingScreened = true;
+ if (extras == null) {
+ location.setExtras(new Bundle());
+ extras = location.getExtras();
+ }
extras.putBoolean(mComboNlpScreenMarker, true);
}
// send location to Combo Nlp for screening