Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the networkStats from eBPF maps, NetworkStatsFactory need to use the NetdServices to issue binder calls. So it need to be moved from framework/base/core to framework/base/service since object in framework/base/core cannot get any system services. This change is also necessary for setting up a lock inside NetworkStatsFactory to prevent racing between two netstats caller since the lock need to be hold before netd trigger the map swap. Also fix the compile problem caused by moving the NetworkStatsFactory and the related tests. Rename the packages and the jni functions to a more proper name. Bug: 124764595 Bug: 128900919 Test: NetworkStatsFactoryTest android.app.usage.cts.NetworkUsageStatsTest android.net.cts.TrafficStatsTest Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Loading
Please register or sign in to comment