OSDN Git Service

Fix missing IpConnectivity metrics
authorHugo Benichi <hugobenichi@google.com>
Fri, 29 Jul 2016 07:29:46 +0000 (16:29 +0900)
committerHugo Benichi <hugobenichi@google.com>
Fri, 29 Jul 2016 08:07:38 +0000 (17:07 +0900)
commit90cbc5b44450e9806ce0227d125fe7d5107c7c4b
treed139cdbcfab74eea82edb885228a81378f78a255
parent378183607b84fae9c90cc4ba942406875b727858
Fix missing IpConnectivity metrics

The IpConnectivityLog class looks up MetricsLoggerService once only
at creation. If a IpConnectivityLog user instantiates this class too
early during the boot process, the MetricsLoggerService is not found
and no event can be recorded.

This patch makes IpConnectivityLog attempt to look up
MetricsLoggerService as long as it hasn't found it yet.

This allows IpManager and ConnectivityService to upload
android.net.metrics events.

Bug: 30490301
Change-Id: I97102b95a775ea9e90351b9887ae4661fddc2af9
core/java/android/net/ConnectivityMetricsLogger.java
core/java/android/net/metrics/IpConnectivityLog.java