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

Commit cd338fdb authored by Vineeta Srivastava's avatar Vineeta Srivastava
Browse files

Revert "telephony: Set roam though same named operator"

This reverts commit ce0eb1a9.

Change-Id: I324343a218e155ece9f8243cdc44ce9fffe8e5d5
parent ce0eb1a9
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -746,8 +746,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
             * agreements and MVNO's.
             */
            boolean roaming = (mGsmRoaming || mDataRoaming);
            if ((mGsmRoaming && isSameNamedOperators(mNewSS)
                        && !isSameNamedOperatorConsideredRoaming(mNewSS))
            if ((mGsmRoaming && isSameNamedOperators(mNewSS))
                    || isOperatorConsideredNonRoaming(mNewSS)) {
                roaming = false;
            }
@@ -1373,23 +1372,6 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        return false;
    }

    private boolean isSameNamedOperatorConsideredRoaming(ServiceState s) {
        String operatorNumeric = s.getOperatorNumeric();
        String[] numericArray = mPhone.getContext().getResources().getStringArray(
                    com.android.internal.R.array.config_sameNamedOperatorConsideredRoaming);

        if (numericArray.length == 0 || operatorNumeric == null)
            return false;

        for (String numeric : numericArray) {
            if (operatorNumeric.startsWith(numeric))
                return true;
            else
                return false;
        }
        return false;
    }

    /**
     * @return The current GPRS state. IN_SERVICE is the same as "attached"
     * and OUT_OF_SERVICE is the same as detached.