Merge "Remove hidden deprecated getActiveNetworkQuotaInfo"

This commit is contained in:
Chiachang Wang
2020-12-15 07:02:54 +00:00
committed by Gerrit Code Review
3 changed files with 0 additions and 22 deletions

View File

@@ -2108,17 +2108,6 @@ public class ConnectivityManager {
// ignored
}
/** {@hide} */
@Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
try {
return mService.getActiveNetworkQuotaInfo();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* @hide
* @deprecated Talk to TelephonyManager directly

View File

@@ -25,7 +25,6 @@ import android.net.Network;
import android.net.NetworkAgentConfig;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.NetworkQuotaInfo;
import android.net.NetworkRequest;
import android.net.NetworkState;
import android.net.ISocketKeepaliveCallback;
@@ -76,7 +75,6 @@ interface IConnectivityManager
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
NetworkState[] getAllNetworkState();
NetworkQuotaInfo getActiveNetworkQuotaInfo();
boolean isActiveNetworkMetered();
boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress,

View File

@@ -113,7 +113,6 @@ import android.net.NetworkInfo.DetailedState;
import android.net.NetworkMonitorManager;
import android.net.NetworkPolicyManager;
import android.net.NetworkProvider;
import android.net.NetworkQuotaInfo;
import android.net.NetworkRequest;
import android.net.NetworkSpecifier;
import android.net.NetworkStack;
@@ -1780,14 +1779,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
return result.toArray(new NetworkState[result.size()]);
}
@Override
@Deprecated
public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
Log.w(TAG, "Shame on UID " + Binder.getCallingUid()
+ " for calling the hidden API getNetworkQuotaInfo(). Shame!");
return new NetworkQuotaInfo();
}
@Override
public boolean isActiveNetworkMetered() {
enforceAccessPermission();