!1044 控件透传isOsAccountVerified

Merge pull request !1044 from liuziwei/master
This commit is contained in:
openharmony_ci 2024-09-20 10:28:49 +00:00 committed by Gitee
commit f51f0c0f38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ public:
int32_t callerType {0};
std::string callingAppID {""};
bool isPinExpired {false};
bool isOsAccountVerified {false};
};
static std::shared_ptr<Context> CreateSimpleAuthContext(const Authentication::AuthenticationPara &para,

View File

@ -179,6 +179,7 @@ std::shared_ptr<Context> WidgetContext::BuildTask(const std::vector<uint8_t> &ch
para.callerName = para_.callerName;
para.sdkVersion = para_.sdkVersion;
para.authIntent = authIntent;
para.isOsAccountVerified = para_.isOsAccountVerified;
auto context = ContextFactory::CreateSimpleAuthContext(para, widgetCallback);
if (context == nullptr || !ContextPool::Instance().Insert(context)) {
IAM_LOGE("failed to insert context");

View File

@ -852,6 +852,7 @@ uint64_t UserAuthService::StartWidgetContext(const std::shared_ptr<ContextCallba
{
Attributes extraInfo;
para.tokenId = IpcCommon::GetAccessTokenId(*this);
para.isOsAccountVerified = IpcCommon::IsOsAccountVerified(para.userId);
if (!AuthWidgetHelper::InitWidgetContextParam(authParam, validType, widgetParam, para)) {
IAM_LOGE("init widgetContext failed");
contextCallback->SetTraceAuthFinishReason("UserAuthService InitWidgetContextParam fail");