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

Commit c744c448 authored by PauloftheWest's avatar PauloftheWest Committed by Android Git Automerger
Browse files

am 59d33dbd: Merge "Fixed a Setting Bluetooth Airplane mode bug." into lmp-dev

* commit '59d33dbd':
  Fixed a Setting Bluetooth Airplane mode bug.
parents 91f4e5a8 59d33dbd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -90,12 +90,10 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
    }

    public void setupSwitchBar() {
        mSwitchBar.addOnSwitchChangeListener(this);
        mSwitchBar.show();
    }

    public void teardownSwitchBar() {
        mSwitchBar.removeOnSwitchChangeListener(this);
        mSwitchBar.hide();
    }

@@ -112,6 +110,7 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
        // Bluetooth state is not sticky, so set it manually
        handleStateChanged(mLocalAdapter.getBluetoothState());

        mSwitchBar.addOnSwitchChangeListener(this);
        mContext.registerReceiver(mReceiver, mIntentFilter);
        mValidListener = true;
    }
@@ -121,6 +120,7 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
            return;
        }

        mSwitchBar.removeOnSwitchChangeListener(this);
        mContext.unregisterReceiver(mReceiver);
        mValidListener = false;
    }