Prevent native_init from starting TrafficController
TrafficController is currently still started by netd, and this should
not happen in two places. Instead, native_init should init (open) the
maps.
Test: atest FrameworksNetTests
Change-Id: Ifd6be50aa5f62e59a5b1c5c0a97550389fd0e7e1
diff --git a/service/jni/com_android_server_BpfNetMaps.cpp b/service/jni/com_android_server_BpfNetMaps.cpp
index 113c449..bde52a5 100644
--- a/service/jni/com_android_server_BpfNetMaps.cpp
+++ b/service/jni/com_android_server_BpfNetMaps.cpp
@@ -39,7 +39,8 @@
namespace android {
static void native_init(JNIEnv* env, jobject clazz) {
- Status status = mTc.start();
+ // start is still being called by netd
+ Status status = mTc.initMaps();
if (!isOk(status)) {
ALOGE("%s failed", __func__);
}