Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15b304a1 authored by Nathan Harold's avatar Nathan Harold Committed by Automerger Merge Worker
Browse files

Remove BarringInfo#isServiceBarred() am: e3adb3a0

Change-Id: I4bfffa6b4e06bc361e2da222b2f25d6ddc32b7aa
parents 143fe100 e3adb3a0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+8 −14
Original line number Diff line number Diff line
@@ -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 */