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

Commit d50d0c31 authored by Victoria Lease's avatar Victoria Lease
Browse files

don't complain about CDMA support on non-CDMA devices

GpsLocationProvider emits a message on CDMA phones, warning about
lack of CDMA support. It also emits this message on every other
non-GSM device. I've pulled the conditions in a bit for this so that
it only happens on actual CDMA devices.

Change-Id: I1a122e2599c83c730be014c61385e60ef819b5a1
parent b5b183d5
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1452,11 +1452,11 @@ public class GpsLocationProvider implements LocationProviderInterface {
    private void requestRefLocation(int flags) {
        TelephonyManager phone = (TelephonyManager)
                mContext.getSystemService(Context.TELEPHONY_SERVICE);
        if (phone.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
        final int phoneType = phone.getPhoneType();
        if (phoneType == TelephonyManager.PHONE_TYPE_GSM) {
            GsmCellLocation gsm_cell = (GsmCellLocation) phone.getCellLocation();
            if ((gsm_cell != null) && (phone.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) &&
                    (phone.getNetworkOperator() != null) &&
                        (phone.getNetworkOperator().length() > 3)) {
            if ((gsm_cell != null) && (phone.getNetworkOperator() != null)
                    && (phone.getNetworkOperator().length() > 3)) {
                int type;
                int mcc = Integer.parseInt(phone.getNetworkOperator().substring(0,3));
                int mnc = Integer.parseInt(phone.getNetworkOperator().substring(3));
@@ -1474,8 +1474,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
            } else {
                Log.e(TAG,"Error getting cell location info.");
            }
        }
        else {
        } else if (phoneType == TelephonyManager.PHONE_TYPE_CDMA) {
            Log.e(TAG, "CDMA not supported.");
        }
    }