privacy mode disable switch

Signed-off-by: dengxiaoyu <dengxiaoyu6@huawei.com>
This commit is contained in:
dengxiaoyu 2024-09-04 16:51:57 +08:00
parent 19c7a2c595
commit d0dac211e4
2 changed files with 2 additions and 4 deletions

View File

@ -93,13 +93,11 @@ void CommonEventListener::OnReceiveEvent(const EventFwk::CommonEventData &eventD
ErrCode CommonEventListener::GetForegroundOsAccountLocalId(int32_t& accountId) ErrCode CommonEventListener::GetForegroundOsAccountLocalId(int32_t& accountId)
{ {
int32_t newId; ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(accountId);
ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(newId);
if (err != ERR_OK) { if (err != ERR_OK) {
HILOGE("GetForegroundOsAccountLocalId passing param invalid or return error!, err : %{public}d", err); HILOGE("GetForegroundOsAccountLocalId passing param invalid or return error!, err : %{public}d", err);
return INVALID_PARAMETERS_ERR; return INVALID_PARAMETERS_ERR;
} }
accountId = newId;
HILOGD("GetForegroundOsAccountLocalId accountId is: %{public}d", accountId); HILOGD("GetForegroundOsAccountLocalId accountId is: %{public}d", accountId);
GetOsAccountType(accountId); GetOsAccountType(accountId);
return ERR_OK; return ERR_OK;

View File

@ -137,7 +137,7 @@ Uri DataShareManager::AssembleUserSecureUri(int userId, const std::string &key)
int32_t DataShareManager::GetLocalAccountId() int32_t DataShareManager::GetLocalAccountId()
{ {
int32_t id; int32_t id = -1;
ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(id); ErrCode err = AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(id);
if (err != ERR_OK) { if (err != ERR_OK) {
HILOGE("GetLocalAccountId passing param invalid or return error!, err : %{public}d", err); HILOGE("GetLocalAccountId passing param invalid or return error!, err : %{public}d", err);