Improve documentation of addEthernetStateListener
The existing documentation was not clear at all about how this API behaves. Test: TH Change-Id: I408f32c1e7b6c910aaaa197b6774865e79a03579
This commit is contained in:
parent
c2f56d83c9
commit
e762554170
1 changed files with 8 additions and 1 deletions
|
|
@ -642,7 +642,14 @@ public class EthernetManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Listen to changes in the state of ethernet.
|
||||
* Register a IntConsumer to be called back on ethernet state changes.
|
||||
*
|
||||
* <p>{@link IntConsumer#accept} with the current ethernet state will be triggered immediately
|
||||
* upon adding a listener. The same callback is invoked on Ethernet state change, i.e. when
|
||||
* calling {@link #setEthernetEnabled}.
|
||||
* <p>The reported state is represented by:
|
||||
* {@link #ETHERNET_STATE_DISABLED}: ethernet is now disabled.
|
||||
* {@link #ETHERNET_STATE_ENABLED}: ethernet is now enabled.
|
||||
*
|
||||
* @param executor to run callbacks on.
|
||||
* @param listener to listen ethernet state changed.
|
||||
|
|
|
|||
Loading…
Reference in a new issue