Increase readability of connectivity event log.

Bug: 6322766
Change-Id: I556759f5fc1466cdd4db6b4574084a8068dc9909
This commit is contained in:
Jeff Sharkey
2012-11-09 15:57:02 -08:00
parent dc456a66da
commit 876ddc9564

View File

@@ -2686,18 +2686,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
state + "/" + info.getDetailedState());
}
// Connectivity state changed:
// [31-14] Reserved for future use
// [13-10] Network subtype (for mobile network, as defined
// by TelephonyManager)
// [9-4] Detailed state ordinal (as defined by
// NetworkInfo.DetailedState)
// [3-0] Network type (as defined by ConnectivityManager)
int eventLogParam = (info.getType() & 0xf) |
((info.getDetailedState().ordinal() & 0x3f) << 4) |
(info.getSubtype() << 10);
EventLog.writeEvent(EventLogTags.CONNECTIVITY_STATE_CHANGED,
eventLogParam);
EventLogTags.writeConnectivityStateChanged(
info.getType(), info.getSubtype(), info.getDetailedState().ordinal());
if (info.getDetailedState() ==
NetworkInfo.DetailedState.FAILED) {