private void updateConnectionState(final State state) {
        mCurrentState = state;
        runOnUiThread(() -> view.setConnectionState(state));
    }
For a given BLE device, this Activity provides the user interface to connect, display data,
and display GATT services and characteristics supported by the device.  The Activity
communicates with {@code BluetoothLeService}, which in turn interacts with the
Bluetooth LE API.
sample_app/src/main/java/uk/co/alt236/btlescan/ui/control/DeviceControlActivity.java