[MS62.1] Start NetworkStatsService from the module am: 0858a12f92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987466 Change-Id: I1f72e7f3fbcb64052e90a10bc2869076fc9ecea7
This commit is contained in:
@@ -18,6 +18,7 @@ package android.net;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.app.SystemServiceRegistry;
|
||||
import android.app.usage.NetworkStatsManager;
|
||||
import android.content.Context;
|
||||
import android.net.nsd.INsdManager;
|
||||
import android.net.nsd.NsdManager;
|
||||
@@ -57,5 +58,15 @@ public final class ConnectivityFrameworkInitializerTiramisu {
|
||||
return new IpSecManager(context, service);
|
||||
}
|
||||
);
|
||||
|
||||
SystemServiceRegistry.registerContextAwareService(
|
||||
Context.NETWORK_STATS_SERVICE,
|
||||
NetworkStatsManager.class,
|
||||
(context, serviceBinder) -> {
|
||||
INetworkStatsService service =
|
||||
INetworkStatsService.Stub.asInterface(serviceBinder);
|
||||
return new NetworkStatsManager(context, service);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user