Merge "Tell each VM to flush their DNS cache."

This commit is contained in:
Robert Greenwalt
2010-11-04 17:02:44 -07:00
committed by Android (Google) Code Review

View File

@@ -1596,6 +1596,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
} catch (NumberFormatException e) {} } catch (NumberFormatException e) {}
} }
SystemProperties.set("net.dnschange", "" + (n+1)); SystemProperties.set("net.dnschange", "" + (n+1));
/*
* Tell the VMs to toss their DNS caches
*/
Intent intent = new Intent(Intent.ACTION_CLEAR_DNS_CACHE);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
mContext.sendBroadcast(intent);
} }
private void handleDnsConfigurationChange(int netType) { private void handleDnsConfigurationChange(int netType) {