Move networkstats JNI to connectivity module am: a24baedab8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987468 Change-Id: Icae9025ce53eca8a6636037f3baf7a6c17e5a5da
This commit is contained in:
@@ -194,10 +194,9 @@ cc_library_shared {
|
||||
"jni/onload.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libandroid",
|
||||
"liblog",
|
||||
],
|
||||
static_libs: [
|
||||
"libnativehelper_compat_libc++",
|
||||
"libnativehelper",
|
||||
],
|
||||
stl: "none",
|
||||
apex_available: [
|
||||
|
||||
@@ -40,6 +40,30 @@ filegroup {
|
||||
],
|
||||
}
|
||||
|
||||
// For test code only.
|
||||
filegroup {
|
||||
name: "lib_networkStatsFactory_native",
|
||||
srcs: [
|
||||
"jni/com_android_server_net_NetworkStatsFactory.cpp",
|
||||
],
|
||||
path: "jni",
|
||||
visibility: [
|
||||
"//packages/modules/Connectivity:__subpackages__",
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "services.connectivity-netstats-jni-sources",
|
||||
srcs: [
|
||||
"jni/com_android_server_net_NetworkStatsFactory.cpp",
|
||||
"jni/com_android_server_net_NetworkStatsService.cpp",
|
||||
],
|
||||
path: "jni",
|
||||
visibility: [
|
||||
"//packages/modules/Connectivity:__subpackages__",
|
||||
],
|
||||
}
|
||||
|
||||
// Nsd related libraries.
|
||||
|
||||
filegroup {
|
||||
|
||||
@@ -54,6 +54,10 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
* @hide
|
||||
*/
|
||||
public class NetworkStatsFactory {
|
||||
static {
|
||||
System.loadLibrary("service-connectivity");
|
||||
}
|
||||
|
||||
private static final String TAG = "NetworkStatsFactory";
|
||||
|
||||
private static final boolean USE_NATIVE_PARSING = true;
|
||||
|
||||
@@ -173,6 +173,10 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.TIRAMISU)
|
||||
public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
static {
|
||||
System.loadLibrary("service-connectivity");
|
||||
}
|
||||
|
||||
static final String TAG = "NetworkStats";
|
||||
static final boolean LOGD = Log.isLoggable(TAG, Log.DEBUG);
|
||||
static final boolean LOGV = Log.isLoggable(TAG, Log.VERBOSE);
|
||||
|
||||
Reference in New Issue
Block a user