Fix the removal of dns entries. am: 8e5b853511

Original change: undetermined

Change-Id: I3a87bf69dafe0bc7619e2e93aabff6b35e7a4a64
This commit is contained in:
Robert Greenwalt
2021-05-31 03:33:17 +00:00
committed by Automerger Merge Worker

View File

@@ -1111,11 +1111,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
int j = 1;
for (String dns : dnsList) {
if (dns != null && !TextUtils.equals(dns, "0.0.0.0")) {
if (DBG) Log.d(TAG, " adding "+dns);
SystemProperties.set("net.dns" + j++, dns);
}
}
for (int k=j ; k<mNumDnsEntries; k++) {
SystemProperties.set("net.dns" + j, "");
if (DBG) Log.d(TAG, "erasing net.dns" + k);
SystemProperties.set("net.dns" + k, "");
}
mNumDnsEntries = j;
} else {