mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-20 15:07:17 -04:00
Refactored LockWindow TitleBar handling. Added Sim pin request block on lockedPhone. Added Sim info popup added when pin changed. Updated assets. Removed old PinLock structures. Cleared LockBox structures. Removed old settings sim setters. New CellularMessage adaptation. Cleared Lock structure.
42 lines
1001 B
C++
42 lines
1001 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "Lock.hpp"
|
|
#include <module-utils/log/log.hpp>
|
|
|
|
namespace locks
|
|
{
|
|
void Lock::consumeState() noexcept
|
|
{
|
|
if (lockState == LockState::InputInvalid) {
|
|
lockState = LockState::InputRequired;
|
|
}
|
|
else if (lockState == LockState::NewInputInvalid) {
|
|
lockState = LockState::NewInputRequired;
|
|
}
|
|
else if (lockState == LockState::NewInputConfirmRequired) {
|
|
lockState = LockState::NewInputRequired;
|
|
}
|
|
}
|
|
|
|
void Lock::putNextChar(unsigned int c)
|
|
{
|
|
if (maxInputSize > inputValue.size()) {
|
|
inputValue.push_back(c);
|
|
}
|
|
}
|
|
|
|
void Lock::popChar()
|
|
{
|
|
if (inputValue.size() > 0) {
|
|
inputValue.pop_back();
|
|
}
|
|
}
|
|
|
|
void Lock::clearAttempt() noexcept
|
|
{
|
|
inputValue.clear();
|
|
}
|
|
|
|
} // namespace locks
|