예제 #1
0
  public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException {
    // Need to make sure dialString gets parsed properly
    String newDialString = PhoneNumberUtils.stripSeparators(dialString);

    // handle in-call MMI first if applicable
    if (handleInCallMmiCommands(newDialString)) {
      return null;
    }

    // Only look at the Network portion for mmi
    String networkPortion = PhoneNumberUtils.extractNetworkPortionAlt(newDialString);
    GsmMmiCode mmi = GsmMmiCode.newFromDialString(networkPortion, this);
    if (LOCAL_DEBUG) Log.d(LOG_TAG, "dialing w/ mmi '" + mmi + "'...");

    if (mmi == null) {
      return mCT.dial(newDialString, uusInfo);
    } else if (mmi.isTemporaryModeCLIR()) {
      return mCT.dial(mmi.dialingNumber, mmi.getCLIRMode(), uusInfo);
    } else {
      mPendingMMIs.add(mmi);
      mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
      mmi.processCode();

      // FIXME should this return null or something else?
      return null;
    }
  }
예제 #2
0
  public boolean handlePinMmi(String dialString) {
    GsmMmiCode mmi = GsmMmiCode.newFromDialString(dialString, this);

    if (mmi != null && mmi.isPinCommand()) {
      mPendingMMIs.add(mmi);
      mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
      mmi.processCode();
      return true;
    }

    return false;
  }