Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things that were added to the greylist in P, but subsequent data analysis suggests that they are not, in fact, used after all. Add a maxTargetSdk=P to these APIs. This is lower-risk that simply removing these things from the greylist, as none of out data sources are perfect nor complete. For APIs that are not supported yet by annotations, move them to hiddenapi-greylist-max-p.txt instead which has the same effect. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0 Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
This commit is contained in:
@@ -27,6 +27,7 @@ import android.app.PendingIntent;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Build.VERSION_CODES;
|
import android.os.Build.VERSION_CODES;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@@ -2768,7 +2769,7 @@ public class ConnectivityManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
public void unregisterNetworkFactory(Messenger messenger) {
|
public void unregisterNetworkFactory(Messenger messenger) {
|
||||||
try {
|
try {
|
||||||
mService.unregisterNetworkFactory(messenger);
|
mService.unregisterNetworkFactory(messenger);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
|
|||||||
|
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
@@ -56,13 +57,13 @@ public class LinkAddress implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* IPv4 or IPv6 address.
|
* IPv4 or IPv6 address.
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
private InetAddress address;
|
private InetAddress address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefix length.
|
* Prefix length.
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
private int prefixLength;
|
private int prefixLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
|
|||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -50,7 +51,7 @@ import java.util.StringJoiner;
|
|||||||
*/
|
*/
|
||||||
public final class LinkProperties implements Parcelable {
|
public final class LinkProperties implements Parcelable {
|
||||||
// The interface described by the network link.
|
// The interface described by the network link.
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
private String mIfaceName;
|
private String mIfaceName;
|
||||||
private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
|
private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
|
||||||
private ArrayList<InetAddress> mDnses = new ArrayList<>();
|
private ArrayList<InetAddress> mDnses = new ArrayList<>();
|
||||||
@@ -1136,7 +1137,7 @@ public final class LinkProperties implements Parcelable {
|
|||||||
* @return {@code true} if both are identical, {@code false} otherwise.
|
* @return {@code true} if both are identical, {@code false} otherwise.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
public boolean isIdenticalHttpProxy(LinkProperties target) {
|
public boolean isIdenticalHttpProxy(LinkProperties target) {
|
||||||
return getHttpProxy() == null ? target.getHttpProxy() == null :
|
return getHttpProxy() == null ? target.getHttpProxy() == null :
|
||||||
getHttpProxy().equals(target.getHttpProxy());
|
getHttpProxy().equals(target.getHttpProxy());
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package android.net;
|
|||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.ConnectivityManager.PacketKeepalive;
|
import android.net.ConnectivityManager.PacketKeepalive;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
@@ -352,7 +353,7 @@ public abstract class NetworkAgent extends Handler {
|
|||||||
/**
|
/**
|
||||||
* Called by the bearer code when it has new NetworkInfo data.
|
* Called by the bearer code when it has new NetworkInfo data.
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
public void sendNetworkInfo(NetworkInfo networkInfo) {
|
public void sendNetworkInfo(NetworkInfo networkInfo) {
|
||||||
queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, new NetworkInfo(networkInfo));
|
queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, new NetworkInfo(networkInfo));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.annotation.SystemApi;
|
|||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
import android.net.NetworkCapabilities.NetCapability;
|
import android.net.NetworkCapabilities.NetCapability;
|
||||||
import android.net.NetworkCapabilities.Transport;
|
import android.net.NetworkCapabilities.Transport;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
@@ -57,7 +58,7 @@ public class NetworkRequest implements Parcelable {
|
|||||||
* Causes CONNECTIVITY_ACTION broadcasts to be sent.
|
* Causes CONNECTIVITY_ACTION broadcasts to be sent.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
public final int legacyType;
|
public final int legacyType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package android.net;
|
package android.net;
|
||||||
|
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ public final class RouteInfo implements Parcelable {
|
|||||||
|
|
||||||
// Derived data members.
|
// Derived data members.
|
||||||
// TODO: remove these.
|
// TODO: remove these.
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
private final boolean mIsHost;
|
private final boolean mIsHost;
|
||||||
private final boolean mHasGateway;
|
private final boolean mHasGateway;
|
||||||
|
|
||||||
@@ -265,7 +266,7 @@ public final class RouteInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
|
||||||
private boolean isHost() {
|
private boolean isHost() {
|
||||||
return (mDestination.getAddress() instanceof Inet4Address &&
|
return (mDestination.getAddress() instanceof Inet4Address &&
|
||||||
mDestination.getPrefixLength() == 32) ||
|
mDestination.getPrefixLength() == 32) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user