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

Commit d41f94df authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Chiachang Wang
Browse files

Switch to using the NetworkAgentConfig.Builder API.

Bug: 138306002
Test: atest FrameworksTelephonyTests
Test: builds, boots, wifi works, telephony works
Change-Id: I040efef2a92e7ddc5d437ea3df31357e7f0c4377
Merged-In: I040efef2a92e7ddc5d437ea3df31357e7f0c4377
parent 8cc9f9c8
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -2046,17 +2046,23 @@ public class DataConnection extends StateMachine {
            mNetworkInfo.setExtraInfo(mApnSetting.getApnName());
            updateTcpBufferSizes(mRilRat);

            final NetworkAgentConfig config = new NetworkAgentConfig();
            final NetworkAgentConfig.Builder configBuilder = new NetworkAgentConfig.Builder();
            final CarrierSignalAgent carrierSignalAgent = mPhone.getCarrierSignalAgent();
            if (carrierSignalAgent.hasRegisteredReceivers(TelephonyIntents
                    .ACTION_CARRIER_SIGNAL_REDIRECTED)) {
                // carrierSignal Receivers will place the carrier-specific provisioning notification
                config.provisioningNotificationDisabled = true;
                configBuilder.disableProvisioningNotification();
            }

            final String subscriberId = mPhone.getSubscriberId();
            if (!TextUtils.isEmpty(subscriberId)) {
                configBuilder.setSubscriberId(subscriberId);
            }
            config.subscriberId = mPhone.getSubscriberId();

            // set skip464xlat if it is not default otherwise
            config.skip464xlat = shouldSkip464Xlat();
            if (shouldSkip464Xlat()) {
                configBuilder.disableNat64Detection();
            }

            mUnmeteredUseOnly = isUnmeteredUseOnly();

@@ -2114,7 +2120,8 @@ public class DataConnection extends StateMachine {
                mDisabledApnTypeBitMask |= getDisallowedApnTypes();

                mNetworkAgent = new DcNetworkAgent(DataConnection.this,
                        mPhone, mNetworkInfo, mScore, config, providerId, mTransportType);
                        mPhone, mNetworkInfo, mScore, configBuilder.build(), providerId,
                        mTransportType);
            }

            if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WWAN) {