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

Commit 1ec7b68a authored by Victoria Lease's avatar Victoria Lease Committed by Android (Google) Code Review
Browse files

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

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