Turn some logging back on in ConnectionManager
Trimmed a bunch of logging out, but turned it on so we get the critical stuff. bug: 2168291
This commit is contained in:
@@ -53,7 +53,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class ConnectivityService extends IConnectivityManager.Stub {
|
public class ConnectivityService extends IConnectivityManager.Stub {
|
||||||
|
|
||||||
private static final boolean DBG = false;
|
private static final boolean DBG = true;
|
||||||
private static final String TAG = "ConnectivityService";
|
private static final String TAG = "ConnectivityService";
|
||||||
|
|
||||||
// Event log tags (must be in sync with event-log-tags)
|
// Event log tags (must be in sync with event-log-tags)
|
||||||
@@ -740,7 +740,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
++numConnectedNets;
|
++numConnectedNets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DBG) Log.d(TAG, "numConnectedNets returning "+numConnectedNets);
|
|
||||||
return numConnectedNets;
|
return numConnectedNets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -766,10 +765,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
private void handleDisconnect(NetworkInfo info) {
|
private void handleDisconnect(NetworkInfo info) {
|
||||||
|
|
||||||
int prevNetType = info.getType();
|
int prevNetType = info.getType();
|
||||||
if (DBG) {
|
|
||||||
Log.v(TAG, "Handle DISCONNECT for " + info.getTypeName() +
|
|
||||||
(mNetAttributes[prevNetType].isDefault() ? ", a default network" : ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
mNetTrackers[prevNetType].setTeardownRequested(false);
|
mNetTrackers[prevNetType].setTeardownRequested(false);
|
||||||
/*
|
/*
|
||||||
@@ -878,11 +873,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
// do this before we broadcast the change
|
// do this before we broadcast the change
|
||||||
handleConnectivityChange();
|
handleConnectivityChange();
|
||||||
|
|
||||||
if (DBG) Log.v(TAG, "Sending DISCONNECT bcast for " +
|
|
||||||
info.getTypeName() +
|
|
||||||
(newNet == null || !newNet.isAvailable() ? "" : " other=" +
|
|
||||||
newNet.getNetworkInfo().getTypeName()));
|
|
||||||
|
|
||||||
sendStickyBroadcast(intent);
|
sendStickyBroadcast(intent);
|
||||||
/*
|
/*
|
||||||
* If the failover network is already connected, then immediately send
|
* If the failover network is already connected, then immediately send
|
||||||
@@ -975,8 +965,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleConnect(NetworkInfo info) {
|
private void handleConnect(NetworkInfo info) {
|
||||||
if (DBG) Log.d(TAG, "Handle CONNECT for " + info.getTypeName());
|
|
||||||
|
|
||||||
int type = info.getType();
|
int type = info.getType();
|
||||||
|
|
||||||
// snapshot isFailover, because sendConnectedBroadcast() resets it
|
// snapshot isFailover, because sendConnectedBroadcast() resets it
|
||||||
@@ -986,7 +974,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
// if this is a default net and other default is running
|
// if this is a default net and other default is running
|
||||||
// kill the one not preferred
|
// kill the one not preferred
|
||||||
if (mNetAttributes[type].isDefault()) {
|
if (mNetAttributes[type].isDefault()) {
|
||||||
if (DBG) Log.d(TAG, "connecting to a default network");
|
|
||||||
if (mActiveDefaultNetwork != -1 && mActiveDefaultNetwork != type) {
|
if (mActiveDefaultNetwork != -1 && mActiveDefaultNetwork != type) {
|
||||||
if ((type != mNetworkPreference &&
|
if ((type != mNetworkPreference &&
|
||||||
mNetAttributes[mActiveDefaultNetwork].mPriority >
|
mNetAttributes[mActiveDefaultNetwork].mPriority >
|
||||||
@@ -1016,7 +1003,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
mActiveDefaultNetwork = type;
|
mActiveDefaultNetwork = type;
|
||||||
}
|
}
|
||||||
thisNet.setTeardownRequested(false);
|
thisNet.setTeardownRequested(false);
|
||||||
if (DBG) Log.d(TAG, "Sending CONNECT bcast for " + info.getTypeName());
|
|
||||||
thisNet.updateNetworkSettings();
|
thisNet.updateNetworkSettings();
|
||||||
handleConnectivityChange();
|
handleConnectivityChange();
|
||||||
sendConnectedBroadcast(info);
|
sendConnectedBroadcast(info);
|
||||||
|
|||||||
Reference in New Issue
Block a user