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

Commit da4f304f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6188853 from d02621a2 to rvc-d1-release

Change-Id: I3b8d035ef1a05f8c1c8f0a2d1271aa2f5da68104
parents a4c42c59 d02621a2
Loading
Loading
Loading
Loading
+21 −18
Original line number Diff line number Diff line
@@ -133,6 +133,15 @@ android_library {
    manifest: "AndroidManifestBase.xml",
}

filegroup {
    name: "NetworkStackJarJarRules",
    srcs: ["jarjar-rules-shared.txt"],
    visibility: [
        "//packages/modules/NetworkStack/tests/unit",
        "//packages/modules/NetworkStack/tests/integration",
    ]
}

// Common defaults for compiling the actual APK, based on the NetworkStackApiXBase android libraries
java_defaults {
    name: "NetworkStackAppDefaults",
@@ -143,7 +152,7 @@ java_defaults {
    ],
    // Resources already included in NetworkStackBase
    resource_dirs: [],
    jarjar_rules: "jarjar-rules-shared.txt",
    jarjar_rules: ":NetworkStackJarJarRules",
    use_embedded_native_libs: true,
    optimize: {
        proguard_flags_files: ["proguard.flags"],
@@ -165,13 +174,21 @@ android_app {
    required: ["PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin"],
}

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

// NetworkStack build targeting the current API release, for testing on in-development SDK
android_app {
    name: "NetworkStackNext",
    defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
    static_libs: ["NetworkStackApiCurrentLib"],
    static_libs: ["NetworkStackNextManifestBase"],
    certificate: "networkstack",
    manifest: ":NetworkStackNextAndroidManifest",
    manifest: "AndroidManifest_Next.xml",
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkPermissionConfig"],
}
@@ -193,6 +210,7 @@ android_library {
    defaults: ["NetworkStackAppDefaults", "NetworkStackReleaseApiLevel"],
    static_libs: ["NetworkStackApiStableLib"],
    manifest: "AndroidManifestBase.xml",
    visibility: ["//frameworks/base/tests/net/integration"],
}

cc_library_shared {
@@ -256,21 +274,6 @@ genrule {
    visibility: ["//visibility:private"],
}

// genrule to modify the NetworkStack manifest for NetworkStackNext, which is the "next" version
// that builds against the "next", non-stable APIs.
// A genrule seems simpler than having yet another manifest to merge. The only elements that would
// change in the manifest are the version code, and the min/target SDK which are populated
// automatically on build with the current SDK.
genrule {
    name: "NetworkStackNextAndroidManifest",
    srcs: ["AndroidManifest.xml"],
    out: ["NetworkStackNextAndroidManifest.xml"],
    cmd: "sed -E 's/versionCode=\"[0-9]+\"/versionCode=\""
        + version_code_networkstack_next
        + "\"/' $(in) > $(out)",
    visibility: ["//visibility:private"],
}

android_app {
    name: "TestNetworkStack",
    defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
  -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.networkstack"
          android:sharedUserId="android.uid.networkstack"
          android:versionCode="300000000"
          android:versionName="R-next">
</manifest>
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.networkstack.apishim.api29;

/**
 * Utility class for defining and importing constants from the Android platform.
 */
public class ConstantsShim {
    // Constants defined in android.net.ConnectivityDiagnosticsManager.
    public static final int DETECTION_METHOD_DNS_EVENTS = 1;
    public static final int DETECTION_METHOD_TCP_METRICS = 2;
    public static final String KEY_DNS_CONSECUTIVE_TIMEOUTS = "dnsConsecutiveTimeouts";
    public static final String KEY_NETWORK_PROBES_ATTEMPTED_BITMASK = "networkProbesAttemped";
    public static final String KEY_NETWORK_PROBES_SUCCEEDED_BITMASK = "networkProbesSucceeded";
    public static final String KEY_NETWORK_VALIDATION_RESULT = "networkValidationResult";
    public static final String KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS =
            "tcpMetricsCollectionPeriodMillis";
    public static final String KEY_TCP_PACKET_FAIL_RATE = "tcpPacketFailRate";
}
+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.networkstack.apishim;

import static android.net.ConnectivityDiagnosticsManager.ConnectivityReport;
import static android.net.ConnectivityDiagnosticsManager.DataStallReport;

/**
 * Utility class for defining and importing constants from the Android platform.
 */
public class ConstantsShim extends com.android.networkstack.apishim.api29.ConstantsShim {
    public static final int DETECTION_METHOD_DNS_EVENTS =
            DataStallReport.DETECTION_METHOD_DNS_EVENTS;
    public static final int DETECTION_METHOD_TCP_METRICS =
            DataStallReport.DETECTION_METHOD_TCP_METRICS;
    public static final String KEY_DNS_CONSECUTIVE_TIMEOUTS =
            DataStallReport.KEY_DNS_CONSECUTIVE_TIMEOUTS;
    public static final String KEY_NETWORK_PROBES_ATTEMPTED_BITMASK =
            ConnectivityReport.KEY_NETWORK_PROBES_ATTEMPTED_BITMASK;
    public static final String KEY_NETWORK_PROBES_SUCCEEDED_BITMASK =
            ConnectivityReport.KEY_NETWORK_PROBES_SUCCEEDED_BITMASK;
    public static final String KEY_NETWORK_VALIDATION_RESULT =
            ConnectivityReport.KEY_NETWORK_VALIDATION_RESULT;
    public static final String KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS =
            DataStallReport.KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS;
    public static final String KEY_TCP_PACKET_FAIL_RATE = DataStallReport.KEY_TCP_PACKET_FAIL_RATE;
}
+4 −1
Original line number Diff line number Diff line
@@ -42,7 +42,10 @@ aidl_interface {
aidl_interface {
    name: "networkstack-aidl-interfaces",
    local_include_dir: "src",
    include_dirs: ["frameworks/base/core/java"], // For framework parcelables.
    include_dirs: [
        "frameworks/base/core/java", // For framework parcelables.
        "frameworks/native/aidl/binder/android/os", // For PersistableBundle.aidl
    ],
    srcs: [
        "src/android/net/DhcpResultsParcelable.aidl",
        "src/android/net/INetworkMonitor.aidl",
Loading