Reduce the ConnectivityManager logging.

Same great info, just fewer chars.
This commit is contained in:
Robert Greenwalt
2009-09-30 21:01:30 -07:00
parent affc3a1c31
commit 423dbbc68a

View File

@@ -765,8 +765,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
*/
private void handleDisconnect(NetworkInfo info) {
if (DBG) Log.v(TAG, "Handle DISCONNECT for " + info.getTypeName());
int prevNetType = info.getType();
if (DBG) {
Log.v(TAG, "Handle DISCONNECT for " + info.getTypeName() +
(mNetAttributes[prevNetType].isDefault() ? ", a default network" : ""));
}
mNetTrackers[prevNetType].setTeardownRequested(false);
/*
@@ -806,7 +809,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
*/
NetworkStateTracker newNet = null;
if (mNetAttributes[prevNetType].isDefault()) {
if (DBG) Log.d(TAG, "disconnecting a default network");
if (mActiveDefaultNetwork == prevNetType) {
mActiveDefaultNetwork = -1;
}
@@ -1051,7 +1053,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
* table entries exist.
*/
private void handleConnectivityChange() {
if (DBG) Log.d(TAG, "handleConnectivityChange");
/*
* If a non-default network is enabled, add the host routes that
* will allow it's DNS servers to be accessed. Only
@@ -1147,21 +1148,21 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
private void handleDnsConfigurationChange() {
if (DBG) Log.d(TAG, "handleDnsConfig Change");
// add default net's dns entries
for (int x = mPriorityList.length-1; x>= 0; x--) {
int netType = mPriorityList[x];
NetworkStateTracker nt = mNetTrackers[netType];
if (DBG) Log.d(TAG, " checking " + nt);
if (nt != null && nt.getNetworkInfo().isConnected() &&
!nt.isTeardownRequested()) {
if (DBG) Log.d(TAG, " connected");
String[] dnsList = nt.getNameServers();
if (mNetAttributes[netType].isDefault()) {
int j = 1;
for (String dns : dnsList) {
if (dns != null && !TextUtils.equals(dns, "0.0.0.0")) {
if (DBG) Log.d(TAG, " adding "+dns);
if (DBG) {
Log.d(TAG, "adding dns " + dns + " for " +
nt.getNetworkInfo().getTypeName());
}
SystemProperties.set("net.dns" + j++, dns);
}
}