Merge "settings: allow enabling ethernet tethering independent of link state"
This commit is contained in:
@@ -50,7 +50,7 @@ public final class EthernetTetherPreferenceController extends TetherBasePreferen
|
|||||||
@OnLifecycleEvent(Lifecycle.Event.ON_START)
|
@OnLifecycleEvent(Lifecycle.Event.ON_START)
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
mEthernetListener = (iface, state, role, configuration) -> {
|
mEthernetListener = (iface, state, role, configuration) -> {
|
||||||
if (state == EthernetManager.STATE_LINK_UP) {
|
if (state != EthernetManager.STATE_ABSENT) {
|
||||||
mAvailableInterfaces.add(iface);
|
mAvailableInterfaces.add(iface);
|
||||||
} else {
|
} else {
|
||||||
mAvailableInterfaces.remove(iface);
|
mAvailableInterfaces.remove(iface);
|
||||||
|
Reference in New Issue
Block a user