Search in sources :

Example 1 with IExtTelephony

use of org.codeaurora.internal.IExtTelephony in project android_frameworks_base by AOSPA.

the class SimSwitchController method updateSubscriptions.

private void updateSubscriptions() {
    int voicePrefSlot = -1;
    IExtTelephony extTelephony = IExtTelephony.Stub.asInterface(ServiceManager.getService("extphone"));
    mSubInfoList = mSubscriptionManager.getActiveSubscriptionInfoList();
    if (mSubInfoList != null) {
        for (SubscriptionInfo subInfo : mSubInfoList) {
            int slotId = subInfo.getSimSlotIndex();
            if (SubscriptionManager.isValidSlotId(slotId)) {
                try {
                    mUiccProvisionStatus[slotId] = extTelephony.getCurrentUiccCardProvisioningStatus(slotId);
                } catch (RemoteException ex) {
                    logd("Activate  sub failed  phoneId " + subInfo.getSimSlotIndex());
                } catch (NullPointerException ex) {
                    logd("Failed to activate sub Exception: " + ex);
                }
            }
        }
        voicePrefSlot = getVoicePrefSlot();
    }
    updateViews(voicePrefSlot);
}
Also used : IExtTelephony(org.codeaurora.internal.IExtTelephony) SubscriptionInfo(android.telephony.SubscriptionInfo) RemoteException(android.os.RemoteException)

Aggregations

RemoteException (android.os.RemoteException)1 SubscriptionInfo (android.telephony.SubscriptionInfo)1 IExtTelephony (org.codeaurora.internal.IExtTelephony)1