Merge "CDMALTE: Start reading SIM record on SIM_READY"
diff --git a/telephony/java/com/android/internal/telephony/IccCard.java b/telephony/java/com/android/internal/telephony/IccCard.java
index bce9991..955849d 100644
--- a/telephony/java/com/android/internal/telephony/IccCard.java
+++ b/telephony/java/com/android/internal/telephony/IccCard.java
@@ -470,19 +470,6 @@
         } else if (isIccCardAdded) {
             mHandler.sendMessage(mHandler.obtainMessage(EVENT_CARD_ADDED, null));
         }
-
-
-
-        /*
-         * TODO: We need to try to remove this, maybe if the RIL sends up a RIL_UNSOL_SIM_REFRESH?
-         */
-        if (oldState != State.READY && newState == State.READY &&
-                mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
-            if (mPhone.mIccRecords instanceof SIMRecords) {
-                ((SIMRecords)mPhone.mIccRecords).onSimReady();
-            }
-        }
-
     }
 
     private void onIccSwap(boolean isAdded) {
@@ -720,17 +707,14 @@
             currentRadioState == RadioState.SIM_NOT_READY     ||
             currentRadioState == RadioState.RUIM_NOT_READY    ||
             currentRadioState == RadioState.NV_NOT_READY      ||
-            (currentRadioState == RadioState.NV_READY &&
-                    (mPhone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE))) {
+            currentRadioState == RadioState.NV_READY) {
             return IccCard.State.NOT_READY;
         }
 
         if( currentRadioState == RadioState.SIM_LOCKED_OR_ABSENT  ||
             currentRadioState == RadioState.SIM_READY             ||
             currentRadioState == RadioState.RUIM_LOCKED_OR_ABSENT ||
-            currentRadioState == RadioState.RUIM_READY ||
-            (currentRadioState == RadioState.NV_READY &&
-                    (mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE))) {
+            currentRadioState == RadioState.RUIM_READY) {
 
             State csimState =
                 getAppState(mIccCardStatus.getCdmaSubscriptionAppIndex());
diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
index 28034cc..d84715e 100755
--- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
@@ -181,11 +181,7 @@
         // recordsToLoad is set to 0 because no requests are made yet
         recordsToLoad = 0;
 
-        // SIMRecord is used by CDMA+LTE mode, and SIM_READY event
-        // will be subscribed by CdmaLteServiceStateTracker.
-        if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
-            p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
-        }
+        p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
         p.mCM.registerForOffOrNotAvailable(
                         this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null);
         p.mCM.setOnSmsOnSim(this, EVENT_SMS_ON_SIM, null);
@@ -199,9 +195,7 @@
     @Override
     public void dispose() {
         //Unregister for all events
-        if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
-            phone.mCM.unregisterForSIMReady(this);
-        }
+        phone.mCM.unregisterForSIMReady(this);
         phone.mCM.unregisterForOffOrNotAvailable( this);
         phone.mCM.unregisterForIccRefresh(this);
     }
diff --git a/telephony/java/com/android/internal/telephony/gsm/SimCard.java b/telephony/java/com/android/internal/telephony/gsm/SimCard.java
index 643f709..1fa278a 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SimCard.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SimCard.java
@@ -49,7 +49,6 @@
         updateStateProperty();
 
         if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
-            mPhone.mCM.registerForNVReady(mHandler, EVENT_ICC_READY, null);
             mPhone.mCM.registerForIccStatusChanged(mHandler, EVENT_ICC_LOCKED_OR_ABSENT, null);
         }
     }
@@ -63,7 +62,6 @@
         mPhone.mCM.unregisterForSIMReady(mHandler);
 
         if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
-            mPhone.mCM.unregisterForNVReady(mHandler);
             mPhone.mCM.unregisterForIccStatusChanged(mHandler);
         }
     }