Postpone otasp_not_neeeded until SIM_LOADED.
Junda Liu [Wed, 24 Sep 2014 17:53:52 +0000 (10:53 -0700)]
Because platform begins w/ GSM phone even for CDMA devices, sending otasp_not_needed confuses SuW.

Bug: b/17572929
Change-Id: Ie19f5eac81a85cb4191bb7e5cf0294f4fb5cf0c1

src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java

index 9c7c600..828e0b0 100644 (file)
@@ -250,9 +250,6 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
         Context context = phone.getContext();
         filter.addAction(ACTION_RADIO_OFF);
         context.registerReceiver(mIntentReceiver, filter);
-
-        // Gsm doesn't support OTASP so its not needed
-        phone.notifyOtaspChanged(OTASP_NOT_NEEDED);
     }
 
     @Override
@@ -411,6 +408,8 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
 
             case EVENT_SIM_RECORDS_LOADED:
                 log("EVENT_SIM_RECORDS_LOADED: what=" + msg.what);
+                // Gsm doesn't support OTASP so its not needed
+                mPhone.notifyOtaspChanged(OTASP_NOT_NEEDED);
 
                 updatePhoneObject();
                 updateSpnDisplay();