Merge changes from topic "revert-1532910-connectivity_jar_in_apex-LKXFLQGLIU" am: 5c5017bf91

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541542

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id71e4600041b523d941f6fe7f210c1bec7bb4c21
This commit is contained in:
Treehugger Robot
2021-01-07 17:58:14 +00:00
committed by Automerger Merge Worker
3 changed files with 20 additions and 11 deletions

View File

@@ -14,8 +14,8 @@
// limitations under the License.
//
cc_library_shared {
name: "libservice-connectivity",
cc_defaults {
name: "libservice-connectivity-defaults",
// TODO: build against the NDK (sdk_version: "30" for example)
cflags: [
"-Wall",
@@ -26,7 +26,6 @@ cc_library_shared {
srcs: [
"jni/com_android_server_TestNetworkService.cpp",
"jni/com_android_server_connectivity_Vpn.cpp",
"jni/onload.cpp",
],
shared_libs: [
"libbase",
@@ -36,9 +35,25 @@ cc_library_shared {
// addresses, and remove dependency on libnetutils.
"libnetutils",
],
apex_available: [
"com.android.tethering",
}
cc_library_shared {
name: "libservice-connectivity",
defaults: ["libservice-connectivity-defaults"],
srcs: [
"jni/onload.cpp",
],
apex_available: [
// TODO: move this library to the tethering APEX and remove libservice-connectivity-static
// "com.android.tethering",
],
}
// Static library linked into libservices.core until libservice-connectivity can be loaded from
// the tethering APEX instead.
cc_library_static {
name: "libservice-connectivity-static",
defaults: ["libservice-connectivity-defaults"],
}
java_library {
@@ -60,6 +75,5 @@ java_library {
],
apex_available: [
"//apex_available:platform",
"com.android.tethering",
],
}

View File

@@ -35,8 +35,6 @@ public final class ConnectivityServiceInitializer extends SystemService {
public ConnectivityServiceInitializer(Context context) {
super(context);
// Load JNI libraries used by ConnectivityService and its dependencies
System.loadLibrary("service-connectivity");
// TODO: Define formal APIs to get the needed services.
mConnectivity = new ConnectivityService(context, getNetworkManagementService(),
getNetworkStatsService());

View File

@@ -70,7 +70,4 @@ android_test {
"android.test.base",
"android.test.mock",
],
jni_libs: [
"libservice-connectivity",
],
}