Lines Matching refs:userId

219     int userId = GetCurrentActiveOsAccountId();
225 if (preferencesUtil->ObtainBool(std::to_string(userId), false)) {
228 preferencesUtil->SaveBool(std::to_string(userId), false);
353 void ScreenLockSystemAbility::StrongAuthChanged(int32_t userId, int32_t reasonFlag)
356 systemEvent.userId_ = userId;
359 SCLOCK_HILOGI("StrongAuthChanged: userId: %{public}d, reasonFlag:%{public}d", userId, reasonFlag);
424 int32_t ScreenLockSystemAbility::Lock(int32_t userId)
465 int userId = 0;
466 AccountSA::OsAccountManager::GetOsAccountLocalIdFromUid(callingUid, userId);
467 if (userId == 0) {
468 AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(userId);
470 SCLOCK_HILOGD("userId=%{public}d", userId);
472 int32_t result = UserIdmClient::GetInstance().GetCredentialInfo(userId, AuthType::PIN, getInfoCallback);
521 int32_t ScreenLockSystemAbility::IsScreenLockDisabled(int userId, bool &isDisabled)
523 SCLOCK_HILOGI("IsScreenLockDisabled userId=%{public}d", userId);
530 SCLOCK_HILOGE("no permission: userId=%{public}d", userId);
533 isDisabled = preferencesUtil->ObtainBool(std::to_string(userId), false);
538 int32_t ScreenLockSystemAbility::SetScreenLockDisabled(bool disable, int userId)
540 SCLOCK_HILOGI("SetScreenLockDisabled disable=%{public}d ,param=%{public}d", disable, userId);
541 if (GetCurrentActiveOsAccountId() != userId) {
542 SCLOCK_HILOGE("it's not currentAccountId userId=%{public}d", userId);
550 SCLOCK_HILOGE("no permission: userId=%{public}d", userId);
558 preferencesUtil->SaveBool(std::to_string(userId), disable);
563 int32_t ScreenLockSystemAbility::SetScreenLockAuthState(int authState, int32_t userId, std::string &authToken)
565 SCLOCK_HILOGI("SetScreenLockAuthState authState=%{public}d ,userId=%{public}d", authState, userId);
567 SCLOCK_HILOGE("no permission: userId=%{public}d", userId);
571 auto iter = authStateInfo.find(userId);
576 authStateInfo.insert(std::make_pair(userId, authState));
580 int32_t ScreenLockSystemAbility::GetScreenLockAuthState(int userId, int32_t &authState)
582 SCLOCK_HILOGD("GetScreenLockAuthState userId=%{public}d", userId);
584 auto iter = authStateInfo.find(userId);
590 SCLOCK_HILOGE("no permission: userId=%{public}d", userId);
594 SCLOCK_HILOGI("The authentication status is not set. userId=%{public}d", userId);
598 int32_t ScreenLockSystemAbility::RequestStrongAuth(int reasonFlag, int32_t userId)
600 SCLOCK_HILOGI("RequestStrongAuth reasonFlag=%{public}d ,userId=%{public}d", reasonFlag, userId);
602 SCLOCK_HILOGE("no permission: userId=%{public}d", userId);
605 StrongAuthManger::GetInstance()->SetStrongAuthStat(userId, reasonFlag);
606 StrongAuthChanged(userId, reasonFlag);
610 int32_t ScreenLockSystemAbility::GetStrongAuth(int userId, int32_t &reasonFlag)
612 reasonFlag = StrongAuthManger::GetInstance()->GetStrongAuthStat(userId);
613 SCLOCK_HILOGI("GetStrongAuth userId=%{public}d, reasonFlag=%{public}d", userId, reasonFlag);