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

Commit 2d91402d authored by Nathan Harold's avatar Nathan Harold Committed by android-build-merger
Browse files

Null Check MCC and MNC for CellIdentity Location

am: 44369497

Change-Id: Ie14a58d3be79aba18b11186719529d0df1b29f40
parents 8b1a0aa6 44369497
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3337,10 +3337,13 @@ public class ServiceStateTracker extends Handler {
            // camped on a cell either to attempt registration or for emergency services, then
            // for purposes of setting the locale, we don't care if registration fails or is
            // incomplete.
            String localeOperator = isInvalidOperatorNumeric(operatorNumeric)
                    && (mCellIdentity != null)
                    ? mCellIdentity.getMccString() + mCellIdentity.getMncString()
                    : operatorNumeric;
            // CellIdentity can return a null MCC and MNC in CDMA
            String localeOperator = operatorNumeric;
            if (isInvalidOperatorNumeric(operatorNumeric) && (mCellIdentity != null)
                    && mCellIdentity.getMccString() != null
                    && mCellIdentity.getMncString() != null) {
                localeOperator = mCellIdentity.getMccString() + mCellIdentity.getMncString();
            }

            if (isInvalidOperatorNumeric(localeOperator)) {
                if (DBG) log("localeOperator " + localeOperator + " is invalid");