TransportInfo: Add a generic redaction mechanism
This replaces the existing mechanism for redacting location sensitive fields with a more extensible mechanism. Currently supported redactions are for the following permissions: i. ACCESS_FINE_LOCATION ii. LOCAL_MAC_ADDRESS iii. NETWORK_SETTINGS Also, removed WifiInfo from ConnectivityServiceTest to reduce cross dependencies on wifi code. Bug: 156867433 Bug: 162602799 Test: atest android.net Test: atest com.android.server Change-Id: I2bb980c624667a55c1383f13ab71b9b97ed6eeab
This commit is contained in:
@@ -27,7 +27,13 @@ package android.net {
|
||||
}
|
||||
|
||||
public final class NetworkCapabilities implements android.os.Parcelable {
|
||||
ctor public NetworkCapabilities(@Nullable android.net.NetworkCapabilities, long);
|
||||
method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids();
|
||||
field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL
|
||||
field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L
|
||||
field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L
|
||||
field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L
|
||||
field public static final long REDACT_NONE = 0L; // 0x0L
|
||||
field public static final int TRANSPORT_TEST = 7; // 0x7
|
||||
}
|
||||
|
||||
@@ -79,6 +85,11 @@ package android.net {
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR;
|
||||
}
|
||||
|
||||
public interface TransportInfo {
|
||||
method public default long getApplicableRedactions();
|
||||
method @NonNull public default android.net.TransportInfo makeCopy(long);
|
||||
}
|
||||
|
||||
public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
|
||||
ctor public VpnTransportInfo(int);
|
||||
method public int describeContents();
|
||||
|
||||
Reference in New Issue
Block a user