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

Commit dbec8693 authored by kaiyiz's avatar kaiyiz
Browse files

Settings: Display null sub-item value when do AGPS acquisition parameter

If the value of "supl_host" and "supl_port" in Settings Provider
is null, will set values In GpsLocationProvider.java.

CRs-Fixed: 665458

Change-Id: Ibbd50ce2ba1d9ffc270cff52bd1a7511f1906d3a
parent f895471b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -540,6 +540,18 @@ public class GpsLocationProvider implements LocationProviderInterface {

            mSuplServerHost = mProperties.getProperty("SUPL_HOST");
            String portString = mProperties.getProperty("SUPL_PORT");

            ContentResolver objContentResolver = mContext.getContentResolver();
            if (Settings.Global.getString(objContentResolver,
                    ASSISTED_GPS_SUPL_HOST) == null
                    || Settings.Global.getString(objContentResolver,
                           ASSISTED_GPS_SUPL_PORT) == null) {
                Settings.Global.putString(objContentResolver,
                        ASSISTED_GPS_SUPL_HOST, mSuplServerHost);
                Settings.Global.putString(objContentResolver,
                        ASSISTED_GPS_SUPL_PORT, portString);
            }

            if (mSuplServerHost != null && portString != null) {
                try {
                    mSuplServerPort = Integer.parseInt(portString);