From 8f31725a22baebdd3772e2acf003a7eaeb6792b8 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 8 Apr 2022 12:22:27 +0900 Subject: [PATCH] Delete libcom_android_net_module_util_jni It is not used anywhere, as the sources are included via filegroup in other libraries. Test: m Bug: 222234190 Change-Id: I23efe1382892a5493b8819cf05b5852305018d70 --- service-t/Sources.bp | 24 ------------------------ service-t/jni/onload.cpp | 38 -------------------------------------- 2 files changed, 62 deletions(-) delete mode 100644 service-t/jni/onload.cpp diff --git a/service-t/Sources.bp b/service-t/Sources.bp index f2e758fe99..759a8eb989 100644 --- a/service-t/Sources.bp +++ b/service-t/Sources.bp @@ -59,27 +59,3 @@ filegroup { ], } -cc_library_shared { - name: "libcom_android_net_module_util_jni", - min_sdk_version: "30", - cflags: [ - "-Wall", - "-Werror", - "-Wno-unused-parameter", - "-Wthread-safety", - ], - srcs: [ - "jni/onload.cpp", - ], - stl: "libc++_static", - static_libs: [ - "libnet_utils_device_common_bpfjni", - ], - shared_libs: [ - "liblog", - "libnativehelper", - ], - apex_available: [ - "//apex_available:platform", - ], -} diff --git a/service-t/jni/onload.cpp b/service-t/jni/onload.cpp deleted file mode 100644 index bca4697560..0000000000 --- a/service-t/jni/onload.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -namespace android { - -int register_com_android_net_module_util_BpfMap(JNIEnv* env, char const* class_name); - -extern "C" jint JNI_OnLoad(JavaVM* vm, void*) { - JNIEnv *env; - if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_6) != JNI_OK) { - ALOGE("GetEnv failed"); - return JNI_ERR; - } - - if (register_com_android_net_module_util_BpfMap(env, - "com/android/net/module/util/BpfMap") < 0) return JNI_ERR; - - return JNI_VERSION_1_6; -} - -}; -