History log of /frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cf6b12f50aa3251a3fc9929c565f8a19eaaac49e 04-Jul-2016 Hugo Benichi <hugobenichi@google.com> IpConn metrics: use @IntDef

Change-Id: Iae23f04abd3d1a43e7217f4fd641cd5fa61a7a1b
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
cfddd6879283860bb4d2cf2972ea086f585a37ec 31-May-2016 Hugo Benichi <hugobenichi@google.com> Refactor IP connectivity event logging

This patch removes static methods for logging IP connectivity events
defined in android.net.metrics and replaces them with a single log()
instance method defined on IpConnectivityLog. Event constructors are
now public also. Every classes logging such events now create an
instance of IpConnectivityLog for logging event objects directly
instantiated with new.

Removing static dependencies allow straightforward testing of logging.

This patch also removes the base IpConnectivityEvent class which is not
needed any more.

Bug: 29035129
Change-Id: I3de700f93f46deaa48a759f938f7d00e1d8bff98
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
1654b1d11c3f4195d6f691bd1b6eb5aa672ffc94 24-May-2016 Hugo Benichi <hugobenichi@google.com> Fix default network transition event recording

When disconnecting from a default network X and falling back on another
connected network Y as the new default, ConnectivityService was
attempting to record this event as a X -> Y "atomic" transition.

In practice the default network connectivity is actually lost and
recovering default network takes some non-zero time.

This patch changes the event recording to always record disconnection as
X -> 0 events. At the same time, if there is a fallback network that is
elected as the new default ConnectivityService will also record a 0 -> Y
event.

This patch also improves pretty-printing of DefaultNetworkEvent.

Extract from $ adb shell dumpsys connectivity_metrics_logger --events
17:51:00.086: DefaultNetworkEvent(0 -> 100:CELLULAR)
17:51:25.232: DefaultNetworkEvent(100:IPv4 -> 101:WIFI) # wifi goes on
17:51:44.064: DefaultNetworkEvent(101:DUAL -> 0) # wifi goes off
17:51:44.187: DefaultNetworkEvent(0 -> 100:CELLULAR)

Bug: 28204408
Change-Id: I63252633235bf6ba833b9ac431a80dda75a93e67
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
61cbccc2bf7983b50e7a7f1fdb1858caeab6fd96 26-Apr-2016 Hugo Benichi <hugobenichi@google.com> Remove unused event tags of IpConnectivityEvent

Bug: 28204408
Change-Id: I8de95add30cdf5c35c8129ee1b95d2d648b3316d
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
5df9d729f6c78215f287701d7e136dfc922e2bd3 25-Apr-2016 Hugo Benichi <hugobenichi@google.com> Better ConnectivityMetricsEvent printing

This patch adds more information printing for IpConnectivity event
classes in android.net.metrics.

example:

ConnectivityMetricsEvent(14:36:35.799, 0, 1026): DhcpClientEvent(wlan0, DhcpRequestingState)
ConnectivityMetricsEvent(14:36:35.805, 0, 1026): DhcpClientEvent(wlan0, DhcpHaveAddressState)
ConnectivityMetricsEvent(14:36:35.809, 0, 4096): IpManagerEvent(wlan0, PROVISIONING_OK, 155ms)
ConnectivityMetricsEvent(14:36:35.810, 0, 1026): DhcpClientEvent(wlan0, DhcpBoundState)
ConnectivityMetricsEvent(14:36:35.871, 0, 2048): NetworkEvent(101, NETWORK_CONNECTED, 0ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:599, 3ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2048): NetworkEvent(101, NETWORK_VALIDATION_FAILED, 0ms)
ConnectivityMetricsEvent(14:36:35.928, 0, 3072): DefaultNetworkEvent(0 -> 101, [WIFI], IPv4: false, IPv6: false)
ConnectivityMetricsEvent(14:36:37.008, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:204, 134ms)
ConnectivityMetricsEvent(14:36:37.008, 0, 2050): NetworkEvent(101, NETWORK_VALIDATED, 1137ms)

Also fixes a couple of event logging issues:
- do no record spurious receive DhcpErrorEvent when a network goes down.
- add an eventType field to IpManagerEvent instead of using the
loggger component tag.

Bug: 28204408
Change-Id: Ia6f4ccfd7a0c63a5ccec18825f226c0b5781217b
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java
5f16f760ad2469c8d5636f45974a2f725ef289be 19-Apr-2016 Hugo Benichi <hugobenichi@google.com> Some fixes in ConnectivityService event logging

Bug: 28204408
Change-Id: I44ed9539bb213a845c2bcc2861c947af7c3c9ef4
/frameworks/base/core/java/android/net/metrics/DefaultNetworkEvent.java