OSDN Git Service

Extract logging of default network events
authorHugo Benichi <hugobenichi@google.com>
Thu, 19 Oct 2017 05:42:40 +0000 (14:42 +0900)
committerHugo Benichi <hugobenichi@google.com>
Wed, 25 Oct 2017 03:36:29 +0000 (12:36 +0900)
commit64901e5963f8e330a7a4a47ceeecfbb47d255dc2
treee6d422e590d06cfb8f8283c196984a6a1db0270d
parent03c6030ce94662ed008ca6a6447da9fb62d4ea0c
Extract logging of default network events

This patch extracts the logging of DefaultNetworkEvent from inside
ConnectivityService and move it to a new DefaultNetworkMetrics class.

The DefaultNetworkMetrics is a singleton owned by the
IpConnectivityMetrics singleton implementing the metrics service for
core networking. ConnectivityService has access to this singleton via
LocalServices.

This class layout will allow to remove the Parcelable interface of
DefaultNetworkEvent and will instead let the IpConnectivityMetrics
service grab metrics from the DefaultNetworkMetrics directly.

Bug: 34901696
Test: runtest frameworks-net
Change-Id: I55694d89124272732aba114198776462372de18b
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java [new file with mode: 0644]
services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
tests/net/java/com/android/server/ConnectivityServiceTest.java