Add @UnsupportedAppUsage annotations
For packages:
android.net
android.net.wifi
android.nfc
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Merged-In: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
Change-Id: I16570aef456b45a5543bf889dddc7a0d25441928
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 83bb3a0..62a5c3d 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -47,10 +47,12 @@
{
Network getActiveNetwork();
Network getActiveNetworkForUid(int uid, boolean ignoreBlocked);
+ @UnsupportedAppUsage
NetworkInfo getActiveNetworkInfo();
NetworkInfo getActiveNetworkInfoForUid(int uid, boolean ignoreBlocked);
NetworkInfo getNetworkInfo(int networkType);
NetworkInfo getNetworkInfoForUid(in Network network, int uid, boolean ignoreBlocked);
+ @UnsupportedAppUsage
NetworkInfo[] getAllNetworkInfo();
Network getNetworkForType(int networkType);
Network[] getAllNetworks();
@@ -58,12 +60,14 @@
boolean isNetworkSupported(int networkType);
+ @UnsupportedAppUsage
LinkProperties getActiveLinkProperties();
LinkProperties getLinkPropertiesForType(int networkType);
LinkProperties getLinkProperties(in Network network);
NetworkCapabilities getNetworkCapabilities(in Network network);
+ @UnsupportedAppUsage
NetworkState[] getAllNetworkState();
NetworkQuotaInfo getActiveNetworkQuotaInfo();
@@ -75,6 +79,7 @@
int untether(String iface, String callerPkg);
+ @UnsupportedAppUsage
int getLastTetherError(String iface);
boolean isTetheringSupported(String callerPkg);
@@ -84,16 +89,21 @@
void stopTethering(int type, String callerPkg);
+ @UnsupportedAppUsage
String[] getTetherableIfaces();
+ @UnsupportedAppUsage
String[] getTetheredIfaces();
+ @UnsupportedAppUsage
String[] getTetheringErroredIfaces();
String[] getTetheredDhcpRanges();
+ @UnsupportedAppUsage
String[] getTetherableUsbRegexs();
+ @UnsupportedAppUsage
String[] getTetherableWifiRegexs();
String[] getTetherableBluetoothRegexs();
@@ -118,6 +128,7 @@
VpnConfig getVpnConfig(int userId);
+ @UnsupportedAppUsage
void startLegacyVpn(in VpnProfile profile);
LegacyVpnInfo getLegacyVpnInfo(int userId);
diff --git a/core/java/android/net/INetworkPolicyManager.aidl b/core/java/android/net/INetworkPolicyManager.aidl
index e92302a..385cb1d 100644
--- a/core/java/android/net/INetworkPolicyManager.aidl
+++ b/core/java/android/net/INetworkPolicyManager.aidl
@@ -31,9 +31,11 @@
interface INetworkPolicyManager {
/** Control UID policies. */
+ @UnsupportedAppUsage
void setUidPolicy(int uid, int policy);
void addUidPolicy(int uid, int policy);
void removeUidPolicy(int uid, int policy);
+ @UnsupportedAppUsage
int getUidPolicy(int uid);
int[] getUidsWithPolicy(int policy);
@@ -41,14 +43,18 @@
void unregisterListener(INetworkPolicyListener listener);
/** Control network policies atomically. */
+ @UnsupportedAppUsage
void setNetworkPolicies(in NetworkPolicy[] policies);
NetworkPolicy[] getNetworkPolicies(String callingPackage);
/** Snooze limit on policy matching given template. */
+ @UnsupportedAppUsage
void snoozeLimit(in NetworkTemplate template);
/** Control if background data is restricted system-wide. */
+ @UnsupportedAppUsage
void setRestrictBackground(boolean restrictBackground);
+ @UnsupportedAppUsage
boolean getRestrictBackground();
/** Callback used to change internal state on tethering */
@@ -64,6 +70,7 @@
void setDeviceIdleMode(boolean enabled);
void setWifiMeteredOverride(String networkId, int meteredOverride);
+ @UnsupportedAppUsage
NetworkQuotaInfo getNetworkQuotaInfo(in NetworkState state);
SubscriptionPlan[] getSubscriptionPlans(int subId, String callingPackage);
diff --git a/core/java/android/net/INetworkStatsService.aidl b/core/java/android/net/INetworkStatsService.aidl
index 8e6f272..92b685c 100644
--- a/core/java/android/net/INetworkStatsService.aidl
+++ b/core/java/android/net/INetworkStatsService.aidl
@@ -29,6 +29,7 @@
interface INetworkStatsService {
/** Start a statistics query session. */
+ @UnsupportedAppUsage
INetworkStatsSession openSession();
/** Start a statistics query session. If calling package is profile or device owner then it is
@@ -37,9 +38,11 @@
* PACKAGE_USAGE_STATS permission is always checked. If PACKAGE_USAGE_STATS is not granted
* READ_NETWORK_USAGE_STATS is checked for.
*/
+ @UnsupportedAppUsage
INetworkStatsSession openSessionForUsageStats(int flags, String callingPackage);
/** Return data layer snapshot of UID network usage. */
+ @UnsupportedAppUsage
NetworkStats getDataLayerSnapshotForUid(int uid);
/** Get a detailed snapshot of stats since boot for all UIDs.
@@ -52,6 +55,7 @@
NetworkStats getDetailedUidStats(in String[] requiredIfaces);
/** Return set of any ifaces associated with mobile networks since boot. */
+ @UnsupportedAppUsage
String[] getMobileIfaces();
/** Increment data layer count of operations performed for UID and tag. */
@@ -60,6 +64,7 @@
/** Force update of ifaces. */
void forceUpdateIfaces(in Network[] defaultNetworks);
/** Force update of statistics. */
+ @UnsupportedAppUsage
void forceUpdate();
/** Registers a callback on data usage. */
diff --git a/core/java/android/net/INetworkStatsSession.aidl b/core/java/android/net/INetworkStatsSession.aidl
index 5229a3b..f13f2cb 100644
--- a/core/java/android/net/INetworkStatsSession.aidl
+++ b/core/java/android/net/INetworkStatsSession.aidl
@@ -27,13 +27,17 @@
NetworkStats getDeviceSummaryForNetwork(in NetworkTemplate template, long start, long end);
/** Return network layer usage summary for traffic that matches template. */
+ @UnsupportedAppUsage
NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end);
/** Return historical network layer stats for traffic that matches template. */
+ @UnsupportedAppUsage
NetworkStatsHistory getHistoryForNetwork(in NetworkTemplate template, int fields);
/** Return network layer usage summary per UID for traffic that matches template. */
+ @UnsupportedAppUsage
NetworkStats getSummaryForAllUid(in NetworkTemplate template, long start, long end, boolean includeTags);
/** Return historical network layer stats for specific UID traffic that matches template. */
+ @UnsupportedAppUsage
NetworkStatsHistory getHistoryForUid(in NetworkTemplate template, int uid, int set, int tag, int fields);
/** Return historical network layer stats for specific UID traffic that matches template. */
NetworkStatsHistory getHistoryIntervalForUid(in NetworkTemplate template, int uid, int set, int tag, int fields, long start, long end);
@@ -41,6 +45,7 @@
/** Return array of uids that have stats and are accessible to the calling user */
int[] getRelevantUids();
+ @UnsupportedAppUsage
void close();
}
diff --git a/core/java/android/nfc/INfcAdapterExtras.aidl b/core/java/android/nfc/INfcAdapterExtras.aidl
index 41ebf63..dd260bc 100644
--- a/core/java/android/nfc/INfcAdapterExtras.aidl
+++ b/core/java/android/nfc/INfcAdapterExtras.aidl
@@ -23,11 +23,18 @@
* {@hide}
*/
interface INfcAdapterExtras {
+ @UnsupportedAppUsage
Bundle open(in String pkg, IBinder b);
+ @UnsupportedAppUsage
Bundle close(in String pkg, IBinder b);
+ @UnsupportedAppUsage
Bundle transceive(in String pkg, in byte[] data_in);
+ @UnsupportedAppUsage
int getCardEmulationRoute(in String pkg);
+ @UnsupportedAppUsage
void setCardEmulationRoute(in String pkg, int route);
+ @UnsupportedAppUsage
void authenticate(in String pkg, in byte[] token);
+ @UnsupportedAppUsage
String getDriverName(in String pkg);
}