2525
2626import com .android .internal .telephony .IccUtils ;
2727import com .android .internal .telephony .CommandsInterface ;
28- import com .android .internal .telephony .gsm . SimCard ;
29- import com .android .internal .telephony .gsm . SIMFileHandler ;
30- import com .android .internal .telephony .gsm . SIMRecords ;
28+ import com .android .internal .telephony .IccCard ;
29+ import com .android .internal .telephony .IccFileHandler ;
30+ import com .android .internal .telephony .IccRecords ;
3131
3232import android .util .Config ;
3333
@@ -114,7 +114,7 @@ class RilMessage {
114114public class StkService extends Handler implements AppInterface {
115115
116116 // Class members
117- private static SIMRecords mSimRecords ;
117+ private static IccRecords mIccRecords ;
118118
119119 // Service members.
120120 private static StkService sInstance ;
@@ -136,7 +136,7 @@ public class StkService extends Handler implements AppInterface {
136136 static final int MSG_ID_RIL_MSG_DECODED = 10 ;
137137
138138 // Events to signal SIM presence or absent in the device.
139- private static final int MSG_ID_SIM_LOADED = 20 ;
139+ private static final int MSG_ID_ICC_RECORDS_LOADED = 20 ;
140140
141141 private static final int DEV_ID_KEYPAD = 0x01 ;
142142 private static final int DEV_ID_DISPLAY = 0x02 ;
@@ -146,10 +146,10 @@ public class StkService extends Handler implements AppInterface {
146146 private static final int DEV_ID_NETWORK = 0x83 ;
147147
148148 /* Intentionally private for singleton */
149- private StkService (CommandsInterface ci , SIMRecords sr , Context context ,
150- SIMFileHandler fh , SimCard sc ) {
151- if (ci == null || sr == null || context == null || fh == null
152- || sc == null ) {
149+ private StkService (CommandsInterface ci , IccRecords ir , Context context ,
150+ IccFileHandler fh , IccCard ic ) {
151+ if (ci == null || ir == null || context == null || fh == null
152+ || ic == null ) {
153153 throw new NullPointerException (
154154 "Service: Input parameters must not be null" );
155155 }
@@ -166,17 +166,17 @@ private StkService(CommandsInterface ci, SIMRecords sr, Context context,
166166 mCmdIf .setOnStkCallSetUp (this , MSG_ID_CALL_SETUP , null );
167167 //mCmdIf.setOnSimRefresh(this, MSG_ID_REFRESH, null);
168168
169- mSimRecords = sr ;
169+ mIccRecords = ir ;
170170
171171 // Register for SIM ready event.
172- mSimRecords .registerForRecordsLoaded (this , MSG_ID_SIM_LOADED , null );
172+ mIccRecords .registerForRecordsLoaded (this , MSG_ID_ICC_RECORDS_LOADED , null );
173173
174174 mCmdIf .reportStkServiceIsRunning (null );
175175 StkLog .d (this , "StkService: is running" );
176176 }
177177
178178 public void dispose () {
179- mSimRecords .unregisterForRecordsLoaded (this );
179+ mIccRecords .unregisterForRecordsLoaded (this );
180180 mCmdIf .unSetOnStkSessionEnd (this );
181181 mCmdIf .unSetOnStkProactiveCmd (this );
182182 mCmdIf .unSetOnStkEvent (this );
@@ -446,32 +446,32 @@ private void eventDownload(int event, int sourceId, int destinationId,
446446 }
447447
448448 /**
449- * Used for instantiating/updating the Service from the GsmPhone constructor.
449+ * Used for instantiating/updating the Service from the GsmPhone or CdmaPhone constructor.
450450 *
451451 * @param ci CommandsInterface object
452- * @param sr SIMRecords object
452+ * @param ir IccRecords object
453453 * @param context phone app context
454- * @param fh SIM file handler
455- * @param sc GSM SIM card
454+ * @param fh Icc file handler
455+ * @param ic Icc card
456456 * @return The only Service object in the system
457457 */
458- public static StkService getInstance (CommandsInterface ci , SIMRecords sr ,
459- Context context , SIMFileHandler fh , SimCard sc ) {
458+ public static StkService getInstance (CommandsInterface ci , IccRecords ir ,
459+ Context context , IccFileHandler fh , IccCard ic ) {
460460 if (sInstance == null ) {
461- if (ci == null || sr == null || context == null || fh == null
462- || sc == null ) {
461+ if (ci == null || ir == null || context == null || fh == null
462+ || ic == null ) {
463463 return null ;
464464 }
465465 HandlerThread thread = new HandlerThread ("Stk Telephony service" );
466466 thread .start ();
467- sInstance = new StkService (ci , sr , context , fh , sc );
467+ sInstance = new StkService (ci , ir , context , fh , ic );
468468 StkLog .d (sInstance , "NEW sInstance" );
469- } else if ((sr != null ) && (mSimRecords != sr )) {
469+ } else if ((ir != null ) && (mIccRecords != ir )) {
470470 StkLog .d (sInstance , "Reinitialize the Service with SIMRecords" );
471- mSimRecords = sr ;
471+ mIccRecords = ir ;
472472
473473 // re-Register for SIM ready event.
474- mSimRecords .registerForRecordsLoaded (sInstance , MSG_ID_SIM_LOADED , null );
474+ mIccRecords .registerForRecordsLoaded (sInstance , MSG_ID_ICC_RECORDS_LOADED , null );
475475 StkLog .d (sInstance , "sr changed reinitialize and return current sInstance" );
476476 } else {
477477 StkLog .d (sInstance , "Return current sInstance" );
@@ -513,7 +513,7 @@ public void handleMessage(Message msg) {
513513 case MSG_ID_CALL_SETUP :
514514 mMsgDecoder .sendStartDecodingMessageParams (new RilMessage (msg .what , null ));
515515 break ;
516- case MSG_ID_SIM_LOADED :
516+ case MSG_ID_ICC_RECORDS_LOADED :
517517 break ;
518518 case MSG_ID_RIL_MSG_DECODED :
519519 handleRilMsg ((RilMessage ) msg .obj );
0 commit comments