/** Set Ethernet configuration. */
 public void setConfiguration(IpConfiguration config) {
   try {
     mService.setConfiguration(config);
   } catch (RemoteException e) {
     throw e.rethrowFromSystemServer();
   }
 }
 /**
  * Get Ethernet configuration.
  *
  * @return the Ethernet Configuration, contained in {@link IpConfiguration}.
  */
 public IpConfiguration getConfiguration() {
   try {
     return mService.getConfiguration();
   } catch (RemoteException e) {
     throw e.rethrowFromSystemServer();
   }
 }
 /** Indicates whether the system currently has one or more Ethernet interfaces. */
 public boolean isAvailable() {
   try {
     return mService.isAvailable();
   } catch (RemoteException e) {
     throw e.rethrowFromSystemServer();
   }
 }
 /**
  * Removes a listener.
  *
  * @param listener A {@link Listener} to remove.
  * @throws IllegalArgumentException If the listener is null.
  */
 public void removeListener(Listener listener) {
   if (listener == null) {
     throw new IllegalArgumentException("listener must not be null");
   }
   mListeners.remove(listener);
   if (mListeners.isEmpty()) {
     try {
       mService.removeListener(mServiceListener);
     } catch (RemoteException e) {
       throw e.rethrowFromSystemServer();
     }
   }
 }
 /**
  * Adds a listener.
  *
  * @param listener A {@link Listener} to add.
  * @throws IllegalArgumentException If the listener is null.
  */
 public void addListener(Listener listener) {
   if (listener == null) {
     throw new IllegalArgumentException("listener must not be null");
   }
   mListeners.add(listener);
   if (mListeners.size() == 1) {
     try {
       mService.addListener(mServiceListener);
     } catch (RemoteException e) {
       throw e.rethrowFromSystemServer();
     }
   }
 }