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

Commit 5d0e70f2 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed that locale tracker incorrectly used the invalid cell info

Fixed that the locale tracker used the invalid cached cell info
when airplane mode is turned on. We should clear the cache when
airplane mode is on.

Test: Manual
Bug: 79230575
Change-Id: I3669ce4aef4d4fa5ba293478f699eb819da0faab
parent 5febcd55
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -217,13 +217,11 @@ public class LocaleTracker extends Handler {
     */
    public synchronized void updateOperatorNumericSync(String operatorNumeric) {
        // Check if the operator numeric changes.
        String msg = "updateOperatorNumeric. mcc/mnc=" + operatorNumeric;
        if (DBG) log("updateOperatorNumericSync. mcc/mnc=" + operatorNumeric);
        if (!Objects.equals(mOperatorNumeric, operatorNumeric)) {
            String msg = "Operator numeric changes to " + operatorNumeric;
            if (DBG) log(msg);
            mLocalLog.log(msg);
        if (!Objects.equals(mOperatorNumeric, operatorNumeric)) {
            if (DBG) {
                log("onUpdateOperatorNumeric: operator numeric changes to " + operatorNumeric);
            }
            mOperatorNumeric = operatorNumeric;

            // If the operator numeric becomes unavailable, we need to get the latest cell info so
@@ -279,7 +277,8 @@ public class LocaleTracker extends Handler {
    private void getCellInfo() {
        String msg;
        if (!mPhone.getServiceStateTracker().getDesiredPowerState()) {
            msg = "Radio is off. No need to get cell info.";
            msg = "Radio is off. Skipped getting cell info. Cleared the previous cached cell info.";
            mCellInfo.clear();
            if (DBG) log(msg);
            mLocalLog.log(msg);
            return;