Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f906229 authored by Patrick Rohr's avatar Patrick Rohr
Browse files

settings: allow enabling ethernet tethering independent of link state

A user should be able to enable tethering even if the interface does not
have link yet. Therefore, the toggle should be active if any interface
is available, independent of its link state.

Test: TH
Bug: 234036868
Change-Id: I2ae25207a766d71217dd6d17f3f9b74ceb261238
parent 5bb798f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);