FileDocCategorySizeDatePackage
PhoneSubInfoController.javaAPI DocAndroid 5.1 API10478Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony

PhoneSubInfoController

public class PhoneSubInfoController extends IPhoneSubInfo.Stub

Fields Summary
private static final String
TAG
private com.android.internal.telephony.Phone[]
mPhone
Constructors Summary
public PhoneSubInfoController(com.android.internal.telephony.Phone[] phone)


       
        mPhone = phone;
        if (ServiceManager.getService("iphonesubinfo") == null) {
            ServiceManager.addService("iphonesubinfo", this);
        }
    
Methods Summary
public java.lang.StringgetCompleteVoiceMailNumber()

        return getCompleteVoiceMailNumberForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetCompleteVoiceMailNumberForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getCompleteVoiceMailNumber();
        } else {
            Rlog.e(TAG,"getCompleteVoiceMailNumber phoneSubInfoProxy" +
                      " is null for Subscription:" + subId);
            return null;
        }
    
private intgetDefaultSubscription()

        return  PhoneFactory.getDefaultSubscription();
    
public java.lang.StringgetDeviceId()

        return getDeviceIdForPhone(SubscriptionManager.getPhoneId(getDefaultSubscription()));
    
public java.lang.StringgetDeviceIdForPhone(int phoneId)

        Phone phone = getPhone(phoneId);
        if (phone != null) {
            return phone.getDeviceId();
        } else {
            Rlog.e(TAG,"getDeviceIdForPhone phone " + phoneId + " is null");
            return null;
        }
    
public java.lang.StringgetDeviceSvn()

        return getDeviceSvnUsingSubId(getDefaultSubscription());
    
public java.lang.StringgetDeviceSvnUsingSubId(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getDeviceSvn();
        } else {
            Rlog.e(TAG,"getDeviceSvn phoneSubInfoProxy is null");
            return null;
        }
    
public java.lang.StringgetGroupIdLevel1()

         return getGroupIdLevel1ForSubscriber(getDefaultSubscription());
     
public java.lang.StringgetGroupIdLevel1ForSubscriber(int subId)

         PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
         if (phoneSubInfoProxy != null) {
             return phoneSubInfoProxy.getGroupIdLevel1();
         } else {
             Rlog.e(TAG,"getGroupIdLevel1 phoneSubInfoProxy is" +
                       " null for Subscription:" + subId);
             return null;
         }
     
public java.lang.StringgetIccSerialNumber()
Retrieves the serial number of the ICC, if applicable.

        return getIccSerialNumberForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetIccSerialNumberForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getIccSerialNumber();
        } else {
            Rlog.e(TAG,"getIccSerialNumber phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetIccSimChallengeResponse(int subId, int appType, java.lang.String data)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        return phoneSubInfoProxy.getIccSimChallengeResponse(subId, appType, data);
    
public java.lang.StringgetImeiForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getImei();
        } else {
            Rlog.e(TAG,"getDeviceId phoneSubInfoProxy is null" +
                    " for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetIsimChallengeResponse(java.lang.String nonce)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimChallengeResponse(nonce);
    
public java.lang.StringgetIsimDomain()

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimDomain();
    
public java.lang.StringgetIsimImpi()

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimImpi();
    
public java.lang.String[]getIsimImpu()

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimImpu();
    
public java.lang.StringgetIsimIst()

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimIst();
    
public java.lang.String[]getIsimPcscf()

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
        return phoneSubInfoProxy.getIsimPcscf();
    
public java.lang.StringgetLine1AlphaTag()

        return getLine1AlphaTagForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetLine1AlphaTagForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getLine1AlphaTag();
        } else {
            Rlog.e(TAG,"getLine1AlphaTag phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetLine1Number()

        return getLine1NumberForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetLine1NumberForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getLine1Number();
        } else {
            Rlog.e(TAG,"getLine1Number phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetMsisdn()

        return getMsisdnForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetMsisdnForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getMsisdn();
        } else {
            Rlog.e(TAG,"getMsisdn phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetNaiForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getNai();
        } else {
            Rlog.e(TAG,"getNai phoneSubInfoProxy is null" +
                      " for Subscription:" + subId);
            return null;
        }
    
private PhoneProxygetPhone(int phoneId)

        if (phoneId < 0 || phoneId >= TelephonyManager.getDefault().getPhoneCount()) {
            phoneId = 0;
        }
        return (PhoneProxy) mPhone[phoneId];
    
private com.android.internal.telephony.PhoneSubInfoProxygetPhoneSubInfoProxy(int subId)
get Phone sub info proxy object based on subId.


        int phoneId = SubscriptionManager.getPhoneId(subId);

        try {
            return getPhone(phoneId).getPhoneSubInfoProxy();
        } catch (NullPointerException e) {
            Rlog.e(TAG, "Exception is :" + e.toString() + " For subId :" + subId);
            e.printStackTrace();
            return null;
        }
    
public java.lang.StringgetSubscriberId()

        return getSubscriberIdForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetSubscriberIdForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getSubscriberId();
        } else {
            Rlog.e(TAG,"getSubscriberId phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetVoiceMailAlphaTag()

        return getVoiceMailAlphaTagForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetVoiceMailAlphaTagForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getVoiceMailAlphaTag();
        } else {
            Rlog.e(TAG,"getVoiceMailAlphaTag phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }
    
public java.lang.StringgetVoiceMailNumber()

        return getVoiceMailNumberForSubscriber(getDefaultSubscription());
    
public java.lang.StringgetVoiceMailNumberForSubscriber(int subId)

        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getVoiceMailNumber();
        } else {
            Rlog.e(TAG,"getVoiceMailNumber phoneSubInfoProxy is" +
                      " null for Subscription:" + subId);
            return null;
        }