Loading telephony/java/com/android/internal/telephony/Phone.java +21 −0 Original line number Diff line number Diff line Loading @@ -541,6 +541,20 @@ public interface Phone { */ void unregisterForCdmaOtaStatusChange(Handler h); /** * Registration point for subscription info ready * @param h handler to notify * @param what what code of message when delivered * @param obj placed in Message.obj */ public void registerForSubscriptionInfoReady(Handler h, int what, Object obj); /** * Unregister for notifications for subscription info * @param h Handler to be removed from the registrant list. */ public void unregisterForSubscriptionInfoReady(Handler h); /** * Returns SIM record load state. Use * <code>getSimCard().registerForReady()</code> for change notification. Loading Loading @@ -1365,6 +1379,13 @@ public interface Phone { */ String getCdmaMin(); /** * Check if subscription data has been assigned to mMin * * return true if MIN info is ready; false otherwise. */ boolean isMinInfoReady(); /** * Retrieves PRL Version for CDMA phones */ Loading telephony/java/com/android/internal/telephony/PhoneBase.java +16 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,12 @@ public abstract class PhoneBase implements Phone { return null; } public boolean isMinInfoReady() { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); return false; } public String getCdmaPrlVersion(){ // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); Loading @@ -724,6 +730,16 @@ public abstract class PhoneBase implements Phone { Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public void unregisterForSubscriptionInfoReady(Handler h) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public boolean isOtaSpNumber(String dialStr) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); Loading telephony/java/com/android/internal/telephony/PhoneProxy.java +12 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,14 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.unregisterForCdmaOtaStatusChange(h); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { mActivePhone.registerForSubscriptionInfoReady(h, what, obj); } public void unregisterForSubscriptionInfoReady(Handler h) { mActivePhone.unregisterForSubscriptionInfoReady(h); } public boolean getIccRecordsLoaded() { return mActivePhone.getIccRecordsLoaded(); } Loading Loading @@ -419,6 +427,10 @@ public class PhoneProxy extends Handler implements Phone { return mActivePhone.getCdmaMin(); } public boolean isMinInfoReady() { return mActivePhone.isMinInfoReady(); } public String getCdmaPrlVersion() { return mActivePhone.getCdmaPrlVersion(); } Loading telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +12 −0 Original line number Diff line number Diff line Loading @@ -441,6 +441,10 @@ public class CDMAPhone extends PhoneBase { return mSST.getCdmaMin(); } public boolean isMinInfoReady() { return mSST.isMinInfoReady(); } public void getCallWaiting(Message onComplete) { mCM.queryCallWaiting(CommandsInterface.SERVICE_CLASS_VOICE, onComplete); } Loading Loading @@ -556,6 +560,14 @@ public class CDMAPhone extends PhoneBase { mCM.unregisterForCdmaOtaProvision(h); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { mSST.registerForSubscriptionInfoReady(h, what, obj); } public void unregisterForSubscriptionInfoReady(Handler h) { mSST.unregisterForSubscriptionInfoReady(h); } public void setOnEcbModeExitResponse(Handler h, int what, Object obj) { mECMExitRespRegistrant = new Registrant (h, what, obj); } Loading telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +37 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { private int mRegistrationState = -1; private RegistrantList cdmaDataConnectionAttachedRegistrants = new RegistrantList(); private RegistrantList cdmaDataConnectionDetachedRegistrants = new RegistrantList(); private RegistrantList cdmaForSubscriptionInfoReadyRegistrants = new RegistrantList(); // Sometimes we get the NITZ time before we know what country we are in. // Keep the time zone information from the NITZ string so we can fix Loading Loading @@ -125,6 +126,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { private int mHomeNetworkId[] = null; private String mMin; private String mPrlVersion; private boolean mIsMinInfoReady = false; private boolean isEriTextLoaded = false; private boolean isSubscriptionFromRuim = false; Loading Loading @@ -264,6 +266,25 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { cdmaDataConnectionDetachedRegistrants.remove(h); } /** * Registration point for subscription info ready * @param h handler to notify * @param what what code of message when delivered * @param obj placed in Message.obj */ public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { Registrant r = new Registrant(h, what, obj); cdmaForSubscriptionInfoReadyRegistrants.add(r); if (isMinInfoReady()) { r.notifyRegistrant(); } } public void unregisterForSubscriptionInfoReady(Handler h) { cdmaForSubscriptionInfoReadyRegistrants.remove(h); } //***** Called from CDMAPhone public void getLacAndCid(Message onComplete) { Loading Loading @@ -426,6 +447,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { mMin = cdmaSubscription[3]; mPrlVersion = cdmaSubscription[4]; Log.d(LOG_TAG,"GET_CDMA_SUBSCRIPTION MDN=" + mMdn); //Notify apps subscription info is ready if (cdmaForSubscriptionInfoReadyRegistrants != null) { cdmaForSubscriptionInfoReadyRegistrants.notifyRegistrants(); } if (!mIsMinInfoReady) { mIsMinInfoReady = true; } } else { Log.w(LOG_TAG,"error parsing cdmaSubscription params num=" + cdmaSubscription.length); Loading Loading @@ -1545,4 +1573,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { return null; } } /** * Check if subscription data has been assigned to mMin * * return true if MIN info is ready; false otherwise. */ public boolean isMinInfoReady() { return mIsMinInfoReady; } } Loading
telephony/java/com/android/internal/telephony/Phone.java +21 −0 Original line number Diff line number Diff line Loading @@ -541,6 +541,20 @@ public interface Phone { */ void unregisterForCdmaOtaStatusChange(Handler h); /** * Registration point for subscription info ready * @param h handler to notify * @param what what code of message when delivered * @param obj placed in Message.obj */ public void registerForSubscriptionInfoReady(Handler h, int what, Object obj); /** * Unregister for notifications for subscription info * @param h Handler to be removed from the registrant list. */ public void unregisterForSubscriptionInfoReady(Handler h); /** * Returns SIM record load state. Use * <code>getSimCard().registerForReady()</code> for change notification. Loading Loading @@ -1365,6 +1379,13 @@ public interface Phone { */ String getCdmaMin(); /** * Check if subscription data has been assigned to mMin * * return true if MIN info is ready; false otherwise. */ boolean isMinInfoReady(); /** * Retrieves PRL Version for CDMA phones */ Loading
telephony/java/com/android/internal/telephony/PhoneBase.java +16 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,12 @@ public abstract class PhoneBase implements Phone { return null; } public boolean isMinInfoReady() { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); return false; } public String getCdmaPrlVersion(){ // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); Loading @@ -724,6 +730,16 @@ public abstract class PhoneBase implements Phone { Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public void unregisterForSubscriptionInfoReady(Handler h) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); } public boolean isOtaSpNumber(String dialStr) { // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone. Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone."); Loading
telephony/java/com/android/internal/telephony/PhoneProxy.java +12 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,14 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.unregisterForCdmaOtaStatusChange(h); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { mActivePhone.registerForSubscriptionInfoReady(h, what, obj); } public void unregisterForSubscriptionInfoReady(Handler h) { mActivePhone.unregisterForSubscriptionInfoReady(h); } public boolean getIccRecordsLoaded() { return mActivePhone.getIccRecordsLoaded(); } Loading Loading @@ -419,6 +427,10 @@ public class PhoneProxy extends Handler implements Phone { return mActivePhone.getCdmaMin(); } public boolean isMinInfoReady() { return mActivePhone.isMinInfoReady(); } public String getCdmaPrlVersion() { return mActivePhone.getCdmaPrlVersion(); } Loading
telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +12 −0 Original line number Diff line number Diff line Loading @@ -441,6 +441,10 @@ public class CDMAPhone extends PhoneBase { return mSST.getCdmaMin(); } public boolean isMinInfoReady() { return mSST.isMinInfoReady(); } public void getCallWaiting(Message onComplete) { mCM.queryCallWaiting(CommandsInterface.SERVICE_CLASS_VOICE, onComplete); } Loading Loading @@ -556,6 +560,14 @@ public class CDMAPhone extends PhoneBase { mCM.unregisterForCdmaOtaProvision(h); } public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { mSST.registerForSubscriptionInfoReady(h, what, obj); } public void unregisterForSubscriptionInfoReady(Handler h) { mSST.unregisterForSubscriptionInfoReady(h); } public void setOnEcbModeExitResponse(Handler h, int what, Object obj) { mECMExitRespRegistrant = new Registrant (h, what, obj); } Loading
telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +37 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { private int mRegistrationState = -1; private RegistrantList cdmaDataConnectionAttachedRegistrants = new RegistrantList(); private RegistrantList cdmaDataConnectionDetachedRegistrants = new RegistrantList(); private RegistrantList cdmaForSubscriptionInfoReadyRegistrants = new RegistrantList(); // Sometimes we get the NITZ time before we know what country we are in. // Keep the time zone information from the NITZ string so we can fix Loading Loading @@ -125,6 +126,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { private int mHomeNetworkId[] = null; private String mMin; private String mPrlVersion; private boolean mIsMinInfoReady = false; private boolean isEriTextLoaded = false; private boolean isSubscriptionFromRuim = false; Loading Loading @@ -264,6 +266,25 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { cdmaDataConnectionDetachedRegistrants.remove(h); } /** * Registration point for subscription info ready * @param h handler to notify * @param what what code of message when delivered * @param obj placed in Message.obj */ public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { Registrant r = new Registrant(h, what, obj); cdmaForSubscriptionInfoReadyRegistrants.add(r); if (isMinInfoReady()) { r.notifyRegistrant(); } } public void unregisterForSubscriptionInfoReady(Handler h) { cdmaForSubscriptionInfoReadyRegistrants.remove(h); } //***** Called from CDMAPhone public void getLacAndCid(Message onComplete) { Loading Loading @@ -426,6 +447,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { mMin = cdmaSubscription[3]; mPrlVersion = cdmaSubscription[4]; Log.d(LOG_TAG,"GET_CDMA_SUBSCRIPTION MDN=" + mMdn); //Notify apps subscription info is ready if (cdmaForSubscriptionInfoReadyRegistrants != null) { cdmaForSubscriptionInfoReadyRegistrants.notifyRegistrants(); } if (!mIsMinInfoReady) { mIsMinInfoReady = true; } } else { Log.w(LOG_TAG,"error parsing cdmaSubscription params num=" + cdmaSubscription.length); Loading Loading @@ -1545,4 +1573,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { return null; } } /** * Check if subscription data has been assigned to mMin * * return true if MIN info is ready; false otherwise. */ public boolean isMinInfoReady() { return mIsMinInfoReady; } }