Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ac95673 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Gerrit Code Review
Browse files

Merge changes Ie0e7d4f7,Ib1c58e49

* changes:
  Enable/disable current targets via soong var instead of inline.
  Make NetworkStack API shims available to Tethering.
parents 49ead3b4 0600a8a7
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

// Whether to enable the targets in this file that target current SDKs.
// Set to false in branches like mainline-prod where API classes are too old to build current code.
enable_current_sdk_targets = true

java_defaults {
    name: "NetworkStackDevApiLevel",
    min_sdk_version: "29",
@@ -65,6 +69,10 @@ java_defaults {
        "androidx.annotation_annotation",
        "networkstack-client",
    ],
    apex_available: [
        "com.android.tethering",
        "//apex_available:platform",  // For InProcessNetworkStack and InProcessTethering
    ],
    min_sdk_version: "29",
}

@@ -113,6 +121,7 @@ java_library {
// integer so if the next SDK release happens to use that integer, we don't need to rename them.
java_library {
    name: "NetworkStackApi31Shims",
    enabled: enable_current_sdk_targets,
    defaults: ["NetworkStackShimsDefaults"],
    srcs: [
        "apishim/31/**/*.java",
@@ -132,6 +141,7 @@ java_library {
// called directly by the networkstack code.
java_library {
    name: "NetworkStackApiCurrentShims",
    enabled: enable_current_sdk_targets,
    defaults: ["NetworkStackShimsDefaults"],
    static_libs: [
        "NetworkStackShimsCommon",
@@ -141,6 +151,7 @@ java_library {
    ],
    sdk_version: "module_current",
    visibility: [
        "//packages/modules/Connectivity/Tethering",
        "//packages/modules/Connectivity/tests/cts/net",
    ],
}
@@ -159,6 +170,7 @@ java_library {
    jarjar_rules: "apishim/jarjar-rules-compat.txt",
    sdk_version: "system_30",
    visibility: [
        "//packages/modules/Connectivity/Tethering",
        "//packages/modules/Connectivity/tests/cts/net",
    ],
}
@@ -197,6 +209,7 @@ android_library {
    ],
    static_libs: ["NetworkStackApiCurrentShims"],
    manifest: "AndroidManifestBase.xml",
    enabled: enable_current_sdk_targets,
    visibility: [
        "//frameworks/base/tests/net/integration",
        "//packages/modules/Connectivity/Tethering/tests/integration",
@@ -264,6 +277,7 @@ android_app {
    // The InProcessNetworkStack goes together with the PlatformCaptivePortalLogin, which replaces
    // the default CaptivePortalLogin.
    required: ["PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin"],
    enabled: enable_current_sdk_targets,
}

// Pre-merge the AndroidManifest for NetworkStackNext, so that its manifest can be merged on top
@@ -271,7 +285,8 @@ android_library {
    name: "NetworkStackNextManifestBase",
    defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
    static_libs: ["NetworkStackApiCurrentLib"],
    manifest: "AndroidManifest.xml"
    manifest: "AndroidManifest.xml",
    enabled: enable_current_sdk_targets,
}

// NetworkStack build targeting the current API release, for testing on in-development SDK
@@ -283,6 +298,7 @@ android_app {
    manifest: "AndroidManifest_Next.xml",
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkPermissionConfig"],
    enabled: enable_current_sdk_targets,
}

// Updatable network stack for finalized API