コード例 #1
0
 /**
  * Disables or enables the routing table
  *
  * @return true if the routing table is enabled
  * @param isEnabled true - to enable, false - to disable the routing table
  * @throws RoutingTableException if the operation can't be accomplished
  */
 public void enableTable(boolean isEnabled) throws RoutingTableException {
   try {
     int status = rtInterface.enable(isEnabled);
     if (status != 0) {
       throw new RoutingTableException(status);
     }
   } catch (RemoteException ex) {
     Log.e(TAG, "isEnabled() fails: " + ex);
     throw new RoutingTableException(OpenNfcException.SERVICE_COMMUNICATION_FAILED);
   }
 }