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

Commit 7981aea7 authored by Hui Wang's avatar Hui Wang Committed by Sarah Chin
Browse files

Do not suspend emergency pdn

When emergency pdn established, data service may not be in service.
It should not be suspended in this case.

Bug: 162874325
Test: Manual
Change-Id: I7eaf15ae48f3f2dd48d19f435e4ff48df127d568
Merged-In: I7eaf15ae48f3f2dd48d19f435e4ff48df127d568
parent c024f16a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -493,6 +493,11 @@ public class DataConnection extends StateMachine {
        // Data can only be (temporarily) suspended while data is in active state
        if (getCurrentState() != mActiveState) return false;

        // never set suspend for emergency apn
        if (mApnSetting != null && mApnSetting.isEmergencyApn()) {
            return false;
        }

        // if we are not in-service change to SUSPENDED
        final ServiceStateTracker sst = mPhone.getServiceStateTracker();
        if (sst.getCurrentDataConnectionState() != ServiceState.STATE_IN_SERVICE) {