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

Commit 469c2bbe authored by Chen Xu's avatar Chen Xu Committed by Android (Google) Code Review
Browse files

Merge "evaluate restricted connection once enter connecting state" into qt-r1-dev

parents e27d5931 b08de4db
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) {