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

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

Snap for 6185678 from 47b97085 to rvc-release

Change-Id: I5cdcd84625cf05a1c1dfaacc878b837c028c01c7
parents 0c6d75a5 47b97085
Loading
Loading
Loading
Loading
+10 −17
Original line number Diff line number Diff line
@@ -165,13 +165,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"],
}
@@ -256,21 +264,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