Merge "Use current shims in service-connectivity"
This commit is contained in:
@@ -38,6 +38,13 @@ java_defaults {
|
|||||||
name: "ConnectivityNextEnableDefaults",
|
name: "ConnectivityNextEnableDefaults",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
}
|
}
|
||||||
|
java_defaults {
|
||||||
|
name: "NetworkStackApiShimSettingsForCurrentBranch",
|
||||||
|
// API shims to include in the networking modules built from the branch. Branches that disable
|
||||||
|
// the "next" targets must use stable shims (latest stable API level) instead of current shims
|
||||||
|
// (X_current API level).
|
||||||
|
static_libs: ["NetworkStackApiCurrentShims"],
|
||||||
|
}
|
||||||
apex_defaults {
|
apex_defaults {
|
||||||
name: "ConnectivityApexDefaults",
|
name: "ConnectivityApexDefaults",
|
||||||
// Tethering app to include in the AOSP apex. Branches that disable the "next" targets may use
|
// Tethering app to include in the AOSP apex. Branches that disable the "next" targets may use
|
||||||
|
|||||||
@@ -138,6 +138,14 @@ java_library {
|
|||||||
name: "service-connectivity-pre-jarjar",
|
name: "service-connectivity-pre-jarjar",
|
||||||
sdk_version: "system_server_current",
|
sdk_version: "system_server_current",
|
||||||
min_sdk_version: "30",
|
min_sdk_version: "30",
|
||||||
|
// NetworkStackApiShimSettingsForCurrentBranch provides the latest available shims depending on
|
||||||
|
// the branch to "service-connectivity".
|
||||||
|
// There are Tethering.apk and TetheringNext.apk variants for the tethering APEX,
|
||||||
|
// which use NetworkStackApiStableShims and NetworkStackApiCurrentShims respectively.
|
||||||
|
// Note that there can be no service-connectivity-next because it would need to be configured in
|
||||||
|
// default_art_config.mk which doesn't support conditionals, hence this scheme of using a
|
||||||
|
// variable here.
|
||||||
|
defaults: ["NetworkStackApiShimSettingsForCurrentBranch"],
|
||||||
srcs: [
|
srcs: [
|
||||||
"src/**/*.java",
|
"src/**/*.java",
|
||||||
":framework-connectivity-shared-srcs",
|
":framework-connectivity-shared-srcs",
|
||||||
@@ -183,7 +191,6 @@ java_library {
|
|||||||
"PlatformProperties",
|
"PlatformProperties",
|
||||||
"service-connectivity-protos",
|
"service-connectivity-protos",
|
||||||
"service-connectivity-stats-protos",
|
"service-connectivity-stats-protos",
|
||||||
"NetworkStackApiStableShims",
|
|
||||||
],
|
],
|
||||||
apex_available: [
|
apex_available: [
|
||||||
"com.android.tethering",
|
"com.android.tethering",
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ package {
|
|||||||
|
|
||||||
android_test {
|
android_test {
|
||||||
name: "FrameworksNetIntegrationTests",
|
name: "FrameworksNetIntegrationTests",
|
||||||
defaults: ["framework-connectivity-internal-test-defaults"],
|
defaults: [
|
||||||
|
"framework-connectivity-internal-test-defaults",
|
||||||
|
"NetworkStackApiShimSettingsForCurrentBranch",
|
||||||
|
],
|
||||||
platform_apis: true,
|
platform_apis: true,
|
||||||
certificate: "platform",
|
certificate: "platform",
|
||||||
srcs: [
|
srcs: [
|
||||||
@@ -33,6 +36,13 @@ android_test {
|
|||||||
"ServiceConnectivityResources",
|
"ServiceConnectivityResources",
|
||||||
],
|
],
|
||||||
static_libs: [
|
static_libs: [
|
||||||
|
// It does not matter if NetworkStackApiStableLib or NetworkStackApiCurrentLib is used here,
|
||||||
|
// since the shims for the branch are already included via
|
||||||
|
// NetworkStackApiShimSettingsForCurrentBranch, and will be used in priority as they are
|
||||||
|
// first in the classpath.
|
||||||
|
// If the wrong shims are used for some reason, tests that use newer APIs fail.
|
||||||
|
// TODO: have NetworkStackApiStableLib link dynamically against the shims to remove this
|
||||||
|
// order-dependent setup.
|
||||||
"NetworkStackApiStableLib",
|
"NetworkStackApiStableLib",
|
||||||
"androidx.test.ext.junit",
|
"androidx.test.ext.junit",
|
||||||
"frameworks-net-integration-testutils",
|
"frameworks-net-integration-testutils",
|
||||||
|
|||||||
Reference in New Issue
Block a user