Ejemplo n.º 1
0
bool CZeroconf::ForceReAnnounceService(const std::string& fcr_identifier)
{
  if (HasService(fcr_identifier) && m_started)
  {
    return doForceReAnnounceService(fcr_identifier);
  }
  return false;
}
Ejemplo n.º 2
0
 void DataConnectionStats::NotePhoneDataConnectionState()
 {
    if (mServiceState == NULL) {
        return;
    }
    Boolean simReadyOrUnknown = mSimState == IccCardConstantsState_READY
        || mSimState == IccCardConstantsState_UNKNOWN;
    Boolean visible = (simReadyOrUnknown || IsCdma()) // we only check the sim state for GSM
        && HasService()
        && mDataState == ITelephonyManager::DATA_CONNECTED;
    Int32 networkType;
    mServiceState->GetDataNetworkType(&networkType);
    if (DEBUG) {
        Logger::D(TAG,"Noting data connection for network type %d: %svisible",
            networkType, visible ? "" : "not ");
    }
    // try {
    ECode ec = mBatteryStats->NotePhoneDataConnectionState(networkType, visible);
    // } catch (RemoteException e) {
    if (ec == (ECode)E_REMOTE_EXCEPTION) {
        Logger::W(TAG, "Error noting data connection state");
    }
    // }
}