mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2024-11-23 07:30:13 +00:00
添加权限
Signed-off-by: guoyi <guoyi39@huawei.com>
This commit is contained in:
parent
230938251e
commit
514e9b732c
@ -17,6 +17,7 @@
|
||||
"permission" : [
|
||||
"ohos.permission.DISTRIBUTED_DATASYNC",
|
||||
"ohos.permission.ACCESS_SERVICE_DM",
|
||||
"ohos.permission.MANAGE_LOCAL_ACCOUNTS",
|
||||
"ohos.permission.MONITOR_DEVICE_NETWORK_STATE"
|
||||
],
|
||||
"permission_acls" : ["ohos.permission.MONITOR_DEVICE_NETWORK_STATE"],
|
||||
|
@ -291,6 +291,9 @@ void DistributedDeviceProfileService::OnStop()
|
||||
void DistributedDeviceProfileService::OnAddSystemAbility(int32_t systemAbilityId, const std::string& deviceId)
|
||||
{
|
||||
HILOGI("called systemAbilityId:%{public}d", systemAbilityId);
|
||||
if (systemAbilityId == SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN) {
|
||||
DistributedDeviceProfile::DistributedDeviceProfileServiceNew::GetInstance().SubscribeAccountCommonEvent();
|
||||
}
|
||||
if (DistributedDeviceProfile::DistributedDeviceProfileServiceNew::GetInstance().IsInited()) {
|
||||
return;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
int32_t Dump(int32_t fd, const std::vector<std::u16string>& args) override;
|
||||
void DelayUnloadTask() override;
|
||||
bool IsInited() override;
|
||||
void SubscribeAccountCommonEvent();
|
||||
|
||||
protected:
|
||||
void OnStart(const SystemAbilityOnDemandReason& startReason) override;
|
||||
@ -89,7 +90,6 @@ private:
|
||||
int32_t SaveSwitchProfilesFromTempCache();
|
||||
int32_t SaveDynamicProfilesFromTempCache();
|
||||
int32_t NotifyDeviceProfileInited();
|
||||
void SubscribeAccountCommonEvent();
|
||||
void GetDynamicProfilesFromTempCache(std::map<std::string, std::string>& entries);
|
||||
void ClearProfileCache();
|
||||
|
||||
|
@ -606,6 +606,9 @@ int32_t DistributedDeviceProfileServiceNew::OnIdle(const SystemAbilityOnDemandRe
|
||||
void DistributedDeviceProfileServiceNew::OnAddSystemAbility(int32_t systemAbilityId, const std::string& deviceId)
|
||||
{
|
||||
HILOGI("called systemAbilityId:%{public}d", systemAbilityId);
|
||||
if (systemAbilityId == SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN) {
|
||||
SubscribeAccountCommonEvent();
|
||||
}
|
||||
if (DistributedDeviceProfile::DistributedDeviceProfileServiceNew::GetInstance().IsInited()) {
|
||||
return;
|
||||
}
|
||||
@ -619,9 +622,6 @@ void DistributedDeviceProfileServiceNew::OnAddSystemAbility(int32_t systemAbilit
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (systemAbilityId == SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN) {
|
||||
SubscribeAccountCommonEvent();
|
||||
}
|
||||
PostInit();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user