Exemplo n.º 1
0
 /**
  * Some operators have been known to report registration failure data only devices, to fix that
  * use DataRegState.
  */
 protected void useDataRegStateForDataOnlyDevices() {
   if (mVoiceCapable == false) {
     if (DBG) {
       log(
           "useDataRegStateForDataOnlyDevice: VoiceRegState="
               + mNewSS.getVoiceRegState()
               + " DataRegState="
               + mNewSS.getDataRegState());
     }
     // TODO: Consider not lying and instead have callers know the difference.
     mNewSS.setVoiceRegState(mNewSS.getDataRegState());
   }
 }
Exemplo n.º 2
0
  /**
   * Whether Show 4g for LTE SIM.
   *
   * @param serviceState All sim card servicestate.
   * @return true show 4g for LTE SIM card.
   */
  public boolean isShow4GForLTE(ServiceState[] serviceState) {
    boolean show4GForLTE = false;
    if (is4GDataEnabled() && is4GUiccCard()) {
      if (mServiceState != null && serviceState != null) {
        boolean nLtePsConnect = false;
        for (int i = 0; i < serviceState.length; i++) {
          if (i != getSvlteSlot()
              && serviceState[i] != null
              && serviceState[i].getDataRegState() == ServiceState.STATE_IN_SERVICE) {
            Log.d(TAG, "isShow4GForLTE: serviceState[" + i + "] = " + serviceState[i]);
            nLtePsConnect = true;
            break;
          }
        }

        if (mServiceState.getVoiceRegState() == ServiceState.STATE_IN_SERVICE
            && mServiceState.getDataRegState() != ServiceState.STATE_IN_SERVICE
            && nLtePsConnect) {
          show4GForLTE = true;
        } else {
          show4GForLTE = false;
        }
      }
    }

    Log.d(
        TAG,
        "isShow4GForLTE: mServiceState = " + mServiceState + ", show4GForLTE = " + show4GForLTE);
    return show4GForLTE;
  }
Exemplo n.º 3
0
 /**
  * Notify all mDataConnectionRatChangeRegistrants using an AsyncResult in msg.obj where
  * AsyncResult#result contains the new RAT as an Integer Object.
  */
 protected void notifyDataRegStateRilRadioTechnologyChanged() {
   int rat = mSS.getRilDataRadioTechnology();
   int drs = mSS.getDataRegState();
   if (DBG) log("notifyDataRegStateRilRadioTechnologyChanged: drs=" + drs + " rat=" + rat);
   mPhoneBase.setSystemProperty(
       TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE,
       ServiceState.rilRadioTechnologyToString(rat));
   mDataRegStateOrRatChangedRegistrants.notifyResult(new Pair<Integer, Integer>(drs, rat));
 }
Exemplo n.º 4
0
 /**
  * Whether the Lte data connected.
  *
  * @param serviceState The Service State include the LTE register state
  * @return true data connected.
  */
 public boolean isLteDataConnected(ServiceState serviceState) {
   boolean bLteDataConnected = false;
   if (serviceState != null) {
     bLteDataConnected =
         (serviceState.getDataRegState() == ServiceState.STATE_IN_SERVICE)
             && (mDataState == TelephonyManager.DATA_CONNECTED);
   }
   Log.d(
       TAG,
       "isLteDataConnected, bLteDataConnected="
           + bLteDataConnected
           + " serviceState="
           + serviceState);
   return bLteDataConnected;
 }