feat: Remote sleep event's permission

Signed-off-by: wangyantian <wangyantian@huawei.com>
This commit is contained in:
wangyantian 2024-08-02 12:03:13 +08:00
parent 761b205778
commit 130e51ac19
2 changed files with 2 additions and 8 deletions

View File

@ -437,8 +437,8 @@ CommonEvent.unsubscriber(CommonEventSubscriber, UnsubscriberCallBack);
| COMMON_EVENT_POWER_DISCONNECTED | usual.event.POWER_DISCONNECTED | 无 |
| COMMON_EVENT_SCREEN_OFF | usual.event.SCREEN_OFF | 无 |
| COMMON_EVENT_SCREEN_ON | usual.event.SCREEN_ON | 无 |
| COMMON_EVENT_ENTER_FORCE_SLEEP | usual.event.ENTER_FORCE_SLEEP | ohos.permission.POWER_MANAGER |
| COMMON_EVENT_EXIT_FORCE_SLEEP | usual.event.EXIT_FORCE_SLEEP | ohos.permission.POWER_MANAGER |
| COMMON_EVENT_ENTER_FORCE_SLEEP | usual.event.ENTER_FORCE_SLEEP | |
| COMMON_EVENT_EXIT_FORCE_SLEEP | usual.event.EXIT_FORCE_SLEEP | |
| COMMON_EVENT_USER_PRESENT | usual.event.USER_PRESENT | 无 |
| COMMON_EVENT_TIME_TICK | usual.event.TIME_TICK | 无 |
| COMMON_EVENT_TIME_CHANGED | usual.event.TIME_CHANGED | 无 |

View File

@ -151,12 +151,6 @@ static const std::unordered_map<std::string, std::pair<PermissionState, std::vec
{CommonEventSupport::COMMON_EVENT_BUNDLE_RESOURCES_CHANGED,
{PermissionState::DEFAULT, {"ohos.permission.GET_BUNDLE_RESOURCES"}}
},
{CommonEventSupport::COMMON_EVENT_ENTER_FORCE_SLEEP,
{PermissionState::DEFAULT, {"ohos.permission.POWER_MANAGER"}}
},
{CommonEventSupport::COMMON_EVENT_EXIT_FORCE_SLEEP,
{PermissionState::DEFAULT, {"ohos.permission.POWER_MANAGER"}}
}
};
static const std::unordered_set<std::string> SYSTEM_API_COMMON_EVENTS {