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

Commit 1e61930e authored by Xin Li's avatar Xin Li Committed by Android (Google) Code Review
Browse files

Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master

parents b5d4fc0d 20647d71
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -45,10 +45,6 @@ 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",
@@ -57,7 +53,7 @@ java_defaults {

java_defaults {
    name: "NetworkStackReleaseApiLevel",
    sdk_version: "module_current",
    sdk_version: "module_31",
    min_sdk_version: "29",
    target_sdk_version: "31",
    libs: [
@@ -132,7 +128,6 @@ 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",
@@ -143,7 +138,7 @@ java_library {
        "NetworkStackApi30Shims",
        "framework-connectivity",
    ],
    sdk_version: "module_current",
    sdk_version: "module_31",
    visibility: ["//visibility:private"],
}

@@ -173,7 +168,6 @@ java_library {
// called directly by the networkstack code.
java_library {
    name: "NetworkStackApiCurrentShims",
    enabled: enable_current_sdk_targets,
    defaults: ["NetworkStackShimsDefaults"],
    static_libs: [
        "NetworkStackShimsCommon",
@@ -202,7 +196,7 @@ java_library {
        "NetworkStackApi31Shims",
    ],
    jarjar_rules: "apishim/jarjar-rules-compat.txt",
    sdk_version: "module_current",
    sdk_version: "module_31",
    visibility: [
        "//packages/modules/Connectivity/Tethering",
        "//packages/modules/Connectivity/tests/cts/net",
@@ -244,7 +238,6 @@ 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",
@@ -324,7 +317,6 @@ android_app {
        "PlatformNetworkPermissionConfig",
        "PlatformCaptivePortalLogin",
    ],
    enabled: enable_current_sdk_targets,
}

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

// NetworkStack build targeting the current API release, for testing on in-development SDK
@@ -348,7 +339,6 @@ android_app {
        "NetworkPermissionConfig",
        "privapp_whitelist_com.android.networkstack",
    ],
    enabled: enable_current_sdk_targets,
}

// Updatable network stack for finalized API
+2 −1
Original line number Diff line number Diff line
@@ -40,7 +40,8 @@
    // We must specify at least one module here or the tests won't run. Use the same set as CTS
    // so in theory the infra would not need to reinstall/reboot devices to run both.
    {
      "name": "NetworkStackTests[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]"
      // TODO: add back tethering when it is updatable in this branch
      "name": "NetworkStackTests[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex]"
    }
  ],
  "mainline-postsubmit": [
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import java.util.Collection;
public class ConnectivityManagerShimImpl
        extends com.android.networkstack.apishim.api30.ConnectivityManagerShimImpl  {

    @RequiresApi(Build.VERSION_CODES.S)
    protected ConnectivityManagerShimImpl(Context context) {
        super(context);
    }
+7 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import java.util.Set;
@RequiresApi(Build.VERSION_CODES.S)
public class NetworkRequestShimImpl
        extends com.android.networkstack.apishim.api30.NetworkRequestShimImpl {
    @RequiresApi(Build.VERSION_CODES.S)
    protected NetworkRequestShimImpl() {
        super();
    }
@@ -58,6 +57,13 @@ public class NetworkRequestShimImpl
        builder.setUids(uids);
    }

    @Override
    public NetworkRequest.Builder setIncludeOtherUidNetworks(NetworkRequest.Builder builder,
            boolean include) {
        builder.setIncludeOtherUidNetworks(include);
        return builder;
    }

    @Override
    public NetworkRequest.Builder newBuilder(@NonNull NetworkRequest request) {
        return new NetworkRequest.Builder(request);
+1 −3
Original line number Diff line number Diff line
@@ -48,9 +48,7 @@ public class SettingsShimImpl
    public boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid,
            @NonNull String callingPackage, @Nullable String callingAttributionTag,
            boolean throwException) {
        // Since checkAndNoteWriteSettingsOperation with callingAttributionTag (S method) is not
        // available in AOSP, calling R method (same as API 30 shim) temporary.
        return Settings.checkAndNoteWriteSettingsOperation(context, uid, callingPackage,
                throwException);
                callingAttributionTag, throwException);
    }
}
Loading