Methods Summary |
---|
public void | addListener(android.net.EthernetManager$Listener listener)Adds a listener.
if (listener == null) {
throw new IllegalArgumentException("listener must not be null");
}
mListeners.add(listener);
if (mListeners.size() == 1) {
try {
mService.addListener(mServiceListener);
} catch (NullPointerException | RemoteException e) {
}
}
|
public android.net.IpConfiguration | getConfiguration()Get Ethernet configuration.
try {
return mService.getConfiguration();
} catch (NullPointerException | RemoteException e) {
return new IpConfiguration();
}
|
public boolean | isAvailable()Indicates whether the system currently has one or more
Ethernet interfaces.
try {
return mService.isAvailable();
} catch (NullPointerException | RemoteException e) {
return false;
}
|
public void | removeListener(android.net.EthernetManager$Listener listener)Removes a listener.
if (listener == null) {
throw new IllegalArgumentException("listener must not be null");
}
mListeners.remove(listener);
if (mListeners.isEmpty()) {
try {
mService.removeListener(mServiceListener);
} catch (NullPointerException | RemoteException e) {
}
}
|
public void | setConfiguration(android.net.IpConfiguration config)Set Ethernet configuration.
try {
mService.setConfiguration(config);
} catch (NullPointerException | RemoteException e) {
}
|