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

Commit 508c7c16 authored by Jianzheng Zhou's avatar Jianzheng Zhou
Browse files

Fix one NPE in tethering setting



Once we not declare BT feature, go Setting->more->tethering
will trigger this NPE.

Change-Id: I4736e7bade261475acda74e26250a81452018ffa
Signed-off-by: default avatarJianzheng Zhou <jianzheng.zhou@freescale.com>
parent ba32c249
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -385,6 +385,8 @@ public class TetherSettings extends SettingsPreferenceFragment
        }
        }


        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
        if (adapter == null)
            return;
        int btState = adapter.getState();
        int btState = adapter.getState();
        if (btState == BluetoothAdapter.STATE_TURNING_OFF) {
        if (btState == BluetoothAdapter.STATE_TURNING_OFF) {
            mBluetoothTether.setEnabled(false);
            mBluetoothTether.setEnabled(false);