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

Commit 475f8da0 authored by Michele Berionne's avatar Michele Berionne Committed by android-build-merger
Browse files

Merge "Changes to APIs for CarrierRestrictionRules class" am: 6d9dd94d am: 5654a523

am: 3d35392c

Change-Id: Iadbe8373de40af780de89beba3b8a393deb8e1e6
parents a6f2ea1e 3d35392c
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -7148,13 +7148,13 @@ package android.telephony {
  }
  public final class CarrierRestrictionRules implements android.os.Parcelable {
    method @NonNull public java.util.List<java.lang.Boolean> areCarrierIdentifiersAllowed(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>);
    method public int describeContents();
    method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers();
    method public int getDefaultCarrierRestriction();
    method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getExcludedCarriers();
    method public int getMultiSimPolicy();
    method public boolean isAllCarriersAllowed();
    method public java.util.List<java.lang.Boolean> isCarrierIdentifiersAllowed(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CARRIER_RESTRICTION_DEFAULT_ALLOWED = 1; // 0x1
    field public static final int CARRIER_RESTRICTION_DEFAULT_NOT_ALLOWED = 0; // 0x0
@@ -7163,13 +7163,13 @@ package android.telephony {
    field public static final int MULTISIM_POLICY_ONE_VALID_SIM_MUST_BE_PRESENT = 1; // 0x1
  }
  public static class CarrierRestrictionRules.Builder {
    method public android.telephony.CarrierRestrictionRules build();
    method public android.telephony.CarrierRestrictionRules.Builder setAllCarriersAllowed();
    method public android.telephony.CarrierRestrictionRules.Builder setAllowedCarriers(java.util.List<android.service.carrier.CarrierIdentifier>);
    method public android.telephony.CarrierRestrictionRules.Builder setDefaultCarrierRestriction(int);
    method public android.telephony.CarrierRestrictionRules.Builder setExcludedCarriers(java.util.List<android.service.carrier.CarrierIdentifier>);
    method public android.telephony.CarrierRestrictionRules.Builder setMultiSimPolicy(int);
  public static final class CarrierRestrictionRules.Builder {
    method @NonNull public android.telephony.CarrierRestrictionRules build();
    method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllCarriersAllowed();
    method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllowedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>);
    method @NonNull public android.telephony.CarrierRestrictionRules.Builder setDefaultCarrierRestriction(int);
    method @NonNull public android.telephony.CarrierRestrictionRules.Builder setExcludedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>);
    method @NonNull public android.telephony.CarrierRestrictionRules.Builder setMultiSimPolicy(int);
  }
  public final class DataFailCause {
+11 −8
Original line number Diff line number Diff line
@@ -177,7 +177,8 @@ public final class CarrierRestrictionRules implements Parcelable {
     * @return a list of boolean with the same size as input, indicating if each
     * {@link CarrierIdentifier} is allowed or not.
     */
    public List<Boolean> isCarrierIdentifiersAllowed(@NonNull List<CarrierIdentifier> carrierIds) {
    public @NonNull List<Boolean> areCarrierIdentifiersAllowed(
            @NonNull List<CarrierIdentifier> carrierIds) {
        ArrayList<Boolean> result = new ArrayList<>(carrierIds.size());

        // First calculate the result for each slot independently
@@ -332,7 +333,7 @@ public final class CarrierRestrictionRules implements Parcelable {
    /**
     * Builder for a {@link CarrierRestrictionRules}.
     */
    public static class Builder {
    public static final class Builder {
        private final CarrierRestrictionRules mRules;

        /** {@hide} */
@@ -341,14 +342,14 @@ public final class CarrierRestrictionRules implements Parcelable {
        }

        /** build command */
        public CarrierRestrictionRules build() {
        public @NonNull CarrierRestrictionRules build() {
            return mRules;
        }

        /**
         * Indicate that all carriers are allowed.
         */
        public Builder setAllCarriersAllowed() {
        public @NonNull Builder setAllCarriersAllowed() {
            mRules.mAllowedCarriers.clear();
            mRules.mExcludedCarriers.clear();
            mRules.mCarrierRestrictionDefault = CARRIER_RESTRICTION_DEFAULT_ALLOWED;
@@ -360,7 +361,8 @@ public final class CarrierRestrictionRules implements Parcelable {
         *
         * @param allowedCarriers list of allowed carriers
         */
        public Builder setAllowedCarriers(List<CarrierIdentifier> allowedCarriers) {
        public @NonNull Builder setAllowedCarriers(
                @NonNull List<CarrierIdentifier> allowedCarriers) {
            mRules.mAllowedCarriers = new ArrayList<CarrierIdentifier>(allowedCarriers);
            return this;
        }
@@ -370,7 +372,8 @@ public final class CarrierRestrictionRules implements Parcelable {
         *
         * @param excludedCarriers list of excluded carriers
         */
        public Builder setExcludedCarriers(List<CarrierIdentifier> excludedCarriers) {
        public @NonNull Builder setExcludedCarriers(
                @NonNull List<CarrierIdentifier> excludedCarriers) {
            mRules.mExcludedCarriers = new ArrayList<CarrierIdentifier>(excludedCarriers);
            return this;
        }
@@ -380,7 +383,7 @@ public final class CarrierRestrictionRules implements Parcelable {
         *
         * @param carrierRestrictionDefault prioritized carrier list
         */
        public Builder setDefaultCarrierRestriction(
        public @NonNull Builder setDefaultCarrierRestriction(
                @CarrierRestrictionDefault int carrierRestrictionDefault) {
            mRules.mCarrierRestrictionDefault = carrierRestrictionDefault;
            return this;
@@ -391,7 +394,7 @@ public final class CarrierRestrictionRules implements Parcelable {
         *
         * @param multiSimPolicy multi SIM policy
         */
        public Builder setMultiSimPolicy(@MultiSimPolicy int multiSimPolicy) {
        public @NonNull Builder setMultiSimPolicy(@MultiSimPolicy int multiSimPolicy) {
            mRules.mMultiSimPolicy = multiSimPolicy;
            return this;
        }