Log.d(TAG, "CONNECTED event did not supply interface name.");
}
mDefaultGatewayAddr = intent.getIntExtra(Phone.DATA_GATEWAY_KEY, 0);
+ if (mDefaultGatewayAddr == 0) {
+ Log.d(TAG, "CONNECTED event did not supply a default gateway.");
+ }
setDetailedState(DetailedState.CONNECTED, reason, apnName);
break;
}
intent.putExtra(Phone.DATA_APN_KEY, mApnName);
intent.putExtra(Phone.DATA_IFACE_NAME_KEY, mInterfaceName);
intent.putExtra(Phone.NETWORK_UNAVAILABLE_KEY, false);
+ intent.putExtra(Phone.DATA_GATEWAY_KEY, mDefaultGatewayAddr);
if (mStateReceiver != null) mStateReceiver.onReceive(mContext, intent);
break;
case Phone.APN_REQUEST_STARTED:
if (inetAddress == null) {
if (DBG) Log.d(TAG, " Unable to add default route. mDefaultGatewayAddr Error");
} else {
+ NetworkUtils.addHostRoute(mInterfaceName, inetAddress, null);
if (!NetworkUtils.addDefaultRoute(mInterfaceName, inetAddress) && DBG) {
Log.d(TAG, " Unable to add default route.");
}