示例#1
0
  private void initForNewRadioTechnology() {
    if (DBG) Log.d(LOG_TAG, "initForNewRadioTechnology...");

    ringer.updateRingerContextAfterRadioTechnologyChange(this.phone);
    notifier.updateCallNotifierRegistrationsAfterRadioTechnologyChange();
    if (mBtHandsfree != null) {
      mBtHandsfree.updateBtHandsfreeAfterRadioTechnologyChange();
    }
    if (mInCallScreen != null) {
      mInCallScreen.updateAfterRadioTechnologyChange();
    }

    // Update registration for ICC status after radio technology change
    IccCard sim = phone.getIccCard();
    if (sim != null) {
      if (DBG) Log.d(LOG_TAG, "Update registration for ICC status...");

      // Register all events new to the new active phone
      sim.registerForAbsent(mHandler, EVENT_SIM_ABSENT, null);
      sim.registerForLocked(mHandler, EVENT_SIM_LOCKED, null);
      sim.registerForNetworkLocked(mHandler, EVENT_SIM_NETWORK_LOCKED, null);
    }

    if (phone.getPhoneName().equals("CDMA")) {
      // Create an instance of CdmaPhoneCallState and initialize it to IDLE
      cdmaPhoneCallState = new CdmaPhoneCallState();
      cdmaPhoneCallState.CdmaPhoneCallStateInit();
    }
  }