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

Commit 530f434b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7814092 from 864ddfe1 to mainline-cellbroadcast-release

Change-Id: I9e5c5075a43a49c50171eecbf770e2d726e689a4
parents 52847f4c 864ddfe1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ java_library {
    sdk_version: "system_30",
    visibility: ["//visibility:private"],
    lint: {
        baseline_filename: "lint-baseline-api-30-shims.xml",
        strict_updatability_linting: true,
    },
}

+2 −2
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ public class CaptivePortalDataShimImpl
    @Override
    public CaptivePortalDataShim withVenueFriendlyName(String friendlyName)
            throws UnsupportedApiLevelException {
        // Not supported in API level 29
        // Not supported in API level 30
        throw new UnsupportedApiLevelException("FriendlyName not supported on API 30");
    }

@@ -149,7 +149,7 @@ public class CaptivePortalDataShimImpl
    public CaptivePortalDataShim withPasspointInfo(@NonNull String friendlyName,
            @NonNull Uri venueInfoUrl, @NonNull Uri termsAndConditionsUrl)
            throws UnsupportedApiLevelException {
        // Not supported in API level 29
        // Not supported in API level 30
        throw new UnsupportedApiLevelException("PasspointInfo not supported on API 30");
    }
}
+6 −11
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.networkstack.apishim.api30;

import static com.android.modules.utils.build.SdkLevel.isAtLeastR;

import android.net.IpPrefix;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
@@ -25,17 +27,17 @@ import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.RequiresApi;

import com.android.networkstack.apishim.common.CaptivePortalDataShim;
import com.android.networkstack.apishim.common.NetworkInformationShim;
import com.android.networkstack.apishim.common.ShimUtils;

import java.net.Inet4Address;

/**
 * Compatibility implementation of {@link NetworkInformationShim}.
 */
@RequiresApi(Build.VERSION_CODES.R)
public class NetworkInformationShimImpl extends
        com.android.networkstack.apishim.api29.NetworkInformationShimImpl {
    private static final String TAG = "api30.NetworkInformationShimImpl";
@@ -45,21 +47,14 @@ public class NetworkInformationShimImpl extends
    /**
     * Get a new instance of {@link NetworkInformationShim}.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    public static NetworkInformationShim newInstance() {
        if (!useApiAboveQ()) {
        if (!isAtLeastR()) {
            return com.android.networkstack.apishim.api29.NetworkInformationShimImpl.newInstance();
        }
        return new NetworkInformationShimImpl();
    }

    /**
     * Indicates whether the shim can use APIs above the Q SDK.
     */
    @VisibleForTesting
    public static boolean useApiAboveQ() {
        return ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q);
    }

    @Nullable
    @Override
    public Uri getCaptivePortalApiUrl(@Nullable LinkProperties lp) {
+0 −4
Original line number Diff line number Diff line
@@ -83,10 +83,6 @@ public class NetworkMonitorUtils {
            return true;
        }

        // TODO: once TRANSPORT_TEST is @SystemApi in S and S SDK is stable (so constant shims can
        // be replaced with the SDK constant that will be inlined), replace isTestNetwork with
        // hasTransport(TRANSPORT_TEST)

        // Test networks that also have one of the major transport types are attempting to replicate
        // that transport on a test interface (for example, test ethernet networks with
        // EthernetManager#setIncludeTestInterfaces). Run validation on them for realistic tests.
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ aidl_interface {
            enabled: false,
        },
    },
    imports: ["ipmemorystore-aidl-interfaces"],
    imports: ["ipmemorystore-aidl-interfaces-V10"],
    versions: [
        "1",
        "2",
Loading