Merge "[MS66] Initialize TrafficStats with context" am: a411d32226 am: 71aca9af8f am: db3f98710b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956077 Change-Id: Ide5f7ac8fb4ebafbe797e9d8d13662844d1b4bfd
This commit is contained in:
@@ -54,6 +54,7 @@ import android.hardware.display.DisplayManagerInternal;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.ConnectivityModuleConnector;
|
||||
import android.net.NetworkStackClient;
|
||||
import android.net.TrafficStats;
|
||||
import android.os.BaseBundle;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
@@ -1843,6 +1844,7 @@ public final class SystemServer implements Dumpable {
|
||||
try {
|
||||
networkStats = NetworkStatsService.create(context);
|
||||
ServiceManager.addService(Context.NETWORK_STATS_SERVICE, networkStats);
|
||||
TrafficStats.init(context);
|
||||
} catch (Throwable e) {
|
||||
reportWtf("starting NetworkStats Service", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user