Merge "Define a telephony database column for uicc applications enabled or not."
This commit is contained in:
@@ -8814,6 +8814,7 @@ package android.telephony {
|
||||
}
|
||||
|
||||
public class SubscriptionInfo implements android.os.Parcelable {
|
||||
method public boolean areUiccApplicationsEnabled();
|
||||
method @Nullable public java.util.List<android.telephony.UiccAccessRule> getAccessRules();
|
||||
method public int getProfileClass();
|
||||
method public boolean isGroupDisabled();
|
||||
|
||||
@@ -209,6 +209,12 @@ public class SubscriptionInfo implements Parcelable {
|
||||
*/
|
||||
private int mSubscriptionType;
|
||||
|
||||
/**
|
||||
* Whether uicc applications are configured to enable or disable.
|
||||
* By default it's true.
|
||||
*/
|
||||
private boolean mAreUiccApplicationsEnabled = true;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@@ -220,7 +226,7 @@ public class SubscriptionInfo implements Parcelable {
|
||||
roaming, icon, mcc, mnc, countryIso, isEmbedded, nativeAccessRules, cardString, -1,
|
||||
false, null, false, TelephonyManager.UNKNOWN_CARRIER_ID,
|
||||
SubscriptionManager.PROFILE_CLASS_DEFAULT,
|
||||
SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null);
|
||||
SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,7 +240,7 @@ public class SubscriptionInfo implements Parcelable {
|
||||
this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
|
||||
roaming, icon, mcc, mnc, countryIso, isEmbedded, nativeAccessRules, cardString, -1,
|
||||
isOpportunistic, groupUUID, false, carrierId, profileClass,
|
||||
SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null);
|
||||
SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -246,7 +252,8 @@ public class SubscriptionInfo implements Parcelable {
|
||||
@Nullable UiccAccessRule[] nativeAccessRules, String cardString, int cardId,
|
||||
boolean isOpportunistic, @Nullable String groupUUID, boolean isGroupDisabled,
|
||||
int carrierId, int profileClass, int subType, @Nullable String groupOwner,
|
||||
@Nullable UiccAccessRule[] carrierConfigAccessRules) {
|
||||
@Nullable UiccAccessRule[] carrierConfigAccessRules,
|
||||
boolean areUiccApplicationsEnabled) {
|
||||
this.mId = id;
|
||||
this.mIccId = iccId;
|
||||
this.mSimSlotIndex = simSlotIndex;
|
||||
@@ -272,6 +279,7 @@ public class SubscriptionInfo implements Parcelable {
|
||||
this.mSubscriptionType = subType;
|
||||
this.mGroupOwner = groupOwner;
|
||||
this.mCarrierConfigAccessRules = carrierConfigAccessRules;
|
||||
this.mAreUiccApplicationsEnabled = areUiccApplicationsEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -660,6 +668,15 @@ public class SubscriptionInfo implements Parcelable {
|
||||
return mIsGroupDisabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether uicc applications are set to be enabled or disabled.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean areUiccApplicationsEnabled() {
|
||||
return mAreUiccApplicationsEnabled;
|
||||
}
|
||||
|
||||
public static final @android.annotation.NonNull Parcelable.Creator<SubscriptionInfo> CREATOR = new Parcelable.Creator<SubscriptionInfo>() {
|
||||
@Override
|
||||
public SubscriptionInfo createFromParcel(Parcel source) {
|
||||
@@ -691,12 +708,13 @@ public class SubscriptionInfo implements Parcelable {
|
||||
String groupOwner = source.readString();
|
||||
UiccAccessRule[] carrierConfigAccessRules = source.createTypedArray(
|
||||
UiccAccessRule.CREATOR);
|
||||
boolean areUiccApplicationsEnabled = source.readBoolean();
|
||||
|
||||
SubscriptionInfo info = new SubscriptionInfo(id, iccId, simSlotIndex, displayName,
|
||||
carrierName, nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc,
|
||||
countryIso, isEmbedded, nativeAccessRules, cardString, cardId, isOpportunistic,
|
||||
groupUUID, isGroupDisabled, carrierid, profileClass, subType, groupOwner,
|
||||
carrierConfigAccessRules);
|
||||
carrierConfigAccessRules, areUiccApplicationsEnabled);
|
||||
info.setAssociatedPlmns(ehplmns, hplmns);
|
||||
return info;
|
||||
}
|
||||
@@ -736,6 +754,7 @@ public class SubscriptionInfo implements Parcelable {
|
||||
dest.writeStringArray(mHplmns);
|
||||
dest.writeString(mGroupOwner);
|
||||
dest.writeTypedArray(mCarrierConfigAccessRules, flags);
|
||||
dest.writeBoolean(mAreUiccApplicationsEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -778,15 +797,16 @@ public class SubscriptionInfo implements Parcelable {
|
||||
+ " hplmns=" + Arrays.toString(mHplmns)
|
||||
+ " subscriptionType=" + mSubscriptionType
|
||||
+ " mGroupOwner=" + mGroupOwner
|
||||
+ " carrierConfigAccessRules=" + mCarrierConfigAccessRules + "}";
|
||||
+ " carrierConfigAccessRules=" + mCarrierConfigAccessRules
|
||||
+ " mAreUiccApplicationsEnabled=" + mAreUiccApplicationsEnabled + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mId, mSimSlotIndex, mNameSource, mIconTint, mDataRoaming, mIsEmbedded,
|
||||
mIsOpportunistic, mGroupUUID, mIccId, mNumber, mMcc, mMnc,
|
||||
mCountryIso, mCardString, mCardId, mDisplayName, mCarrierName, mNativeAccessRules,
|
||||
mIsGroupDisabled, mCarrierId, mProfileClass, mGroupOwner);
|
||||
mIsOpportunistic, mGroupUUID, mIccId, mNumber, mMcc, mMnc, mCountryIso, mCardString,
|
||||
mCardId, mDisplayName, mCarrierName, mNativeAccessRules, mIsGroupDisabled,
|
||||
mCarrierId, mProfileClass, mGroupOwner, mAreUiccApplicationsEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -809,6 +829,7 @@ public class SubscriptionInfo implements Parcelable {
|
||||
&& mIsEmbedded == toCompare.mIsEmbedded
|
||||
&& mIsOpportunistic == toCompare.mIsOpportunistic
|
||||
&& mIsGroupDisabled == toCompare.mIsGroupDisabled
|
||||
&& mAreUiccApplicationsEnabled == toCompare.mAreUiccApplicationsEnabled
|
||||
&& mCarrierId == toCompare.mCarrierId
|
||||
&& Objects.equals(mGroupUUID, toCompare.mGroupUUID)
|
||||
&& Objects.equals(mIccId, toCompare.mIccId)
|
||||
|
||||
@@ -834,6 +834,12 @@ public class SubscriptionManager {
|
||||
//TODO: add @SystemApi
|
||||
public static final String IMSI = "imsi";
|
||||
|
||||
/**
|
||||
* Whether uicc applications is set to be enabled or disabled. By default it's enabled.
|
||||
* @hide
|
||||
*/
|
||||
public static final String UICC_APPLICATIONS_ENABLED = "uicc_applications_enabled";
|
||||
|
||||
/**
|
||||
* Broadcast Action: The user has changed one of the default subs related to
|
||||
* data, phone calls, or sms</p>
|
||||
|
||||
Reference in New Issue
Block a user