Merge "Data stall detection using DNS event"
am: 45c772fabc
Change-Id: I4b5248e97028bf8e9e837ff5ccf8e0d3138f7b05
This commit is contained in:
@@ -1667,6 +1667,24 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
loge("Error parsing ip address in validation event");
|
loge("Error parsing ip address in validation event");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDnsEvent(int netId, int eventType, int returnCode, String hostname,
|
||||||
|
String[] ipAddresses, int ipAddressesCount, long timestamp, int uid) {
|
||||||
|
NetworkAgentInfo nai = getNetworkAgentInfoForNetId(netId);
|
||||||
|
// Netd event only allow registrants from system. Each NetworkMonitor thread is under
|
||||||
|
// the caller thread of registerNetworkAgent. Thus, it's not allowed to register netd
|
||||||
|
// event callback for certain nai. e.g. cellular. Register here to pass to
|
||||||
|
// NetworkMonitor instead.
|
||||||
|
// TODO: Move the Dns Event to NetworkMonitor. Use Binder.clearCallingIdentity() in
|
||||||
|
// registerNetworkAgent to have NetworkMonitor created with system process as design
|
||||||
|
// expectation. Also, NetdEventListenerService only allow one callback from each
|
||||||
|
// caller type. Need to re-factor NetdEventListenerService to allow multiple
|
||||||
|
// NetworkMonitor registrants.
|
||||||
|
if (nai != null && nai.satisfies(mDefaultRequest)) {
|
||||||
|
nai.networkMonitor.sendMessage(NetworkMonitor.EVENT_DNS_NOTIFICATION, returnCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
Reference in New Issue
Block a user