Add a binder interface checking bpf status

The system server need to know if the bpf traffic stats accounting
system is running at run time before read network stats from it. Instead
of checking the kernel version. A safe way to implement it is adding a
binder call to check the service inside netd. If netd successfully setup
the system and it can be sure the stats will be avalaible for system
server.

Test: run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Bug: 30950746
Change-Id: Ieef41dd94bc957864108f2f5590d9855ae985244
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp
index 43be62b..65676db 100644
--- a/server/NetdNativeService.cpp
+++ b/server/NetdNativeService.cpp
@@ -571,5 +571,11 @@
     return toBinderStatus(gCtls->wakeupCtrl.delInterface(ifName, prefix, mark, mask));
 }
 
+binder::Status NetdNativeService::trafficCheckBpfStatsEnable(bool* ret) {
+    ENFORCE_PERMISSION(NETWORK_STACK);
+    *ret = gCtls->trafficCtrl.checkBpfStatsEnable();
+    return binder::Status::ok();
+}
+
 }  // namespace net
 }  // namespace android