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

Commit b08de4db authored by chen xu's avatar chen xu Committed by Chen Xu
Browse files

evaluate restricted connection once enter connecting state

Bug: 134205819
Test: Manual
Change-Id: I68fbc22a37df5e6c49fc3f0ed99ba67c14dcbb96
parent e69b95ad
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1768,6 +1768,14 @@ public class DataConnection extends StateMachine {
                    mApnSetting != null
                        ? mApnSetting.canHandleType(ApnSetting.TYPE_DEFAULT) : false);
            setHandoverState(HANDOVER_STATE_IDLE);
            // restricted evaluation depends on network requests from apnContext. The evaluation
            // should happen once entering connecting state rather than active state because it's
            // possible that restricted network request can be released during the connecting window
            // and if we wait for connection established, then we might mistakenly
            // consider it as un-restricted. ConnectivityService then will immediately
            // tear down the connection through networkAgent unwanted callback if all requests for
            // this connection are going away.
            mRestrictedNetworkOverride = shouldRestrictNetwork();
        }
        @Override
        public boolean processMessage(Message msg) {
@@ -1916,7 +1924,6 @@ public class DataConnection extends StateMachine {
            // set skip464xlat if it is not default otherwise
            misc.skip464xlat = shouldSkip464Xlat();

            mRestrictedNetworkOverride = shouldRestrictNetwork();
            mUnmeteredUseOnly = isUnmeteredUseOnly();

            if (DBG) {