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

Commit 564f16a8 authored by Jesse Hall's avatar Jesse Hall
Browse files

Fix statusbar crash on devices with no Bluetooth

Change-Id: Ib2290f9cde54d0d52c2692b11b0232848bbbc8b0
parent f57c1388
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ public class BluetoothController extends BroadcastReceiver {

    private int mIconId = R.drawable.stat_sys_data_bluetooth;
    private int mContentDescriptionId = 0;
    private boolean mEnabled;
    private boolean mEnabled = false;

    public BluetoothController(Context context) {
        mContext = context;
@@ -47,8 +47,10 @@ public class BluetoothController extends BroadcastReceiver {
        context.registerReceiver(this, filter);

        final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
        if (adapter != null) {
            handleAdapterStateChange(adapter.getState());
            handleConnectionStateChange(adapter.getConnectionState());
        }
        refreshViews();
    }