summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2016-01-13 21:14:03 (GMT)
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-07-25 20:26:57 (GMT)
commita405c90500e4f032cc5eca2a5bbe714072388c09 (patch)
treee565f2dba1ad981f27414da7430602d24b15e9fd
parent7b20d4354de149b13239a8ce8dfe7ebe86f318d3 (diff)
downloadframeworks_base-a405c90500e4f032cc5eca2a5bbe714072388c09.zip
frameworks_base-a405c90500e4f032cc5eca2a5bbe714072388c09.tar.gz
frameworks_base-a405c90500e4f032cc5eca2a5bbe714072388c09.tar.bz2
combo issue 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
-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 907d562..cf42ec3 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -3062,11 +3062,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);
@@ -3075,6 +3072,10 @@ public class LocationManagerService extends ILocationManager.Stub {
if (r.mReceiver.mIdentity.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