[FUI23] Remove getNetworkQuotaInfo
Currently, getNetworkQuotaInfo in NetworkPolicyManagerService
uses NetworkState class, which will not be available after
ConnectivityService moved to mainline module.
Thus, to remove the usage of NetworkState, remove this function
since:
1. There is no internal usage and the function only prints
debug log.
2. It is non-SDK API which annotated with maxTargetSdk = 30,
callers should not expect it will continoue to work in next
Android release.
3. go/nonsdk-dash shows zero usage statistics.
Test: TH
Bug: 174123988
Change-Id: I450964a692b85f3ba89bf9f847e8089ee2445bda
This commit is contained in:
@@ -19,8 +19,6 @@ package android.net;
|
||||
import android.net.INetworkPolicyListener;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkPolicy;
|
||||
import android.net.NetworkQuotaInfo;
|
||||
import android.net.NetworkState;
|
||||
import android.net.NetworkTemplate;
|
||||
import android.telephony.SubscriptionPlan;
|
||||
|
||||
@@ -70,9 +68,6 @@ interface INetworkPolicyManager {
|
||||
|
||||
int getMultipathPreference(in Network network);
|
||||
|
||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||
NetworkQuotaInfo getNetworkQuotaInfo(in NetworkState state);
|
||||
|
||||
SubscriptionPlan[] getSubscriptionPlans(int subId, String callingPackage);
|
||||
void setSubscriptionPlans(int subId, in SubscriptionPlan[] plans, String callingPackage);
|
||||
String getSubscriptionPlansOwner(int subId);
|
||||
|
||||
@@ -167,7 +167,6 @@ import android.net.NetworkIdentity;
|
||||
import android.net.NetworkPolicy;
|
||||
import android.net.NetworkPolicyManager;
|
||||
import android.net.NetworkPolicyManager.UidState;
|
||||
import android.net.NetworkQuotaInfo;
|
||||
import android.net.NetworkRequest;
|
||||
import android.net.NetworkSpecifier;
|
||||
import android.net.NetworkStack;
|
||||
@@ -3166,14 +3165,6 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public NetworkQuotaInfo getNetworkQuotaInfo(NetworkState state) {
|
||||
Log.w(TAG, "Shame on UID " + Binder.getCallingUid()
|
||||
+ " for calling the hidden API getNetworkQuotaInfo(). Shame!");
|
||||
return new NetworkQuotaInfo();
|
||||
}
|
||||
|
||||
private void enforceSubscriptionPlanAccess(int subId, int callingUid, String callingPackage) {
|
||||
// Verify they're not lying about package name
|
||||
mAppOps.checkPackage(callingUid, callingPackage);
|
||||
|
||||
Reference in New Issue
Block a user