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

Commit c6ac9ba9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Exclude IWLAN from data dormant" into rvc-dev am: 81306bdf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/11931286

Change-Id: Id5c016b41bc113cb462d748a273769c34f3cae74
parents f6ebbab3 81306bdf
Loading
Loading
Loading
Loading
+21 −18
Original line number Diff line number Diff line
@@ -392,6 +392,8 @@ public class DcController extends StateMachine {
                }
            }

            if (mDataServiceManager.getTransportType()
                    == AccessNetworkConstants.TRANSPORT_TYPE_WWAN) {
                if (isAnyDataCallDormant && !isAnyDataCallActive) {
                    // There is no way to indicate link activity per APN right now. So
                    // Link Activity will be considered dormant only when all data calls
@@ -399,19 +401,20 @@ public class DcController extends StateMachine {
                    // If a single data call is in dormant state and none of the data
                    // calls are active broadcast overall link state as dormant.
                    if (DBG) {
                    log("onDataStateChanged: Data Activity updated to DORMANT. stopNetStatePoll");
                        log("onDataStateChanged: Data activity DORMANT. stopNetStatePoll");
                    }
                    mDct.sendStopNetStatPoll(DctConstants.Activity.DORMANT);
                } else {
                    if (DBG) {
                    log("onDataStateChanged: Data Activity updated to NONE. " +
                            "isAnyDataCallActive = " + isAnyDataCallActive +
                            " isAnyDataCallDormant = " + isAnyDataCallDormant);
                        log("onDataStateChanged: Data Activity updated to NONE. "
                                + "isAnyDataCallActive = " + isAnyDataCallActive
                                + " isAnyDataCallDormant = " + isAnyDataCallDormant);
                    }
                    if (isAnyDataCallActive) {
                        mDct.sendStartNetStatPoll(DctConstants.Activity.NONE);
                    }
                }
            }

            if (DBG) {
                lr("onDataStateChanged: dcsToRetry=" + dcsToRetry
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.net.LinkProperties;
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Looper;
import android.telephony.AccessNetworkConstants;
import android.telephony.data.ApnSetting;
import android.telephony.data.DataCallResponse;
import android.test.suitebuilder.annotation.SmallTest;
@@ -99,6 +100,8 @@ public class DcControllerTest extends TelephonyTest {
        LinkProperties lp = new LinkProperties();
        mResult = new UpdateLinkPropertyResult(lp);
        doReturn(mResult).when(mDc).updateLinkProperty(any(DataCallResponse.class));
        doReturn(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
                .when(mDataServiceManager).getTransportType();

        mDcc = DcController.makeDcc(mPhone, mDcTracker, mDataServiceManager,
                new Handler(Looper.myLooper()), "");