use of com.android.internal.telephony.uicc.UiccCard in project android_frameworks_opt_telephony by LineageOS.
the class SubscriptionController method insertEmptySubInfoRecord.
Uri insertEmptySubInfoRecord(String uniqueId, String displayName, int slotIndex, int subscriptionType) {
ContentResolver resolver = mContext.getContentResolver();
ContentValues value = new ContentValues();
value.put(SubscriptionManager.ICC_ID, uniqueId);
int color = getUnusedColor(mContext.getOpPackageName(), mContext.getAttributionTag());
// default SIM color differs between slots
value.put(SubscriptionManager.HUE, color);
value.put(SubscriptionManager.SIM_SLOT_INDEX, slotIndex);
value.put(SubscriptionManager.CARRIER_NAME, "");
value.put(SubscriptionManager.CARD_ID, uniqueId);
value.put(SubscriptionManager.SUBSCRIPTION_TYPE, subscriptionType);
if (!TextUtils.isEmpty(displayName)) {
value.put(SubscriptionManager.DISPLAY_NAME, displayName);
}
if (!isSubscriptionForRemoteSim(subscriptionType)) {
UiccCard card = mUiccController.getUiccCardForPhone(slotIndex);
if (card != null) {
String cardId = card.getCardId();
if (cardId != null) {
value.put(SubscriptionManager.CARD_ID, cardId);
}
}
}
Uri uri = resolver.insert(SubscriptionManager.CONTENT_URI, value);
// Refresh the Cache of Active Subscription Info List
refreshCachedActiveSubscriptionInfoList();
return uri;
}
use of com.android.internal.telephony.uicc.UiccCard in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method getOperatorBrandOverride.
private String getOperatorBrandOverride() {
UiccCard card = mPhone.getUiccCard();
if (card == null)
return null;
UiccProfile profile = card.getUiccProfile();
if (profile == null)
return null;
return profile.getOperatorBrandOverride();
}
Aggregations