public boolean isAvailable() {
    // #ifdef DEBUG
    debug.trace("isAvailable"); // $NON-NLS-1$
    // #endif
    boolean gprs = (RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA) > 0;
    boolean coverage = CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_DIRECT);

    // #ifdef DEBUG
    debug.trace("isAvailable direct: " + gprs + " & " + coverage); // $NON-NLS-1$ //$NON-NLS-2$
    // #endif

    return coverage & gprs;
  }
 public int getRoamingState() {
   if ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING) != 0) {
     return ROAMING_STATE_ROAMING;
   }
   return ROAMING_STATE_HOME;
 }