Files
MuditaOS/module-apps/application-settings/windows/bluetooth/PhoneNameWindow.hpp
T
Bartosz Cichocki c1c392c303 [EGD-7743] Fix crash on BT device name save
Due to enabled EHCILL the shutdown procedure takes longer time
than before, so restarting by turning off and on without a delay
caused crash in the BT stack. Added delay between shutdown and
power on to let the stack turn off completely
2021-10-04 18:10:29 +02:00

28 lines
936 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <application-settings/models/bluetooth/BluetoothSettingsModel.hpp>
#include <Text.hpp>
namespace gui
{
class PhoneNameWindow : public AppWindow
{
public:
PhoneNameWindow(app::ApplicationCommon *app, std::shared_ptr<BluetoothSettingsModel> bluetoothSettingsModel);
private:
void buildInterface() override;
void destroyInterface() override;
void onBeforeShow(ShowMode mode, SwitchData *data) override;
auto onInput(const InputEvent &inputEvent) -> bool override;
Text *inputField = nullptr;
std::shared_ptr<BluetoothSettingsModel> bluetoothSettingsModel;
static constexpr auto maxNameLength = 248; // Max 248 bytes according to Bluetooth Core Specification v5.2
};
} /* namespace gui */