Separate tethering build target to Tethering and TetheringNext
To avoid much code diverge between aosp and its downstream, we need to separate the build target which build with latest stable sdk in release branch and build with unfreeze sdk in dev branch. So we could use new API with APIshim in dev branch without impacting release branch. BYPASS_INCLUSIVE_LANGUAGE_REASON=the wording is the file name of existing file. Bug: 204265450 Test: m Change-Id: I949fd83b1eed7461e0b381193b190cf15080bc1b
This commit is contained in:
parent
bb4c6073ec
commit
5a8c806e55
2 changed files with 46 additions and 12 deletions
|
|
@ -19,9 +19,13 @@ package {
|
|||
}
|
||||
|
||||
java_defaults {
|
||||
name: "TetheringAndroidLibraryDefaults",
|
||||
name: "TetheringApiLevel",
|
||||
sdk_version: "module_current",
|
||||
min_sdk_version: "30",
|
||||
}
|
||||
|
||||
java_defaults {
|
||||
name: "TetheringAndroidLibraryDefaults",
|
||||
srcs: [
|
||||
"apishim/**/*.java",
|
||||
"src/**/*.java",
|
||||
|
|
@ -30,7 +34,6 @@ java_defaults {
|
|||
":services-tethering-shared-srcs",
|
||||
],
|
||||
static_libs: [
|
||||
"NetworkStackApiStableShims",
|
||||
"androidx.annotation_annotation",
|
||||
"modules-utils-build",
|
||||
"modules-utils-statemachine",
|
||||
|
|
@ -54,16 +57,35 @@ java_defaults {
|
|||
manifest: "AndroidManifestBase.xml",
|
||||
}
|
||||
|
||||
// Build tethering static library, used to compile both variants of the tethering.
|
||||
// build tethering static library, used to compile both variants of the tethering.
|
||||
android_library {
|
||||
name: "TetheringApiCurrentLib",
|
||||
defaults: ["TetheringAndroidLibraryDefaults"],
|
||||
defaults: [
|
||||
"TetheringAndroidLibraryDefaults",
|
||||
"TetheringApiLevel"
|
||||
],
|
||||
static_libs: [
|
||||
"NetworkStackApiCurrentShims",
|
||||
],
|
||||
apex_available: ["com.android.tethering"],
|
||||
}
|
||||
|
||||
android_library {
|
||||
name: "TetheringApiStableLib",
|
||||
defaults: [
|
||||
"TetheringAndroidLibraryDefaults",
|
||||
"TetheringApiLevel"
|
||||
],
|
||||
static_libs: [
|
||||
"NetworkStackApiStableShims",
|
||||
],
|
||||
apex_available: ["com.android.tethering"],
|
||||
}
|
||||
|
||||
// Due to b/143733063, APK can't access a jni lib that is in APEX (but not in the APK).
|
||||
cc_library {
|
||||
name: "libtetherutilsjni",
|
||||
sdk_version: "current",
|
||||
sdk_version: "30",
|
||||
apex_available: [
|
||||
"//apex_available:platform", // Used by InProcessTethering
|
||||
"com.android.tethering",
|
||||
|
|
@ -109,7 +131,6 @@ cc_library {
|
|||
// Common defaults for compiling the actual APK.
|
||||
java_defaults {
|
||||
name: "TetheringAppDefaults",
|
||||
sdk_version: "module_current",
|
||||
privileged: true,
|
||||
jni_libs: [
|
||||
"libtetherutilsjni",
|
||||
|
|
@ -130,20 +151,34 @@ java_defaults {
|
|||
// Non-updatable tethering running in the system server process for devices not using the module
|
||||
android_app {
|
||||
name: "InProcessTethering",
|
||||
defaults: ["TetheringAppDefaults"],
|
||||
defaults: ["TetheringAppDefaults", "TetheringApiLevel"],
|
||||
static_libs: ["TetheringApiCurrentLib"],
|
||||
certificate: "platform",
|
||||
manifest: "AndroidManifest_InProcess.xml",
|
||||
// InProcessTethering is a replacement for Tethering
|
||||
overrides: ["Tethering"],
|
||||
apex_available: ["com.android.tethering"],
|
||||
min_sdk_version: "30",
|
||||
}
|
||||
|
||||
// Updatable tethering packaged as an application
|
||||
// Updatable tethering packaged for finalized API
|
||||
android_app {
|
||||
name: "Tethering",
|
||||
defaults: ["TetheringAppDefaults"],
|
||||
defaults: ["TetheringAppDefaults", "TetheringApiLevel"],
|
||||
static_libs: ["TetheringApiStableLib"],
|
||||
certificate: "networkstack",
|
||||
manifest: "AndroidManifest.xml",
|
||||
use_embedded_native_libs: true,
|
||||
// The permission configuration *must* be included to ensure security of the device
|
||||
required: [
|
||||
"NetworkPermissionConfig",
|
||||
"privapp_whitelist_com.android.networkstack.tethering",
|
||||
],
|
||||
apex_available: ["com.android.tethering"],
|
||||
}
|
||||
|
||||
android_app {
|
||||
name: "TetheringNext",
|
||||
defaults: ["TetheringAppDefaults", "TetheringApiLevel"],
|
||||
static_libs: ["TetheringApiCurrentLib"],
|
||||
certificate: "networkstack",
|
||||
manifest: "AndroidManifest.xml",
|
||||
|
|
@ -154,7 +189,6 @@ android_app {
|
|||
"privapp_whitelist_com.android.networkstack.tethering",
|
||||
],
|
||||
apex_available: ["com.android.tethering"],
|
||||
min_sdk_version: "30",
|
||||
}
|
||||
|
||||
sdk {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ apex {
|
|||
],
|
||||
apps: [
|
||||
"ServiceConnectivityResources",
|
||||
"Tethering",
|
||||
"TetheringNext",
|
||||
],
|
||||
prebuilts: ["current_sdkinfo"],
|
||||
manifest: "manifest.json",
|
||||
|
|
|
|||
Loading…
Reference in a new issue