Loading src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -1962,4 +1962,11 @@ public interface Phone { * @param h Handler to be removed from the registrant list. */ public void unregisterForRadioCapabilityChanged(Handler h); /** * Query the IMS Registration Status. * * @return true if IMS is Registered */ public boolean isImsRegistered(); } src/java/com/android/internal/telephony/PhoneBase.java +19 −0 Original line number Diff line number Diff line Loading @@ -2055,6 +2055,25 @@ public abstract class PhoneBase extends Handler implements Phone { Integer.toString(SID)); } /** * Get IMS Registration Status */ @Override public boolean isImsRegistered() { ImsPhone imsPhone = mImsPhone; boolean isImsRegistered = false; if (imsPhone != null) { isImsRegistered = imsPhone.isImsRegistered(); } else { ServiceStateTracker sst = getServiceStateTracker(); if (sst != null) { isImsRegistered = sst.isImsRegistered(); } } Rlog.d(LOG_TAG, "isImsRegistered =" + isImsRegistered); return isImsRegistered; } private boolean getRoamingOverrideHelper(String prefix, String key) { String iccId = getIccSerialNumber(); if (TextUtils.isEmpty(iccId) || TextUtils.isEmpty(key)) { Loading src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -1502,6 +1502,11 @@ public class PhoneProxy extends Handler implements Phone { public IccCardProxy getPhoneIccCardProxy() { return mIccCardProxy; } public boolean isImsRegistered() { return mActivePhone.isImsRegistered(); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { try { ((PhoneBase)mActivePhone).dump(fd, pw, args); Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +19 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,8 @@ public abstract class ServiceStateTracker extends Handler { protected static final int EVENT_GET_CELL_INFO_LIST = 43; protected static final int EVENT_UNSOL_CELL_INFO_LIST = 44; protected static final int EVENT_CHANGE_IMS_STATE = 45; protected static final int EVENT_IMS_STATE_CHANGED = 46; protected static final int EVENT_IMS_STATE_DONE = 47; protected static final String TIMEZONE_PROPERTY = "persist.sys.timezone"; Loading Loading @@ -222,6 +224,7 @@ public abstract class ServiceStateTracker extends Handler { protected static final String ACTION_RADIO_OFF = "android.intent.action.ACTION_RADIO_OFF"; protected boolean mPowerOffDelayNeed = true; protected boolean mDeviceShuttingDown = false; private boolean mImsRegistered = false; protected SubscriptionManager mSubscriptionManager; protected final OnSubscriptionsChangedListener mOnSubscriptionsChangedListener = Loading Loading @@ -293,6 +296,7 @@ public abstract class ServiceStateTracker extends Handler { mPhoneBase.setSystemProperty(TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, ServiceState.rilRadioTechnologyToString(ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)); mCi.registerForImsNetworkStateChanged(this, EVENT_IMS_STATE_CHANGED, null); } void requestShutdown() { Loading Loading @@ -579,6 +583,18 @@ public abstract class ServiceStateTracker extends Handler { break; } case EVENT_IMS_STATE_CHANGED: // received unsol mCi.getImsRegistrationState(this.obtainMessage(EVENT_IMS_STATE_DONE)); break; case EVENT_IMS_STATE_DONE: AsyncResult ar = (AsyncResult) msg.obj; if (ar.exception == null) { int[] responseArray = (int[])ar.result; mImsRegistered = (responseArray[0] == 1) ? true : false; } break; default: log("Unhandled message with number: " + msg.what); break; Loading Loading @@ -941,6 +957,9 @@ public abstract class ServiceStateTracker extends Handler { pw.flush(); } public boolean isImsRegistered() { return mImsRegistered; } /** * Verifies the current thread is the same as the thread originally * used in the initialization of this instance. Throws RuntimeException Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +8 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ public class ImsPhone extends ImsPhoneBase { private final RegistrantList mSilentRedialRegistrants = new RegistrantList(); private boolean mImsRegistered = false; // A runnable which is used to automatically exit from Ecm after a period of time. private Runnable mExitEcmRunnable = new Runnable() { @Override Loading Loading @@ -1244,4 +1245,11 @@ public class ImsPhone extends ImsPhoneBase { public Phone getDefaultPhone() { return mDefaultPhone; } public boolean isImsRegistered() { return mImsRegistered; } public void setImsRegistered(boolean value) { mImsRegistered = value; } } Loading
src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -1962,4 +1962,11 @@ public interface Phone { * @param h Handler to be removed from the registrant list. */ public void unregisterForRadioCapabilityChanged(Handler h); /** * Query the IMS Registration Status. * * @return true if IMS is Registered */ public boolean isImsRegistered(); }
src/java/com/android/internal/telephony/PhoneBase.java +19 −0 Original line number Diff line number Diff line Loading @@ -2055,6 +2055,25 @@ public abstract class PhoneBase extends Handler implements Phone { Integer.toString(SID)); } /** * Get IMS Registration Status */ @Override public boolean isImsRegistered() { ImsPhone imsPhone = mImsPhone; boolean isImsRegistered = false; if (imsPhone != null) { isImsRegistered = imsPhone.isImsRegistered(); } else { ServiceStateTracker sst = getServiceStateTracker(); if (sst != null) { isImsRegistered = sst.isImsRegistered(); } } Rlog.d(LOG_TAG, "isImsRegistered =" + isImsRegistered); return isImsRegistered; } private boolean getRoamingOverrideHelper(String prefix, String key) { String iccId = getIccSerialNumber(); if (TextUtils.isEmpty(iccId) || TextUtils.isEmpty(key)) { Loading
src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -1502,6 +1502,11 @@ public class PhoneProxy extends Handler implements Phone { public IccCardProxy getPhoneIccCardProxy() { return mIccCardProxy; } public boolean isImsRegistered() { return mActivePhone.isImsRegistered(); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { try { ((PhoneBase)mActivePhone).dump(fd, pw, args); Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +19 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,8 @@ public abstract class ServiceStateTracker extends Handler { protected static final int EVENT_GET_CELL_INFO_LIST = 43; protected static final int EVENT_UNSOL_CELL_INFO_LIST = 44; protected static final int EVENT_CHANGE_IMS_STATE = 45; protected static final int EVENT_IMS_STATE_CHANGED = 46; protected static final int EVENT_IMS_STATE_DONE = 47; protected static final String TIMEZONE_PROPERTY = "persist.sys.timezone"; Loading Loading @@ -222,6 +224,7 @@ public abstract class ServiceStateTracker extends Handler { protected static final String ACTION_RADIO_OFF = "android.intent.action.ACTION_RADIO_OFF"; protected boolean mPowerOffDelayNeed = true; protected boolean mDeviceShuttingDown = false; private boolean mImsRegistered = false; protected SubscriptionManager mSubscriptionManager; protected final OnSubscriptionsChangedListener mOnSubscriptionsChangedListener = Loading Loading @@ -293,6 +296,7 @@ public abstract class ServiceStateTracker extends Handler { mPhoneBase.setSystemProperty(TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, ServiceState.rilRadioTechnologyToString(ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)); mCi.registerForImsNetworkStateChanged(this, EVENT_IMS_STATE_CHANGED, null); } void requestShutdown() { Loading Loading @@ -579,6 +583,18 @@ public abstract class ServiceStateTracker extends Handler { break; } case EVENT_IMS_STATE_CHANGED: // received unsol mCi.getImsRegistrationState(this.obtainMessage(EVENT_IMS_STATE_DONE)); break; case EVENT_IMS_STATE_DONE: AsyncResult ar = (AsyncResult) msg.obj; if (ar.exception == null) { int[] responseArray = (int[])ar.result; mImsRegistered = (responseArray[0] == 1) ? true : false; } break; default: log("Unhandled message with number: " + msg.what); break; Loading Loading @@ -941,6 +957,9 @@ public abstract class ServiceStateTracker extends Handler { pw.flush(); } public boolean isImsRegistered() { return mImsRegistered; } /** * Verifies the current thread is the same as the thread originally * used in the initialization of this instance. Throws RuntimeException Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +8 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ public class ImsPhone extends ImsPhoneBase { private final RegistrantList mSilentRedialRegistrants = new RegistrantList(); private boolean mImsRegistered = false; // A runnable which is used to automatically exit from Ecm after a period of time. private Runnable mExitEcmRunnable = new Runnable() { @Override Loading Loading @@ -1244,4 +1245,11 @@ public class ImsPhone extends ImsPhoneBase { public Phone getDefaultPhone() { return mDefaultPhone; } public boolean isImsRegistered() { return mImsRegistered; } public void setImsRegistered(boolean value) { mImsRegistered = value; } }