OSDN Git Service

Fixes fatal linter errors in android.net.metrics
authorHugo Benichi <hugobenichi@google.com>
Fri, 15 Apr 2016 07:56:28 +0000 (16:56 +0900)
committerHugo Benichi <hugobenichi@google.com>
Mon, 18 Apr 2016 02:29:03 +0000 (11:29 +0900)
commit627b42494d82eca4fd51abfc0a5d7f330862b881
tree9cd762051ffc2ed2cb9ccfc251666f3aeb3b2bee
parent2677b1957b444e2dae5737feee989109b811547c
Fixes fatal linter errors in android.net.metrics

This patch changes how Event classes are organized:
 - Base IpConnectivityEvent class does not implement Parcelable because
   it cannot be final (has children). It also becomes abstract because
   it is not supposed to be instantiated and logged directly.
 - All children classes becomes final because they are Parcelable.
 - All constructors of all children classes become private, because they
   are supposed to be instantiated with their associated logEvent()
   methods.
 - All instance fields of all children classes become public final.
      Rational: if private, the ConnectivityMetrics app cannot read
      their data.

Bug: 28204408
Change-Id: I1a4689c422230c6ed034307dec54a61daf8a6598
core/java/android/net/metrics/CaptivePortalCheckResultEvent.java
core/java/android/net/metrics/CaptivePortalStateChangeEvent.java
core/java/android/net/metrics/ConnectivityServiceChangeEvent.java
core/java/android/net/metrics/DhcpClientEvent.java
core/java/android/net/metrics/DhcpErrorEvent.java
core/java/android/net/metrics/DnsEvent.java
core/java/android/net/metrics/IpConnectivityEvent.java
core/java/android/net/metrics/IpManagerEvent.java
core/java/android/net/metrics/IpReachabilityMonitorLostEvent.java
core/java/android/net/metrics/IpReachabilityMonitorMessageEvent.java
core/java/android/net/metrics/IpReachabilityMonitorProbeEvent.java