@@ 1,4 1,4 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "PhoneLockedKeysWhitelist.hpp"
@@ 9,13 9,19 @@ namespace locks::PhoneLockedKeysWhitelist
namespace
{
using namespace gui;
- constexpr std::array list = {
- KeyCode::KEY_TORCH, KeyCode::KEY_VOLDN, KeyCode::HEADSET_VOLDN, KeyCode::KEY_VOLUP, KeyCode::HEADSET_VOLUP};
+ constexpr std::array keysWhitelist = {KeyCode::KEY_TORCH,
+ KeyCode::KEY_VOLDN,
+ KeyCode::HEADSET_VOLDN,
+ KeyCode::KEY_VOLUP,
+ KeyCode::HEADSET_VOLUP,
+ KeyCode::SWITCH_DN,
+ KeyCode::SWITCH_MID,
+ KeyCode::SWITCH_UP};
} // anonymous namespace
[[nodiscard]] bool isOnWhitelist(const gui::InputEvent &inputEvent)
{
- for (const auto &key : list) {
+ for (const auto &key : keysWhitelist) {
if (inputEvent.is(key)) {
return true;
}