Add min_sdk_version to connectivity targets
All targets need min_sdk_version 30 to be included in the tethering APEX. They will actually never be used on SDK 30 and are only loaded on 31, but this is necessary to be included in com.android.tethering. Bug: 171540887 Test: m Change-Id: I190fd1f3c9fabff057d0a2bd7f45b63a4fe447b3
This commit is contained in:
@@ -26,6 +26,7 @@ package {
|
||||
java_library {
|
||||
name: "framework-connectivity-protos",
|
||||
sdk_version: "module_current",
|
||||
min_sdk_version: "30",
|
||||
proto: {
|
||||
type: "nano",
|
||||
},
|
||||
@@ -109,6 +110,10 @@ cc_defaults {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wno-unused-parameter",
|
||||
// Don't warn about S API usage even with
|
||||
// min_sdk 30: the library is only loaded
|
||||
// on S+ devices
|
||||
"-Wno-unguarded-availability",
|
||||
"-Wthread-safety",
|
||||
],
|
||||
shared_libs: [
|
||||
@@ -135,6 +140,7 @@ cc_library_static {
|
||||
|
||||
cc_library_shared {
|
||||
name: "libframework-connectivity-jni",
|
||||
min_sdk_version: "30",
|
||||
defaults: ["libframework-connectivity-defaults"],
|
||||
srcs: [
|
||||
"jni/android_net_NetworkUtils.cpp",
|
||||
@@ -151,6 +157,7 @@ cc_library_shared {
|
||||
java_library {
|
||||
name: "framework-connectivity.impl",
|
||||
sdk_version: "module_current",
|
||||
min_sdk_version: "30",
|
||||
srcs: [
|
||||
":framework-connectivity-sources",
|
||||
],
|
||||
|
||||
@@ -25,7 +25,7 @@ package {
|
||||
|
||||
cc_library_shared {
|
||||
name: "libservice-connectivity",
|
||||
// TODO: build against the NDK (sdk_version: "30" for example)
|
||||
min_sdk_version: "30",
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
@@ -37,13 +37,12 @@ cc_library_shared {
|
||||
"jni/onload.cpp",
|
||||
],
|
||||
stl: "libc++_static",
|
||||
header_libs: [
|
||||
"libbase_headers",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
"libnativehelper",
|
||||
// TODO: remove dependency on ifc_[add/del]_address by having Java code to add/delete
|
||||
// addresses, and remove dependency on libnetutils.
|
||||
"libnetutils",
|
||||
],
|
||||
apex_available: [
|
||||
"com.android.tethering",
|
||||
@@ -53,6 +52,7 @@ cc_library_shared {
|
||||
java_library {
|
||||
name: "service-connectivity-pre-jarjar",
|
||||
sdk_version: "system_server_current",
|
||||
min_sdk_version: "30",
|
||||
srcs: [
|
||||
":connectivity-service-srcs",
|
||||
":framework-connectivity-shared-srcs",
|
||||
@@ -91,6 +91,7 @@ java_library {
|
||||
java_library {
|
||||
name: "service-connectivity-protos",
|
||||
sdk_version: "system_current",
|
||||
min_sdk_version: "30",
|
||||
proto: {
|
||||
type: "nano",
|
||||
},
|
||||
@@ -107,6 +108,7 @@ java_library {
|
||||
java_library {
|
||||
name: "service-connectivity",
|
||||
sdk_version: "system_server_current",
|
||||
min_sdk_version: "30",
|
||||
installable: true,
|
||||
static_libs: [
|
||||
"service-connectivity-pre-jarjar",
|
||||
|
||||
@@ -22,6 +22,7 @@ package {
|
||||
android_app {
|
||||
name: "ServiceConnectivityResources",
|
||||
sdk_version: "module_current",
|
||||
min_sdk_version: "30",
|
||||
resource_dirs: [
|
||||
"res",
|
||||
],
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include <log/log.h>
|
||||
|
||||
#include "netutils/ifc.h"
|
||||
|
||||
#include "jni.h"
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
@@ -48,9 +46,8 @@ namespace android {
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static void throwException(JNIEnv* env, int error, const char* action, const char* iface) {
|
||||
const std::string& msg =
|
||||
android::base::StringPrintf("Error %s %s: %s", action, iface, strerror(error));
|
||||
|
||||
const std::string& msg = "Error: " + std::string(action) + " " + std::string(iface) + ": "
|
||||
+ std::string(strerror(error));
|
||||
jniThrowException(env, "java/lang/IllegalStateException", msg.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user