Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a405c905 authored by Kevin Tang's avatar Kevin Tang Committed by Luca Stefani
Browse files

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
parent 7b20d435
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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