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

Commit 6b8e1174 authored by Chris Manton's avatar Chris Manton
Browse files

Save data registration roaming state

Some carriers require different APNs based upon
the roaming state returned in a previous registration
call.  The carrier config has the option to override
roaming state.  This change saves the proper roaming
state before the carrier config may override in order
to select the proper APN when setting up a data connection.

bug: 22990977
Change-Id: Id22a60efcbea9637018cc47e6d97f68eb053deb0
parent f644365c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1113,6 +1113,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
     * for roaming or not roaming for the current service state.
     */
    protected void updateRoamingState() {
        // Save the roaming state before carrier config possibly overrides it.
        mNewSS.setDataRoamingFromRegistration(mNewSS.getDataRoaming());

        ICarrierConfigLoader configLoader =
            (ICarrierConfigLoader) ServiceManager.getService(Context.CARRIER_CONFIG_SERVICE);
        if (configLoader != null) {
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ public final class DataConnection extends StateMachine {
        }

        String protocol;
        if (mPhone.getServiceState().getDataRoaming()) {
        if (mPhone.getServiceState().getDataRoamingFromRegistration()) {
            protocol = mApnSetting.roamingProtocol;
        } else {
            protocol = mApnSetting.protocol;
+3 −0
Original line number Diff line number Diff line
@@ -874,6 +874,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
            roaming = false;
        }

        // Save the roaming state before carrier config possibly overrides it.
        mNewSS.setDataRoamingFromRegistration(roaming);

        ICarrierConfigLoader configLoader =
            (ICarrierConfigLoader) ServiceManager.getService(Context.CARRIER_CONFIG_SERVICE);
        if (configLoader != null) {