Add native_dump to the Dependencies
This is a preparation for the upcoming CL that will add the test for
BpfNetMaps#dump.
Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I79aa6f6153dc94f806411c642d72f4801915a588
diff --git a/service/src/com/android/server/BpfNetMaps.java b/service/src/com/android/server/BpfNetMaps.java
index bfa0808..758c013 100644
--- a/service/src/com/android/server/BpfNetMaps.java
+++ b/service/src/com/android/server/BpfNetMaps.java
@@ -294,6 +294,13 @@
return ConnectivityStatsLog.buildStatsEvent(NETWORK_BPF_MAP_INFO, cookieTagMapSize,
uidOwnerMapSize, uidPermissionMapSize);
}
+
+ /**
+ * Call native_dump
+ */
+ public void nativeDump(final FileDescriptor fd, final boolean verbose) {
+ native_dump(fd, verbose);
+ }
}
/** Constructor used after T that doesn't need to use netd anymore. */
@@ -920,7 +927,7 @@
EOPNOTSUPP, "dumpsys connectivity trafficcontroller dump not available on pre-T"
+ " devices, use dumpsys netd trafficcontroller instead.");
}
- native_dump(fd, verbose);
+ mDeps.nativeDump(fd, verbose);
}
private static native void native_init(boolean startSkDestroyListener);
@@ -936,6 +943,6 @@
private native int native_updateUidLockdownRule(int uid, boolean add);
private native int native_swapActiveStatsMap();
private native void native_setPermissionForUids(int permissions, int[] uids);
- private native void native_dump(FileDescriptor fd, boolean verbose);
+ private static native void native_dump(FileDescriptor fd, boolean verbose);
private static native int native_synchronizeKernelRCU();
}