From 78fd1295adef84cbd6393392189c4b06eec30548 Mon Sep 17 00:00:00 2001 From: ShiJie Date: Wed, 26 Jul 2023 13:56:38 +0800 Subject: [PATCH] fix: Proximity lock does not block the timeout screen Signed-off-by: ShiJie Change-Id: Ie22fc244134b08f9c6d1d65a592ebeb6cc2dfa34 --- services/native/src/power_state_machine.cpp | 3 +-- services/native/src/running_lock_mgr.cpp | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/services/native/src/power_state_machine.cpp b/services/native/src/power_state_machine.cpp index 6d9691c7..c8a0503d 100644 --- a/services/native/src/power_state_machine.cpp +++ b/services/native/src/power_state_machine.cpp @@ -47,8 +47,7 @@ PowerStateMachine::PowerStateMachine(const wptr& pms) : pms_(pm // init lock map which will block state transit std::vector awakeBlocker {}; std::vector freezeBlocker {}; - std::vector inactiveBlocker { - RunningLockType::RUNNINGLOCK_SCREEN, RunningLockType::RUNNINGLOCK_PROXIMITY_SCREEN_CONTROL}; + std::vector inactiveBlocker {RunningLockType::RUNNINGLOCK_SCREEN}; std::vector standByBlocker {}; std::vector dozeBlocker {}; std::vector sleepBlocker {RunningLockType::RUNNINGLOCK_BACKGROUND}; diff --git a/services/native/src/running_lock_mgr.cpp b/services/native/src/running_lock_mgr.cpp index 5acda0c2..25216d44 100644 --- a/services/native/src/running_lock_mgr.cpp +++ b/services/native/src/running_lock_mgr.cpp @@ -176,10 +176,6 @@ void RunningLockMgr::InitLocksTypeProximity() stateMachine->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_RUNNING_LOCK, true); } - stateMachine->CancelDelayTimer( - PowerStateMachine::CHECK_USER_ACTIVITY_TIMEOUT_MSG); - stateMachine->CancelDelayTimer( - PowerStateMachine::CHECK_USER_ACTIVITY_OFF_TIMEOUT_MSG); backgroundLock_->Lock(); } else { POWER_HILOGI(FEATURE_RUNNING_LOCK, "RUNNINGLOCK_PROXIMITY_SCREEN_CONTROL inactive"); -- Gitee