Exemplo n.º 1
0
  /**
   * Registration point for transition out of packet service restricted zone.
   *
   * @param h handler to notify
   * @param what what code of message when delivered
   * @param obj placed in Message.obj
   */
  public void registerForPsRestrictedDisabled(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mPsRestrictDisabledRegistrants.add(r);

    if (mRestrictedState.isPsRestricted()) {
      r.notifyRegistrant();
    }
  }
Exemplo n.º 2
0
  /**
   * Registration point for transition into network attached.
   *
   * @param h handler to notify
   * @param what what code of message when delivered
   * @param obj in Message.obj
   */
  public void registerForNetworkAttached(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);

    mNetworkAttachedRegistrants.add(r);
    if (ss.getState() == ServiceState.STATE_IN_SERVICE) {
      r.notifyRegistrant();
    }
  }
Exemplo n.º 3
0
  /**
   * Registration point for transition into DataConnection detached.
   *
   * @param h handler to notify
   * @param what what code of message when delivered
   * @param obj placed in Message.obj
   */
  public void registerForDataConnectionDetached(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mDetachedRegistrants.add(r);

    if (getCurrentDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
      r.notifyRegistrant();
    }
  }
Exemplo n.º 4
0
  /**
   * Registration point for combined roaming off combined roaming is true when roaming is true and
   * ONS differs SPN
   *
   * @param h handler to notify
   * @param what what code of message when delivered
   * @param obj placed in Message.obj
   */
  public void registerForRoamingOff(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mRoamingOffRegistrants.add(r);

    if (!ss.getRoaming()) {
      r.notifyRegistrant();
    }
  }
Exemplo n.º 5
0
  /**
   * Registration point for combined roaming on of mobile data combined roaming is true when roaming
   * is true and ONS differs SPN
   *
   * @param h handler to notify
   * @param what what code of message when delivered
   * @param obj placed in Message.obj
   */
  public void registerForDataRoamingOn(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mDataRoamingOnRegistrants.add(r);

    if (mSS.getDataRoaming()) {
      r.notifyRegistrant();
    }
  }
  void processNextPostDialChar() {
    PhoneBase phone = getPhoneFromConnection();
    char c = 0;
    Registrant postDialHandler;

    if (postDialState == PostDialState.CANCELLED) {
      releaseWakeLock();
      // Log.v("CDMA", "##### processNextPostDialChar: postDialState == CANCELLED, bail");
      return;
    }

    if (postDialString == null || postDialString.length() <= nextPostDialChar) {
      setPostDialState(PostDialState.COMPLETE);

      // We were holding a wake lock until pause-dial was complete, so give it up now
      releaseWakeLock();

      // notifyMessage.arg1 is 0 on complete
      c = 0;
    } else {
      boolean isValid;

      setPostDialState(PostDialState.STARTED);

      c = postDialString.charAt(nextPostDialChar++);

      isValid = processPostDialChar(c);

      if (!isValid) {
        // Will call processNextPostDialChar
        h.obtainMessage(EVENT_NEXT_POST_DIAL).sendToTarget();
        // Don't notify application
        Log.e("CDMA", "processNextPostDialChar: c=" + c + " isn't valid!");
        return;
      }
    }

    postDialHandler = phone.mPostDialHandler;

    Message notifyMessage;

    if (postDialHandler != null
        && (notifyMessage = postDialHandler.messageForRegistrant()) != null) {
      // The AsyncResult.result is the Connection object
      PostDialState state = postDialState;
      AsyncResult ar = AsyncResult.forMessage(notifyMessage);
      ar.result = this;
      ar.userObj = state;

      // arg1 is the character that was/is being processed
      notifyMessage.arg1 = c;

      notifyMessage.sendToTarget();
    }
  }