mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
privacy mode disable switch
Signed-off-by: dengxiaoyu <dengxiaoyu6@huawei.com>
This commit is contained in:
parent
19c7a2c595
commit
d0dac211e4
@ -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;
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user