Remove BarringInfo#isServiceBarred() am: e3adb3a0a6

Change-Id: I4bfffa6b4e06bc361e2da222b2f25d6ddc32b7aa
This commit is contained in:
Nathan Harold
2020-03-19 00:08:41 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 15 deletions

View File

@@ -44683,7 +44683,6 @@ package android.telephony {
public final class BarringInfo implements android.os.Parcelable {
method public int describeContents();
method @NonNull public android.telephony.BarringInfo.BarringServiceInfo getBarringServiceInfo(int);
method public boolean isServiceBarred(int);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field public static final int BARRING_SERVICE_TYPE_CS_FALLBACK = 5; // 0x5
field public static final int BARRING_SERVICE_TYPE_CS_SERVICE = 0; // 0x0

View File

@@ -239,6 +239,12 @@ public final class BarringInfo implements Parcelable {
}
}
private static final BarringServiceInfo BARRING_SERVICE_INFO_UNKNOWN =
new BarringServiceInfo(BarringServiceInfo.BARRING_TYPE_UNKNOWN);
private static final BarringServiceInfo BARRING_SERVICE_INFO_UNBARRED =
new BarringServiceInfo(BarringServiceInfo.BARRING_TYPE_NONE);
private CellIdentity mCellIdentity;
// A SparseArray potentially mapping each BarringService type to a BarringServiceInfo config
@@ -300,17 +306,6 @@ public final class BarringInfo implements Parcelable {
return new BarringInfo(ci, serviceInfos);
}
/**
* Return whether a service is currently barred based on the BarringInfo
*
* @param service the service to be checked.
* @return true if the service is currently being barred, otherwise false
*/
public boolean isServiceBarred(@BarringServiceType int service) {
BarringServiceInfo bsi = mBarringServiceInfos.get(service);
return bsi != null && (bsi.isBarred());
}
/**
* Get the BarringServiceInfo for a specified service.
*
@@ -322,9 +317,8 @@ public final class BarringInfo implements Parcelable {
// type as UNKNOWN; if the modem reports barring info but doesn't report for a particular
// service then we can safely assume that the service isn't barred (for instance because
// that particular service isn't applicable to the current RAN).
return (bsi != null) ? bsi : new BarringServiceInfo(
mBarringServiceInfos.size() > 0 ? BarringServiceInfo.BARRING_TYPE_NONE :
BarringServiceInfo.BARRING_TYPE_UNKNOWN);
return (bsi != null) ? bsi : mBarringServiceInfos.size() > 0
? BARRING_SERVICE_INFO_UNBARRED : BARRING_SERVICE_INFO_UNKNOWN;
}
/** @hide */