Loading services/java/com/android/server/TelephonyRegistry.java +11 −8 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private int mDataActivity = TelephonyManager.DATA_ACTIVITY_NONE; private int mDataConnectionState = TelephonyManager.DATA_CONNECTED; private int mDataConnectionState = TelephonyManager.DATA_UNKNOWN; private boolean mDataConnectionPossible = false; Loading Loading @@ -401,7 +401,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } else { mConnectedApns.remove(apnType); if (mConnectedApns.remove(apnType)) { if (mConnectedApns.isEmpty()) { mDataConnectionState = state; modified = true; Loading @@ -410,15 +410,18 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { // send out the new status for the APN in question. } } } mDataConnectionPossible = isDataConnectivityPossible; mDataConnectionReason = reason; mDataConnectionLinkProperties = linkProperties; mDataConnectionLinkCapabilities = linkCapabilities; if (mDataConnectionNetworkType != networkType) { mDataConnectionNetworkType = networkType; // need to tell registered listeners about the new network type modified = true; } if (modified) { Slog.d(TAG, "onDataConnectionStateChanged(" + state + ", " + networkType + ")"); for (Record r : mRecords) { if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) { try { Loading telephony/java/android/telephony/TelephonyManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -802,6 +802,10 @@ public class TelephonyManager { } } /** Data connection state: Unknown. Used before we know the state. * @hide */ public static final int DATA_UNKNOWN = -1; /** Data connection state: Disconnected. IP traffic not available. */ public static final int DATA_DISCONNECTED = 0; /** Data connection state: Currently setting up a data connection. */ Loading telephony/java/com/android/internal/telephony/DataConnectionTracker.java +3 −0 Original line number Diff line number Diff line Loading @@ -659,6 +659,9 @@ public abstract class DataConnectionTracker extends Handler { protected abstract boolean isDataAllowed(); public boolean isApnTypeEnabled(String apnType) { if (apnType == null) { apnType = getActiveApnString(); } return isApnIdEnabled(apnTypeToId(apnType)); } Loading telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +0 −4 Original line number Diff line number Diff line Loading @@ -94,10 +94,6 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnection(Phone sender, String reason, String apnType) { doNotifyDataConnection(sender, reason, apnType, sender.getDataConnectionState(apnType)); } public void notifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { doNotifyDataConnection(sender, reason, apnType, state); Loading telephony/java/com/android/internal/telephony/PhoneBase.java +6 −1 Original line number Diff line number Diff line Loading @@ -742,7 +742,12 @@ public abstract class PhoneBase extends Handler implements Phone { } public void notifyDataConnection(String reason, String apnType) { mNotifier.notifyDataConnection(this, reason, apnType); mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType)); } public void notifyDataConnection() { String apn = getActiveApn(); mNotifier.notifyDataConnection(this, null, apn, getDataConnectionState(apn)); } public void notifyOtaspChanged(int otaspMode) { Loading Loading
services/java/com/android/server/TelephonyRegistry.java +11 −8 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private int mDataActivity = TelephonyManager.DATA_ACTIVITY_NONE; private int mDataConnectionState = TelephonyManager.DATA_CONNECTED; private int mDataConnectionState = TelephonyManager.DATA_UNKNOWN; private boolean mDataConnectionPossible = false; Loading Loading @@ -401,7 +401,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } else { mConnectedApns.remove(apnType); if (mConnectedApns.remove(apnType)) { if (mConnectedApns.isEmpty()) { mDataConnectionState = state; modified = true; Loading @@ -410,15 +410,18 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { // send out the new status for the APN in question. } } } mDataConnectionPossible = isDataConnectivityPossible; mDataConnectionReason = reason; mDataConnectionLinkProperties = linkProperties; mDataConnectionLinkCapabilities = linkCapabilities; if (mDataConnectionNetworkType != networkType) { mDataConnectionNetworkType = networkType; // need to tell registered listeners about the new network type modified = true; } if (modified) { Slog.d(TAG, "onDataConnectionStateChanged(" + state + ", " + networkType + ")"); for (Record r : mRecords) { if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) { try { Loading
telephony/java/android/telephony/TelephonyManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -802,6 +802,10 @@ public class TelephonyManager { } } /** Data connection state: Unknown. Used before we know the state. * @hide */ public static final int DATA_UNKNOWN = -1; /** Data connection state: Disconnected. IP traffic not available. */ public static final int DATA_DISCONNECTED = 0; /** Data connection state: Currently setting up a data connection. */ Loading
telephony/java/com/android/internal/telephony/DataConnectionTracker.java +3 −0 Original line number Diff line number Diff line Loading @@ -659,6 +659,9 @@ public abstract class DataConnectionTracker extends Handler { protected abstract boolean isDataAllowed(); public boolean isApnTypeEnabled(String apnType) { if (apnType == null) { apnType = getActiveApnString(); } return isApnIdEnabled(apnTypeToId(apnType)); } Loading
telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +0 −4 Original line number Diff line number Diff line Loading @@ -94,10 +94,6 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnection(Phone sender, String reason, String apnType) { doNotifyDataConnection(sender, reason, apnType, sender.getDataConnectionState(apnType)); } public void notifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { doNotifyDataConnection(sender, reason, apnType, state); Loading
telephony/java/com/android/internal/telephony/PhoneBase.java +6 −1 Original line number Diff line number Diff line Loading @@ -742,7 +742,12 @@ public abstract class PhoneBase extends Handler implements Phone { } public void notifyDataConnection(String reason, String apnType) { mNotifier.notifyDataConnection(this, reason, apnType); mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType)); } public void notifyDataConnection() { String apn = getActiveApn(); mNotifier.notifyDataConnection(this, null, apn, getDataConnectionState(apn)); } public void notifyOtaspChanged(int otaspMode) { Loading