From d0dac211e43ddd1f5b3cb7c1e6c20d98110c3426 Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Wed, 4 Sep 2024 16:51:57 +0800 Subject: [PATCH] privacy mode disable switch Signed-off-by: dengxiaoyu --- services/dtbschedmgr/src/common_event_listener.cpp | 4 +--- services/dtbschedmgr/src/datashare_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/services/dtbschedmgr/src/common_event_listener.cpp b/services/dtbschedmgr/src/common_event_listener.cpp index a0d76983..e94d9717 100644 --- a/services/dtbschedmgr/src/common_event_listener.cpp +++ b/services/dtbschedmgr/src/common_event_listener.cpp @@ -93,13 +93,11 @@ void CommonEventListener::OnReceiveEvent(const EventFwk::CommonEventData &eventD ErrCode CommonEventListener::GetForegroundOsAccountLocalId(int32_t& accountId) { - int32_t newId; - ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(newId); + ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(accountId); if (err != ERR_OK) { HILOGE("GetForegroundOsAccountLocalId passing param invalid or return error!, err : %{public}d", err); return INVALID_PARAMETERS_ERR; } - accountId = newId; HILOGD("GetForegroundOsAccountLocalId accountId is: %{public}d", accountId); GetOsAccountType(accountId); return ERR_OK; diff --git a/services/dtbschedmgr/src/datashare_manager.cpp b/services/dtbschedmgr/src/datashare_manager.cpp index e48d3206..e0d65d53 100644 --- a/services/dtbschedmgr/src/datashare_manager.cpp +++ b/services/dtbschedmgr/src/datashare_manager.cpp @@ -137,7 +137,7 @@ Uri DataShareManager::AssembleUserSecureUri(int userId, const std::string &key) int32_t DataShareManager::GetLocalAccountId() { - int32_t id; + int32_t id = -1; ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(id); if (err != ERR_OK) { HILOGE("GetLocalAccountId passing param invalid or return error!, err : %{public}d", err);