~aleteoryx/muditaos

8e6ee1fddad1f4c60ec4924fe10cfc44c942c972 — Maciej Janicki 3 years ago 0452e6f
[MOS-291] Fix bluetooth auto turnoff

Fix bluetooth auto turn off
disconnecting connected device
1 files changed, 2 insertions(+), 2 deletions(-)

M module-services/service-bluetooth/ServiceBluetooth.cpp
M module-services/service-bluetooth/ServiceBluetooth.cpp => module-services/service-bluetooth/ServiceBluetooth.cpp +2 -2
@@ 201,8 201,8 @@ auto ServiceBluetooth::handle(message::bluetooth::SetStatus *msg) -> std::shared
        startTimeoutTimer();
        break;
    case BluetoothStatus::State::Off:
        handleTurnOff();
        stopTimeoutTimer();
        handleTurnOff();
        break;
    default:
        break;


@@ 501,7 501,7 @@ void ServiceBluetooth::stopTimeoutTimer()

void ServiceBluetooth::resetTimeoutTimer()
{
    if (connectionTimeoutTimer.isValid()) {
    if (connectionTimeoutTimer.isValid() && connectionTimeoutTimer.isActive()) {
        connectionTimeoutTimer.stop();
        connectionTimeoutTimer.start();
    }