Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."

Revert "Add shims for NetworkRequest"

Revert submission 1626206-replaceUidRange

Reason for revert: Breaking build - b/183106405
Reverted Changes:
I0b79c73e8:Add shims for NetworkRequest
I4bc0daf5a:Replace the usage of UidRange
I4e5aec6ef:Replace the usage of UidRange
I107c329d4:Expose uids related APIs in NetworkRequest and Net...

Change-Id: I45e08f89533af0d6851add38fecb5c6c114615ae
This commit is contained in:
Anthony Stange
2021-03-18 16:30:59 +00:00
parent 347208541a
commit 43b606da89
3 changed files with 0 additions and 34 deletions

View File

@@ -27,18 +27,9 @@ package android.net {
} }
public final class NetworkCapabilities implements android.os.Parcelable { public final class NetworkCapabilities implements android.os.Parcelable {
method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids();
field public static final int TRANSPORT_TEST = 7; // 0x7 field public static final int TRANSPORT_TEST = 7; // 0x7
} }
public static final class NetworkCapabilities.Builder {
method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
}
public static class NetworkRequest.Builder {
method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
}
public class ParseException extends java.lang.RuntimeException { public class ParseException extends java.lang.RuntimeException {
ctor public ParseException(@NonNull String); ctor public ParseException(@NonNull String);
ctor public ParseException(@NonNull String, @NonNull Throwable); ctor public ParseException(@NonNull String, @NonNull Throwable);

View File

@@ -22,7 +22,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.annotation.RequiresPermission; import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage;
import android.net.ConnectivityManager.NetworkCallback; import android.net.ConnectivityManager.NetworkCallback;
@@ -1478,13 +1477,8 @@ public final class NetworkCapabilities implements Parcelable {
/** /**
* Get the list of UIDs this network applies to. * Get the list of UIDs this network applies to.
* This returns a copy of the set so that callers can't modify the original object. * This returns a copy of the set so that callers can't modify the original object.
*
* @return the list of UIDs this network applies to. If {@code null}, then the network applies
* to all UIDs.
* @hide * @hide
*/ */
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@SuppressLint("NullableCollection")
public @Nullable Set<Range<Integer>> getUids() { public @Nullable Set<Range<Integer>> getUids() {
return UidRange.toIntRanges(mUids); return UidRange.toIntRanges(mUids);
} }
@@ -2667,21 +2661,6 @@ public final class NetworkCapabilities implements Parcelable {
return this; return this;
} }
/**
* Set the list of UIDs this network applies to.
*
* @param uids the list of UIDs this network applies to, or {@code null} if this network
* applies to all UIDs.
* @return this builder
* @hide
*/
@NonNull
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public Builder setUids(@Nullable Set<Range<Integer>> uids) {
mCaps.setUids(uids);
return this;
}
/** /**
* Builds the instance of the capabilities. * Builds the instance of the capabilities.
* *

View File

@@ -36,7 +36,6 @@ import static android.net.NetworkCapabilities.TRANSPORT_TEST;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.annotation.RequiresPermission; import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage;
import android.net.NetworkCapabilities.NetCapability; import android.net.NetworkCapabilities.NetCapability;
@@ -283,9 +282,6 @@ public class NetworkRequest implements Parcelable {
* @return The builder to facilitate chaining. * @return The builder to facilitate chaining.
* @hide * @hide
*/ */
@NonNull
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@SuppressLint("MissingGetterMatchingBuilder")
public Builder setUids(@Nullable Set<Range<Integer>> uids) { public Builder setUids(@Nullable Set<Range<Integer>> uids) {
mNetworkCapabilities.setUids(uids); mNetworkCapabilities.setUids(uids);
return this; return this;