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

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

Snap for 6586393 from b9364f50 to rvc-release

Change-Id: I7ec7cabbff132df17368fe77c676b03726d367ad
parents ae46d3ce b9364f50
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ java_defaults {
        "netlink-client",
        "networkstack-client",
        "datastallprotosnano",
        "networkstackprotosnano",
        "statsprotos",
        "captiveportal-lib",
    ],
    plugins: ["java_api_finder"],
@@ -291,3 +291,17 @@ android_app {
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkPermissionConfig"],
}

java_library_static {
    name: "statsprotos",
    proto: {
        type: "lite",
    },
    srcs: [
        "src/com/android/networkstack/metrics/stats.proto",
    ],
    static_libs: [
        "networkstackprotos",
    ],
    defaults: ["NetworkStackReleaseApiLevel"],
}
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ filegroup {
    srcs: [
        "src/android/net/util/SharedLog.java",
        "src/android/net/shared/InitialConfiguration.java",
        "src/android/net/shared/IpConfigurationParcelableUtil.java",
        "src/android/net/shared/Layer2Information.java",
        "src/android/net/shared/LinkPropertiesParcelableUtil.java",
        "src/android/net/shared/ParcelableUtil.java",
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ java_library {
        "src/android/net/IpMemoryStoreClient.java",
        "src/android/net/ipmemorystore/**/*.java",
        "src/android/net/networkstack/**/*.java",
        "src/android/net/shared/**/*.java",
    ],
    static_libs: [
        "ipmemorystore-aidl-interfaces-java",
+48 −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 android.net.shared;

import android.annotation.Nullable;
import android.net.InetAddresses;

import java.net.InetAddress;

/**
 * Collection of utility methods to convert to and from stable AIDL parcelables for IpClient
 * configuration classes.
 * @hide
 */
public final class IpConfigurationParcelableUtil {

    /**
     * Convert InetAddress to String.
     * TODO: have an InetAddressParcelable
     */
    public static String parcelAddress(@Nullable InetAddress addr) {
        if (addr == null) return null;
        return addr.getHostAddress();
    }

    /**
     * Convert String to InetAddress.
     * TODO: have an InetAddressParcelable
     */
    public static InetAddress unparcelAddress(@Nullable String addr) {
        if (addr == null) return null;
        return InetAddresses.parseNumericAddress(addr);
    }
}
+9 −27
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 * 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.
@@ -14,22 +14,22 @@
 * limitations under the License.
 */

package android.net.shared;
package android.net.dhcp;

import static android.net.shared.IpConfigurationParcelableUtil.parcelAddress;
import static android.net.shared.IpConfigurationParcelableUtil.unparcelAddress;

import android.annotation.Nullable;
import android.net.DhcpResults;
import android.net.DhcpResultsParcelable;
import android.net.InetAddresses;

import androidx.annotation.Nullable;

import java.net.Inet4Address;
import java.net.InetAddress;

/**
 * Collection of utility methods to convert to and from stable AIDL parcelables for IpClient
 * configuration classes.
 * @hide
 * A utility class to convert DhcpResults to DhcpResultsParcelable.
 */
public final class IpConfigurationParcelableUtil {
public final class DhcpResultsParcelableUtil {
    /**
     * Convert DhcpResults to a DhcpResultsParcelable.
     */
@@ -60,22 +60,4 @@ public final class IpConfigurationParcelableUtil {
        results.captivePortalApiUrl = p.captivePortalApiUrl;
        return results;
    }

    /**
     * Convert InetAddress to String.
     * TODO: have an InetAddressParcelable
     */
    public static String parcelAddress(@Nullable InetAddress addr) {
        if (addr == null) return null;
        return addr.getHostAddress();
    }

    /**
     * Convert String to InetAddress.
     * TODO: have an InetAddressParcelable
     */
    public static InetAddress unparcelAddress(@Nullable String addr) {
        if (addr == null) return null;
        return InetAddresses.parseNumericAddress(addr);
    }
}
Loading