diff --git a/services/timer/src/timer_manager.cpp b/services/timer/src/timer_manager.cpp index e051aa58a0a4c2dcba1a8bbaa9ec03dd3afed7d8..5df8895c23f1b528ace6256852ff98643cc1d4e2 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);