From 617e9bcd24941751250b0c398ff82d085e4390d0 Mon Sep 17 00:00:00 2001 From: li_junsong Date: Thu, 28 Nov 2024 14:28:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=97=B9=E9=92=9F=E8=B7=A8?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=94=A4=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li_junsong --- 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 e051aa58..5df8895c 100644 --- a/services/timer/src/timer_manager.cpp +++ b/services/timer/src/timer_manager.cpp @@ -72,6 +72,7 @@ constexpr int MAX_TIMER_ALARM_COUNT = 100; constexpr int TIMER_ALRAM_INTERVAL = 60; constexpr int TIMER_COUNT_TOP_NUM = 5; const std::string AUTO_RESTORE_TIMER_APPS = "persist.time.auto_restore_timer_apps"; +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" }; @@ -876,6 +877,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