Loading Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -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, }, } Loading apishim/30/com/android/networkstack/apishim/api30/CaptivePortalDataShimImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -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"); } Loading @@ -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"); } } apishim/30/com/android/networkstack/apishim/api30/NetworkInformationShimImpl.java +6 −11 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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"; Loading @@ -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) { Loading common/moduleutils/src/android/net/shared/NetworkMonitorUtils.java +0 −4 Original line number Diff line number Diff line Loading @@ -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. Loading common/networkstackclient/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ aidl_interface { enabled: false, }, }, imports: ["ipmemorystore-aidl-interfaces"], imports: ["ipmemorystore-aidl-interfaces-V10"], versions: [ "1", "2", Loading Loading
Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -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, }, } Loading
apishim/30/com/android/networkstack/apishim/api30/CaptivePortalDataShimImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -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"); } Loading @@ -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"); } }
apishim/30/com/android/networkstack/apishim/api30/NetworkInformationShimImpl.java +6 −11 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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"; Loading @@ -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) { Loading
common/moduleutils/src/android/net/shared/NetworkMonitorUtils.java +0 −4 Original line number Diff line number Diff line Loading @@ -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. Loading
common/networkstackclient/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ aidl_interface { enabled: false, }, }, imports: ["ipmemorystore-aidl-interfaces"], imports: ["ipmemorystore-aidl-interfaces-V10"], versions: [ "1", "2", Loading