Merge "Changes to APIs for CarrierRestrictionRules class" am: 6d9dd94da0

am: 5654a52322

Change-Id: Iee34f00cb212f2a928cf7e0b40c7cbd55252d737
This commit is contained in:
Michele Berionne
2019-03-04 11:36:09 -08:00
committed by android-build-merger
2 changed files with 19 additions and 16 deletions

View File

@@ -5554,13 +5554,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
@@ -5569,13 +5569,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 {

View File

@@ -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;
}