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

Commit 9ec7ebbd authored by Hunsuk Choi's avatar Hunsuk Choi Committed by Android (Google) Code Review
Browse files

Merge "Change the initial value of mLastBarringInfo"

parents b39318b5 4badb988
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.Message;
import android.os.Registrant;
import android.os.RegistrantList;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.BarringInfo;
import android.telephony.TelephonyManager;
import android.telephony.emergency.EmergencyNumber;

@@ -173,6 +174,8 @@ public abstract class BaseCommands implements CommandsInterface {
    // Cache last emergency number list indication from radio
    private final List<EmergencyNumber> mLastEmergencyNumberListIndication = new ArrayList<>();

    // The last barring information received
    protected BarringInfo mLastBarringInfo = new BarringInfo();
    // Preferred network type received from PhoneFactory.
    // This is used when establishing a connection to the
    // vendor ril so it starts up in the correct mode.
@@ -913,6 +916,7 @@ public abstract class BaseCommands implements CommandsInterface {
                    || mState == TelephonyManager.RADIO_POWER_UNAVAILABLE)
                    && (oldState == TelephonyManager.RADIO_POWER_ON)) {
                mOffOrNotAvailRegistrants.notifyRegistrants();
                mLastBarringInfo = new BarringInfo();
            }
        }
    }
@@ -931,6 +935,12 @@ public abstract class BaseCommands implements CommandsInterface {
        }
    }

    /** {@inheritDoc} */
    @Override
    public @NonNull BarringInfo getLastBarringInfo() {
        return mLastBarringInfo;
    }

    /**
     * {@inheritDoc}
     */
+0 −9
Original line number Diff line number Diff line
@@ -275,9 +275,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
    final RilHandler mRilHandler;
    private MockModem mMockModem;

    // The last barring information received
    private BarringInfo mLastBarringInfo = null;

    // Thread-safe HashMap to map from RIL_REQUEST_XXX constant to HalVersion.
    // This is for Radio HAL Fallback Compatibility feature. When a RIL request
    // is received, the HAL method from the mapping HalVersion here (if present),
@@ -7178,12 +7175,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
        mBarringInfoChangedRegistrants.notifyRegistrants(new AsyncResult(null, barringInfo, null));
    }

    /** {@inheritDoc} */
    @Override
    public @Nullable BarringInfo getLastBarringInfo() {
        return mLastBarringInfo;
    }

    /**
     * Get the HAL version with a specific service.
     *