use of android.net.LinkCapabilities in project XobotOS by xamarin.
the class DefaultPhoneNotifier method doNotifyDataConnection.
private void doNotifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) {
// TODO
// use apnType as the key to which connection we're talking about.
// pass apnType back up to fetch particular for this one.
TelephonyManager telephony = TelephonyManager.getDefault();
LinkProperties linkProperties = null;
LinkCapabilities linkCapabilities = null;
boolean roaming = false;
if (state == Phone.DataState.CONNECTED) {
linkProperties = sender.getLinkProperties(apnType);
linkCapabilities = sender.getLinkCapabilities(apnType);
}
ServiceState ss = sender.getServiceState();
if (ss != null)
roaming = ss.getRoaming();
try {
mRegistry.notifyDataConnection(convertDataState(state), sender.isDataConnectivityPossible(apnType), reason, sender.getActiveApnHost(apnType), apnType, linkProperties, linkCapabilities, ((telephony != null) ? telephony.getNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN), roaming);
} catch (RemoteException ex) {
// system process is dead
}
}
Aggregations