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

Commit 343112fb authored by John Wang's avatar John Wang
Browse files

Remove APN type in notifyDataConnection.

Using APN_TYPE_ALL in notifyDataConnection causes data
connection state to be set as DISCONNECTED all the time
because apnTypeToId returns INVALID_ID for APN_TYPE_ALL.

bug:4972999
Change-Id: Ieb79194575dd97fa4bd7ef2bd8202030aa282d84
parent c27cc947
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -806,10 +806,10 @@ public abstract class PhoneBase extends Handler implements Phone {
        mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
    }

    public void notifyDataConnection() {
    public void notifyDataConnection(String reason) {
        String types[] = getActiveApnTypes();
        for (String apnType : types) {
            mNotifier.notifyDataConnection(this, null, apnType, getDataConnectionState(apnType));
            mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
        }

        if ((hasCdmaDataConnectionChanged || hasNetworkTypeChanged)) {
            phone.notifyDataConnection();
            phone.notifyDataConnection(null);
        }

        if (hasRoamingOn) {
+1 −1
Original line number Diff line number Diff line
@@ -999,7 +999,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        }

        if (hasCdmaDataConnectionChanged || hasNetworkTypeChanged) {
            phone.notifyDataConnection();
            phone.notifyDataConnection(null);
        }

        if (hasRoamingOn) {
+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        }

        if (hasRadioTechnologyChanged) {
            phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED, Phone.APN_TYPE_ALL);
            phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED);
        }

        if (hasRoamingOn) {