From a9419fb2f73b72e7db6a2530885b32766b27a4ad Mon Sep 17 00:00:00 2001 From: openharmony_ci <120357966@qq.com> Date: Tue, 3 Dec 2024 08:26:06 +0000 Subject: [PATCH] =?UTF-8?q?=E9=97=B9=E9=92=9F=E8=B7=A8=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=94=A4=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xujunyang --- services/timer/src/timer_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/timer/src/timer_manager.cpp b/services/timer/src/timer_manager.cpp index bab911fc..58fba07d 100644 --- a/services/timer/src/timer_manager.cpp +++ b/services/timer/src/timer_manager.cpp @@ -71,6 +71,7 @@ constexpr int TIMER_ALARM_COUNT = 50; constexpr int MAX_TIMER_ALARM_COUNT = 100; constexpr int TIMER_ALRAM_INTERVAL = 60; constexpr int TIMER_COUNT_TOP_NUM = 5; +const std::string SCHEDULED_POWER_ON_APPS = "persist.time.scheduled_power_on_apps"; static const std::vector ALL_DATA = { "timerId", "type", "flag", "windowLength", "interval", \ "uid", "bundleName", "wantAgent", "state", "triggerTime" }; @@ -870,6 +871,10 @@ void TimerManager::NotifyWantAgentRetry(std::shared_ptr timer) int32_t TimerManager::CheckUserIdForNotify(const std::shared_ptr &timer) { + auto bundleList = TimeFileUtils::GetParameterList(SCHEDULED_POWER_ON_APPS); + if (!bundleList.empty() && timer->bundleName == bundleList[0]) { + return E_TIME_OK; + } int userIdOfTimer = -1; int foregroundUserId = -1; int getLocalIdErr = AccountSA::OsAccountManager::GetOsAccountLocalIdFromUid(timer->uid, userIdOfTimer); -- Gitee