OSDN Git Service

NsdService: disentangle NativeDaemonConnector from ctor
authorHugo Benichi <hugobenichi@google.com>
Mon, 24 Apr 2017 07:19:58 +0000 (16:19 +0900)
committerHugo Benichi <hugobenichi@google.com>
Thu, 27 Apr 2017 07:35:30 +0000 (16:35 +0900)
commit1fac3191c7ba7921724530ac38c07cb95263a635
treeee06f6515be242c8f15a4d8c9685ce3d77b21b3b
parent7ca060aa95ce8425b8d69d8dee3a472c968f28e0
NsdService: disentangle NativeDaemonConnector from ctor

This patch disentangles the creation of NativeDaemonConnector from the
creation of NsdService by introducing a wrapper type DaemonConnection.

This allows to mock this dependency in unit tests.

Test: enhanced previously introduced new tests.
Bug: 3701336933298084
Change-Id: I894b7cddfc509f86d0134d214c88c063b81b5e0a
services/core/java/com/android/server/NsdService.java
tests/net/java/android/net/nsd/NsdServiceTest.java