Loading core/java/android/net/MobileDataStateTracker.java +12 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public class MobileDataStateTracker implements NetworkStateTracker { private static final String TAG = "MobileDataStateTracker"; private static final boolean DBG = true; private static final boolean VDBG = false; private Phone.DataState mMobileDataState; private ITelephony mPhoneService; Loading Loading @@ -156,10 +157,15 @@ public class MobileDataStateTracker implements NetworkStateTracker { private class MobileDataStateReceiver extends BroadcastReceiver { IConnectivityManager mConnectivityManager; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(TelephonyIntents. ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) { String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY); if (VDBG) Log.d(TAG, String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED" + "mApnType=%s %s received apnType=%s", mApnType, TextUtils.equals(apnType, mApnType) ? "==" : "!=", apnType)); if (!TextUtils.equals(apnType, mApnType)) { return; } Loading Loading @@ -249,6 +255,8 @@ public class MobileDataStateTracker implements NetworkStateTracker { equals(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED)) { String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY); if (!TextUtils.equals(apnType, mApnType)) { if (DBG) Log.d(TAG, String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_FAILED ignore, mApnType=%s != received apnType=%s", mApnType, apnType)); return; } String reason = intent.getStringExtra(Phone.FAILURE_REASON_KEY); Loading @@ -256,6 +264,8 @@ public class MobileDataStateTracker implements NetworkStateTracker { if (DBG) Log.d(TAG, mApnType + "Received " + intent.getAction() + " broadcast" + reason == null ? "" : "(" + reason + ")"); setDetailedState(DetailedState.FAILED, reason, apnName); } else { if (DBG) Log.d(TAG, "Broadcast received: ignore " + intent.getAction()); } } } Loading services/java/com/android/server/TelephonyRegistry.java +2 −2 Original line number Diff line number Diff line Loading @@ -388,8 +388,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { return; } Slog.i(TAG, "notifyDataConnection: state=" + state + " isDataConnectivityPossible=" + isDataConnectivityPossible + " reason=" + reason + " apn=" + apn + " networkType=" + networkType); + isDataConnectivityPossible + " reason='" + reason + "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType); synchronized (mRecords) { boolean modified = false; if (state == TelephonyManager.DATA_CONNECTED) { Loading telephony/java/com/android/internal/telephony/DataConnectionTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -687,7 +687,7 @@ public abstract class DataConnectionTracker extends Handler { public boolean isApnTypeEnabled(String apnType) { if (apnType == null) { apnType = getActiveApnString(); apnType = getActiveApnType(); } return isApnIdEnabled(apnTypeToId(apnType)); } Loading telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier { mRegistry.notifyDataConnection( convertDataState(state), sender.isDataConnectivityPossible(), reason, sender.getActiveApn(), sender.getActiveApnHost(), apnType, linkProperties, linkCapabilities, Loading telephony/java/com/android/internal/telephony/Phone.java +6 −5 Original line number Diff line number Diff line Loading @@ -309,16 +309,17 @@ public interface Phone { /** * Returns an array of string identifiers for the APN types serviced by the * currently active or last connected APN. * @return The string array. * currently active. * @return The string array will always return at least one entry, Phone.APN_TYPE_DEFAULT. * TODO: Revisit if we always should return at least one entry. */ String[] getActiveApnTypes(); /** * Returns a string identifier for currently active or last connected APN. * @return The string name. * Returns string for the active APN host. * @return type as a string or null if none. */ String getActiveApn(); String getActiveApnHost(); /** * Return the LinkProperties for the named apn or null if not available Loading Loading
core/java/android/net/MobileDataStateTracker.java +12 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public class MobileDataStateTracker implements NetworkStateTracker { private static final String TAG = "MobileDataStateTracker"; private static final boolean DBG = true; private static final boolean VDBG = false; private Phone.DataState mMobileDataState; private ITelephony mPhoneService; Loading Loading @@ -156,10 +157,15 @@ public class MobileDataStateTracker implements NetworkStateTracker { private class MobileDataStateReceiver extends BroadcastReceiver { IConnectivityManager mConnectivityManager; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(TelephonyIntents. ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) { String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY); if (VDBG) Log.d(TAG, String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED" + "mApnType=%s %s received apnType=%s", mApnType, TextUtils.equals(apnType, mApnType) ? "==" : "!=", apnType)); if (!TextUtils.equals(apnType, mApnType)) { return; } Loading Loading @@ -249,6 +255,8 @@ public class MobileDataStateTracker implements NetworkStateTracker { equals(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED)) { String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY); if (!TextUtils.equals(apnType, mApnType)) { if (DBG) Log.d(TAG, String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_FAILED ignore, mApnType=%s != received apnType=%s", mApnType, apnType)); return; } String reason = intent.getStringExtra(Phone.FAILURE_REASON_KEY); Loading @@ -256,6 +264,8 @@ public class MobileDataStateTracker implements NetworkStateTracker { if (DBG) Log.d(TAG, mApnType + "Received " + intent.getAction() + " broadcast" + reason == null ? "" : "(" + reason + ")"); setDetailedState(DetailedState.FAILED, reason, apnName); } else { if (DBG) Log.d(TAG, "Broadcast received: ignore " + intent.getAction()); } } } Loading
services/java/com/android/server/TelephonyRegistry.java +2 −2 Original line number Diff line number Diff line Loading @@ -388,8 +388,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { return; } Slog.i(TAG, "notifyDataConnection: state=" + state + " isDataConnectivityPossible=" + isDataConnectivityPossible + " reason=" + reason + " apn=" + apn + " networkType=" + networkType); + isDataConnectivityPossible + " reason='" + reason + "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType); synchronized (mRecords) { boolean modified = false; if (state == TelephonyManager.DATA_CONNECTED) { Loading
telephony/java/com/android/internal/telephony/DataConnectionTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -687,7 +687,7 @@ public abstract class DataConnectionTracker extends Handler { public boolean isApnTypeEnabled(String apnType) { if (apnType == null) { apnType = getActiveApnString(); apnType = getActiveApnType(); } return isApnIdEnabled(apnTypeToId(apnType)); } Loading
telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier { mRegistry.notifyDataConnection( convertDataState(state), sender.isDataConnectivityPossible(), reason, sender.getActiveApn(), sender.getActiveApnHost(), apnType, linkProperties, linkCapabilities, Loading
telephony/java/com/android/internal/telephony/Phone.java +6 −5 Original line number Diff line number Diff line Loading @@ -309,16 +309,17 @@ public interface Phone { /** * Returns an array of string identifiers for the APN types serviced by the * currently active or last connected APN. * @return The string array. * currently active. * @return The string array will always return at least one entry, Phone.APN_TYPE_DEFAULT. * TODO: Revisit if we always should return at least one entry. */ String[] getActiveApnTypes(); /** * Returns a string identifier for currently active or last connected APN. * @return The string name. * Returns string for the active APN host. * @return type as a string or null if none. */ String getActiveApn(); String getActiveApnHost(); /** * Return the LinkProperties for the named apn or null if not available Loading