[DU01]Remove INetworkManagementService from NetworkStatsService

NetworkStatsService is using INetworkManagementService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 209738761
Test: atest NetworkStatsServiceTest
Change-Id: I5740f6d8a54e9a06c6dbb93203cb4c954383c3c8
This commit is contained in:
lifr
2021-12-13 16:15:51 +08:00
parent 886bf03a2d
commit cf023845cd
4 changed files with 68 additions and 53 deletions

View File

@@ -1837,7 +1837,7 @@ public final class SystemServer implements Dumpable {
t.traceBegin("StartNetworkStatsService");
try {
networkStats = NetworkStatsService.create(context, networkManagement);
networkStats = NetworkStatsService.create(context);
ServiceManager.addService(Context.NETWORK_STATS_SERVICE, networkStats);
} catch (Throwable e) {
reportWtf("starting NetworkStats Service", e);