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

Commit d9bfa2cc authored by Jack Yu's avatar Jack Yu Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add configuration to enable/disable force iwlan mms feature"" into main

parents baf34a1b 69d8b4d6
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1505,14 +1505,6 @@ public class DataConfigManager extends Handler {
                .collect(Collectors.toSet());
    }

    /**
     * {@code True} enables mms to be attempted on iwlan if possible, even if existing cellular
     *  networks already supports iwlan.
     */
    public boolean isForceIwlanMmsFeatureEnabled() {
        return mResources.getBoolean(com.android.internal.R.bool.force_iwlan_mms_feature_enabled);
    }

    /**
     * Log debug messages.
     * @param s debug messages
+3 −5
Original line number Diff line number Diff line
@@ -1266,7 +1266,7 @@ public class DataNetwork extends StateMachine {
                        getHandler(), EVENT_VOICE_CALL_ENDED, null);
            }

            if (mFlags.forceIwlanMms() && mDataConfigManager.isForceIwlanMmsFeatureEnabled()) {
            if (mFlags.forceIwlanMms()) {
                if (mDataProfile.canSatisfy(NetworkCapabilities.NET_CAPABILITY_MMS)) {
                    mAccessNetworksManagerCallback = new AccessNetworksManagerCallback(
                            getHandler()::post) {
@@ -1292,8 +1292,7 @@ public class DataNetwork extends StateMachine {
        @Override
        public void exit() {
            logv("Unregistering all events.");
            if (mFlags.forceIwlanMms() && mAccessNetworksManagerCallback != null
                    && mDataConfigManager.isForceIwlanMmsFeatureEnabled()) {
            if (mFlags.forceIwlanMms() && mAccessNetworksManagerCallback != null) {
                mAccessNetworksManager.unregisterCallback(mAccessNetworksManagerCallback);
            }

@@ -2492,8 +2491,7 @@ public class DataNetwork extends StateMachine {
        // will be attempted on IWLAN if possible, even if existing cellular networks already
        // supports IWLAN.
        if (mFlags.forceIwlanMms() && builder.build()
                .hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)
                && mDataConfigManager.isForceIwlanMmsFeatureEnabled()) {
                .hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) {
            // If QNS sets MMS preferred on IWLAN, and it is possible to setup an MMS network on
            // IWLAN, then we need to remove the MMS capability on the cellular network. This will
            // allow the new MMS network to be brought up on IWLAN when MMS network request arrives.
+0 −1
Original line number Diff line number Diff line
@@ -2419,7 +2419,6 @@ public class DataNetworkTest extends TelephonyTest {
    @Test
    public void testMmsCapabilityRemovedWhenMmsPreferredOnIwlan() throws Exception {
        doReturn(true).when(mFeatureFlags).forceIwlanMms();
        doReturn(true).when(mDataConfigManager).isForceIwlanMmsFeatureEnabled();
        setupDataNetwork();

        TelephonyNetworkAgent mockNetworkAgent = Mockito.mock(TelephonyNetworkAgent.class);