예제 #1
0
 void setUiTTYMode(int uiTtyMode, Message onComplete) {
   try {
     mImsManager.setUiTTYMode(mPhone.getContext(), mServiceId, uiTtyMode, onComplete);
   } catch (ImsException e) {
     loge("setTTYMode : " + e);
     mPhone.sendErrorResponse(onComplete, e);
   }
 }
예제 #2
0
  /* package */
  void sendUSSD(String ussdString, Message response) {
    if (DBG) log("sendUSSD");

    try {
      if (mUssdSession != null) {
        mUssdSession.sendUssd(ussdString);
        AsyncResult.forMessage(response, null, null);
        response.sendToTarget();
        return;
      }

      String[] callees = new String[] {ussdString};
      ImsCallProfile profile =
          mImsManager.createCallProfile(
              mServiceId, ImsCallProfile.SERVICE_TYPE_NORMAL, ImsCallProfile.CALL_TYPE_VOICE);
      profile.setCallExtraInt(ImsCallProfile.EXTRA_DIALSTRING, ImsCallProfile.DIALSTRING_USSD);

      mUssdSession = mImsManager.makeCall(mServiceId, profile, callees, mImsUssdListener);
    } catch (ImsException e) {
      loge("sendUSSD : " + e);
      mPhone.sendErrorResponse(response, e);
    }
  }