/**
   * Handles 3GPP format-specific events coming from the phone stack. Other events are handled by
   * {@link SMSDispatcher#handleMessage}.
   *
   * @param msg the message to handle
   */
  @Override
  public void handleMessage(Message msg) {
    switch (msg.what) {
      case EVENT_NEW_SMS_STATUS_REPORT:
        handleStatusReport((AsyncResult) msg.obj);
        break;

      case EVENT_NEW_ICC_SMS:
        // pass to InboundSmsHandler to process
        mGsmInboundSmsHandler.sendMessage(InboundSmsHandler.EVENT_NEW_SMS, msg.obj);
        break;

      case EVENT_ICC_CHANGED:
        onUpdateIccAvailability();
        break;

      case EVENT_SMS_ON_ICC:
        if (mIccRecords.get() != null) {
          ((SIMRecords) (mIccRecords.get())).handleSmsOnIcc((AsyncResult) msg.obj);
        }
        break;

      default:
        super.handleMessage(msg);
    }
  }
 @Override
 public void dispose() {
   super.dispose();
   mCi.unSetOnSmsStatus(this);
   mUiccController.unregisterForIccChanged(this);
   mCi.unSetOnSmsOnSim(this);
   if (mIccRecords.get() != null) {
     mIccRecords.get().unregisterForNewSms(this);
   }
 }