Search in sources :

Example 1 with TelephonyRegistryManager

use of android.telephony.TelephonyRegistryManager in project android_frameworks_opt_telephony by LineageOS.

the class SubscriptionController method notifySubscriptionInfoChanged.

/**
 * Notify the changed of subscription info.
 */
@UnsupportedAppUsage
public void notifySubscriptionInfoChanged() {
    TelephonyRegistryManager trm = (TelephonyRegistryManager) mContext.getSystemService(Context.TELEPHONY_REGISTRY_SERVICE);
    if (DBG)
        logd("notifySubscriptionInfoChanged:");
    trm.notifySubscriptionInfoChanged();
    // FIXME: Remove if listener technique accepted.
    broadcastSimInfoContentChanged();
    MultiSimSettingController.getInstance().notifySubscriptionInfoChanged();
    TelephonyMetrics metrics = TelephonyMetrics.getInstance();
    List<SubscriptionInfo> subInfos;
    synchronized (mSubInfoListLock) {
        subInfos = new ArrayList<>(mCacheActiveSubInfoList);
    }
    if (mOpptSubInfoListChangedDirtyBit.getAndSet(false)) {
        notifyOpportunisticSubscriptionInfoChanged();
    }
    metrics.updateActiveSubscriptionInfoList(subInfos);
}
Also used : SubscriptionInfo(android.telephony.SubscriptionInfo) TelephonyMetrics(com.android.internal.telephony.metrics.TelephonyMetrics) TelephonyRegistryManager(android.telephony.TelephonyRegistryManager) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 2 with TelephonyRegistryManager

use of android.telephony.TelephonyRegistryManager in project android_frameworks_opt_telephony by LineageOS.

the class PhoneSwitcher method notifyPreferredDataSubIdChanged.

/**
 * See {@link PhoneStateListener#LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE}.
 */
protected void notifyPreferredDataSubIdChanged() {
    TelephonyRegistryManager telephonyRegistryManager = (TelephonyRegistryManager) mContext.getSystemService(Context.TELEPHONY_REGISTRY_SERVICE);
    log("notifyPreferredDataSubIdChanged to " + mPreferredDataSubId.get());
    telephonyRegistryManager.notifyActiveDataSubIdChanged(mPreferredDataSubId.get());
}
Also used : TelephonyRegistryManager(android.telephony.TelephonyRegistryManager)

Example 3 with TelephonyRegistryManager

use of android.telephony.TelephonyRegistryManager in project android_frameworks_opt_telephony by LineageOS.

the class SubscriptionController method notifyOpportunisticSubscriptionInfoChanged.

private void notifyOpportunisticSubscriptionInfoChanged() {
    TelephonyRegistryManager trm = (TelephonyRegistryManager) mContext.getSystemService(Context.TELEPHONY_REGISTRY_SERVICE);
    if (DBG)
        logd("notifyOpptSubscriptionInfoChanged:");
    trm.notifyOpportunisticSubscriptionInfoChanged();
}
Also used : TelephonyRegistryManager(android.telephony.TelephonyRegistryManager)

Aggregations

TelephonyRegistryManager (android.telephony.TelephonyRegistryManager)3 UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)1 SubscriptionInfo (android.telephony.SubscriptionInfo)1 TelephonyMetrics (com.android.internal.telephony.metrics.TelephonyMetrics)1