Log an event whenever we lose the default network.

Change-Id: Ia71865a90b2db5dc0d3ad627563a6b1f99686f04
This commit is contained in:
Pierre Imai
2016-04-12 18:02:58 +09:00
parent 6b4e15b155
commit 04e22225a7

View File

@@ -2206,6 +2206,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
mLegacyTypeTracker.remove(nai, wasDefault);
rematchAllNetworksAndRequests(null, 0);
if (wasDefault && getDefaultNetwork() == null) {
// Log that we lost the default network and there is no replacement.
final int[] transportTypes = new int[0];
ConnectivityServiceChangeEvent.logEvent(NETID_UNSET, nai.network.netId,
transportTypes);
}
if (nai.created) {
// Tell netd to clean up the configuration for this network
// (routing rules, DNS, etc).