Ejemplo n.º 1
0
  static GsmMmiCode newFromUssdUserInput(
      String ussdMessge, GSMPhone phone, UiccCardApplication app) {
    GsmMmiCode ret = new GsmMmiCode(phone, app);

    ret.message = ussdMessge;
    ret.state = State.PENDING;
    ret.isPendingUSSD = true;

    return ret;
  }
Ejemplo n.º 2
0
  static GsmMmiCode newNetworkInitiatedUssd(
      String ussdMessage, boolean isUssdRequest, GSMPhone phone, UiccCardApplication app) {
    GsmMmiCode ret;

    ret = new GsmMmiCode(phone, app);

    ret.message = ussdMessage;
    ret.isUssdRequest = isUssdRequest;

    // If it's a request, set to PENDING so that it's cancelable.
    if (isUssdRequest) {
      ret.isPendingUSSD = true;
      ret.state = State.PENDING;
    } else {
      ret.state = State.COMPLETE;
    }

    return ret;
  }