1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "form_render_mgr.h"
17
18 #include <mutex>
19
20 #include "fms_log_wrapper.h"
21 #include "form_ams_helper.h"
22 #include "form_bms_helper.h"
23 #include "form_cache_mgr.h"
24 #include "form_constants.h"
25 #include "form_data_mgr.h"
26 #include "form_event_report.h"
27 #include "form_host_interface.h"
28 #include "form_mgr_errors.h"
29 #include "form_sandbox_render_mgr_inner.h"
30 #include "form_supply_callback.h"
31 #include "form_task_mgr.h"
32 #include "form_trust_mgr.h"
33 #include "form_util.h"
34 #include "ipc_skeleton.h"
35 #include "os_account_manager.h"
36 #include "want.h"
37
38 namespace OHOS {
39 namespace AppExecFwk {
40 namespace {
41 constexpr size_t LAST_CONNECTION = 1;
42 }
43 using Want = OHOS::AAFwk::Want;
FormRenderMgr()44 FormRenderMgr::FormRenderMgr()
45 {
46 }
~FormRenderMgr()47 FormRenderMgr::~FormRenderMgr()
48 {
49 }
50
GetFormRenderState()51 void FormRenderMgr::GetFormRenderState()
52 {
53 // Check whether the account is authenticated.
54 bool isVerified = false;
55 AccountSA::OsAccountManager::IsOsAccountVerified(FormUtil::GetCurrentAccountId(), isVerified);
56 HILOG_INFO("isVerified:%{public}d, isVerified_:%{public}d, screen:%{public}d",
57 isVerified, isVerified_, isScreenUnlocked_);
58
59 std::lock_guard<std::mutex> lock(isVerifiedMutex_);
60 if (isVerified_ == isVerified) {
61 return;
62 }
63
64 isVerified_ = isVerified;
65 if (!isVerified) {
66 return;
67 }
68 if (!isScreenUnlocked_) {
69 PostOnUnlockTask();
70 }
71 ExecAcquireProviderTask();
72 }
73
GetIsVerified() const74 bool FormRenderMgr::GetIsVerified() const
75 {
76 HILOG_DEBUG("GetIsVerified");
77 std::lock_guard<std::mutex> lock(isVerifiedMutex_);
78 return isVerified_;
79 }
80
RenderForm(const FormRecord & formRecord,const WantParams & wantParams,const sptr<IRemoteObject> & hostToken)81 ErrCode FormRenderMgr::RenderForm(
82 const FormRecord &formRecord, const WantParams &wantParams, const sptr<IRemoteObject> &hostToken)
83 {
84 HILOG_INFO("formId:%{public}" PRId64 ", formUserId:%{public}d", formRecord.formId, formRecord.userId);
85 GetFormRenderState();
86 HILOG_INFO("the current user authentication status:%{public}d,%{public}d", isVerified_, isScreenUnlocked_);
87 if (formRecord.uiSyntax != FormType::ETS) {
88 return ERR_OK;
89 }
90 if (formRecord.formId <= 0) {
91 HILOG_ERROR("formId not greater than 0");
92 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
93 }
94
95 Want want;
96 want.SetParams(wantParams);
97 std::string recordUid = std::to_string(formRecord.providerUserId) + formRecord.bundleName;
98 want.SetParam(Constants::FORM_SUPPLY_UID, recordUid);
99 {
100 std::lock_guard<std::mutex> lock(isVerifiedMutex_);
101 want.SetParam(Constants::FORM_RENDER_STATE, isVerified_ || isScreenUnlocked_);
102 }
103 if (formRecord.privacyLevel > 0) {
104 InitRenderInner(true, formRecord.userId);
105 return sandboxInners_[formRecord.userId]->RenderForm(formRecord, want, hostToken);
106 } else {
107 InitRenderInner(false, formRecord.userId);
108 return renderInners_[formRecord.userId]->RenderForm(formRecord, want, hostToken);
109 }
110 }
111
UpdateRenderingForm(int64_t formId,const FormProviderData & formProviderData,const WantParams & wantParams,bool mergeData)112 ErrCode FormRenderMgr::UpdateRenderingForm(int64_t formId, const FormProviderData &formProviderData,
113 const WantParams &wantParams, bool mergeData)
114 {
115 HILOG_INFO("update formId:%{public}" PRId64 ",%{public}zu", formId, formProviderData.GetDataString().length());
116
117 FormRecord formRecord;
118 bool isGetFormRecord = FormDataMgr::GetInstance().GetFormRecord(formId, formRecord);
119 if (!isGetFormRecord) {
120 HILOG_ERROR("get FormRecord fail, not exist such form, formId:%{public}" PRId64 "", formId);
121 return ERR_APPEXECFWK_FORM_NOT_EXIST_ID;
122 }
123 int32_t formUserId = formRecord.userId;
124 HILOG_INFO("update formUserId:%{public}d", formUserId);
125 if (formRecord.privacyLevel > 0) {
126 auto iter = sandboxInners_.find(formUserId);
127 if (iter == sandboxInners_.end()) {
128 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
129 }
130 return iter->second->UpdateRenderingForm(formRecord, formProviderData, wantParams, mergeData);
131 } else {
132 auto iter = renderInners_.find(formUserId);
133 if (iter == renderInners_.end()) {
134 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
135 }
136 return iter->second->UpdateRenderingForm(formRecord, formProviderData, wantParams, mergeData);
137 }
138 }
139
ReloadForm(const std::vector<FormRecord> && formRecords,const std::string & bundleName,int32_t userId)140 ErrCode FormRenderMgr::ReloadForm(
141 const std::vector<FormRecord> &&formRecords, const std::string &bundleName, int32_t userId)
142 {
143 HILOG_INFO("userId:%{public}d", userId);
144 std::vector<FormRecord> sandboxRecords;
145 std::vector<FormRecord> normalRecords;
146 for (const auto &record : formRecords) {
147 if (record.privacyLevel > 0) {
148 sandboxRecords.emplace_back(record);
149 } else {
150 normalRecords.emplace_back(record);
151 }
152 }
153 auto renderIter = renderInners_.find(userId);
154 if (!normalRecords.empty() && renderIter != renderInners_.end()) {
155 renderIter->second->ReloadForm(std::move(normalRecords), bundleName, userId);
156 }
157 auto sandboxIter = sandboxInners_.find(userId);
158 if (!sandboxRecords.empty() && sandboxIter != sandboxInners_.end()) {
159 sandboxIter->second->ReloadForm(std::move(sandboxRecords), bundleName, userId);
160 }
161 return ERR_OK;
162 }
163
PostOnUnlockTask()164 void FormRenderMgr::PostOnUnlockTask()
165 {
166 int32_t userId = FormUtil::GetCurrentAccountId();
167 auto renderIter = renderInners_.find(userId);
168 if (renderIter != renderInners_.end()) {
169 renderIter->second->PostOnUnlockTask();
170 }
171 auto sandboxIter = sandboxInners_.find(userId);
172 if (sandboxIter != sandboxInners_.end()) {
173 sandboxIter->second->PostOnUnlockTask();
174 }
175 }
176
AddAcquireProviderFormInfoTask(std::function<void ()> task)177 void FormRenderMgr::AddAcquireProviderFormInfoTask(std::function<void()> task)
178 {
179 HILOG_DEBUG("call");
180 std::lock_guard<std::mutex> lock(taskQueueMutex_);
181 taskQueue_.push(task);
182 }
183
ExecAcquireProviderTask()184 void FormRenderMgr::ExecAcquireProviderTask()
185 {
186 HILOG_INFO("start");
187 // start to execute asynchronous tasks in the queue
188 std::lock_guard<std::mutex> lock(taskQueueMutex_);
189 while (!taskQueue_.empty()) {
190 auto task = taskQueue_.front();
191 task();
192 taskQueue_.pop();
193 }
194 }
195
NotifyScreenOn()196 void FormRenderMgr::NotifyScreenOn()
197 {
198 int32_t userId = FormUtil::GetCurrentAccountId();
199 auto renderIter = renderInners_.find(userId);
200 if (renderIter != renderInners_.end()) {
201 renderIter->second->NotifyScreenOn();
202 }
203 auto sandboxIter = sandboxInners_.find(userId);
204 if (sandboxIter != sandboxInners_.end()) {
205 sandboxIter->second->NotifyScreenOn();
206 }
207 }
208
OnScreenUnlock()209 void FormRenderMgr::OnScreenUnlock()
210 {
211 HILOG_INFO("call. %{public}d,%{public}d", isVerified_, isScreenUnlocked_);
212 if (isScreenUnlocked_) {
213 return;
214 }
215
216 // el2 path maybe not unlocked, should not acquire data
217 std::lock_guard<std::mutex> lock(isVerifiedMutex_);
218 isScreenUnlocked_ = true;
219 if (!isVerified_) {
220 PostOnUnlockTask();
221 }
222 }
223
OnUnlock()224 void FormRenderMgr::OnUnlock()
225 {
226 HILOG_INFO("call. %{public}d,%{public}d", isVerified_, isScreenUnlocked_);
227 if (isVerified_) {
228 return;
229 }
230
231 {
232 std::lock_guard<std::mutex> lock(isVerifiedMutex_);
233 isVerified_ = true;
234 if (!isScreenUnlocked_) {
235 PostOnUnlockTask();
236 }
237 }
238 ExecAcquireProviderTask();
239 }
240
SetVisibleChange(int64_t formId,bool isVisible)241 void FormRenderMgr::SetVisibleChange(int64_t formId, bool isVisible)
242 {
243 HILOG_INFO("call.");
244 int32_t userId = FormUtil::GetCurrentAccountId();
245 auto renderIter = renderInners_.find(userId);
246 if (renderIter != renderInners_.end()) {
247 renderIter->second->PostSetVisibleChangeTask(formId, isVisible);
248 }
249 auto sandboxIter = sandboxInners_.find(userId);
250 if (sandboxIter != sandboxInners_.end()) {
251 sandboxIter->second->PostSetVisibleChangeTask(formId, isVisible);
252 }
253 }
254
StopRenderingForm(int64_t formId,const FormRecord & formRecord,const std::string & compId,const sptr<IRemoteObject> & hostToken)255 ErrCode FormRenderMgr::StopRenderingForm(
256 int64_t formId, const FormRecord &formRecord, const std::string &compId, const sptr<IRemoteObject> &hostToken)
257 {
258 HILOG_INFO("formUserId:%{public}d", formRecord.userId);
259 if (formRecord.privacyLevel > 0) {
260 auto iter = sandboxInners_.find(formRecord.userId);
261 if (iter == sandboxInners_.end()) {
262 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
263 }
264 return iter->second->StopRenderingForm(formId, formRecord, compId, hostToken);
265 } else {
266 auto iter = renderInners_.find(formRecord.userId);
267 if (iter == renderInners_.end()) {
268 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
269 }
270 return iter->second->StopRenderingForm(formId, formRecord, compId, hostToken);
271 }
272 }
273
RenderFormCallback(int64_t formId,const Want & want)274 ErrCode FormRenderMgr::RenderFormCallback(int64_t formId, const Want &want)
275 {
276 HILOG_DEBUG("call");
277 return ERR_OK;
278 }
279
StopRenderingFormCallback(int64_t formId,const Want & want)280 ErrCode FormRenderMgr::StopRenderingFormCallback(int64_t formId, const Want &want)
281 {
282 int32_t callingUserId = IPCSkeleton::GetCallingUid() / Constants::CALLING_UID_TRANSFORM_DIVISOR;
283 HILOG_INFO("formId:%{public}" PRId64 ", callingUserId:%{public}d", formId, callingUserId);
284 auto renderIter = renderInners_.find(callingUserId);
285 if (renderIter != renderInners_.end()) {
286 renderIter->second->StopRenderingFormCallback(formId, want);
287 }
288 auto sandboxIter = sandboxInners_.find(callingUserId);
289 if (sandboxIter != sandboxInners_.end()) {
290 sandboxIter->second->StopRenderingFormCallback(formId, want);
291 }
292 return ERR_OK;
293 }
294
ReleaseRenderer(int64_t formId,const FormRecord & formRecord,const std::string & compId)295 ErrCode FormRenderMgr::ReleaseRenderer(int64_t formId, const FormRecord &formRecord, const std::string &compId)
296 {
297 HILOG_INFO("formId:%{public}" PRId64 ", formUserId:%{public}d", formId, formRecord.userId);
298 if (formRecord.privacyLevel > 0) {
299 auto iter = sandboxInners_.find(formRecord.userId);
300 if (iter == sandboxInners_.end()) {
301 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
302 }
303 return iter->second->ReleaseRenderer(formId, formRecord, compId);
304 } else {
305 auto iter = renderInners_.find(formRecord.userId);
306 if (iter == renderInners_.end()) {
307 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
308 }
309 return iter->second->ReleaseRenderer(formId, formRecord, compId);
310 }
311 }
312
AddConnection(int64_t formId,sptr<FormRenderConnection> connection,const FormRecord & formRecord)313 ErrCode FormRenderMgr::AddConnection(
314 int64_t formId, sptr<FormRenderConnection> connection, const FormRecord &formRecord)
315 {
316 HILOG_INFO("formUserId: %{public}d", formRecord.userId);
317 if (formRecord.privacyLevel > 0) {
318 auto iter = sandboxInners_.find(formRecord.userId);
319 if (iter == sandboxInners_.end()) {
320 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
321 }
322 return iter->second->AddConnection(formId, connection);
323 } else {
324 auto iter = renderInners_.find(formRecord.userId);
325 if (iter == renderInners_.end()) {
326 return ERR_APPEXECFWK_FORM_INVALID_PARAM;
327 }
328 return iter->second->AddConnection(formId, connection);
329 }
330 }
331
RemoveConnection(int64_t formId,const FormRecord & formRecord)332 void FormRenderMgr::RemoveConnection(int64_t formId, const FormRecord &formRecord)
333 {
334 HILOG_INFO("formId:%{public}" PRId64 ", formUserId:%{public}d", formId, formRecord.userId);
335 if (formRecord.privacyLevel > 0) {
336 auto iter = sandboxInners_.find(formRecord.userId);
337 if (iter != sandboxInners_.end()) {
338 iter->second->RemoveConnection(formId);
339 }
340 } else {
341 auto iter = renderInners_.find(formRecord.userId);
342 if (iter != renderInners_.end()) {
343 iter->second->RemoveConnection(formId);
344 }
345 }
346 }
347
CleanFormHost(const sptr<IRemoteObject> & host,const int hostCallingUid)348 void FormRenderMgr::CleanFormHost(const sptr<IRemoteObject> &host, const int hostCallingUid)
349 {
350 int32_t hostUserId = hostCallingUid / Constants::CALLING_UID_TRANSFORM_DIVISOR;
351 if (hostUserId == 0) {
352 HILOG_WARN("hostUserId is 0, get current active userId ");
353 hostUserId = FormUtil::GetCurrentAccountId();
354 }
355 HILOG_INFO("hostUserId:%{public}d", hostUserId);
356 auto renderIter = renderInners_.find(hostUserId);
357 if (renderIter != renderInners_.end()) {
358 renderIter->second->CleanFormHost(host);
359 }
360 auto sandboxIter = sandboxInners_.find(hostUserId);
361 if (sandboxIter != sandboxInners_.end()) {
362 sandboxIter->second->CleanFormHost(host);
363 }
364 }
365
AddRenderDeathRecipient(const sptr<IRemoteObject> & remoteObject,const FormRecord & formRecord)366 void FormRenderMgr::AddRenderDeathRecipient(const sptr<IRemoteObject> &remoteObject, const FormRecord &formRecord)
367 {
368 HILOG_INFO("formUserId:%{public}d", formRecord.userId);
369 if (formRecord.privacyLevel > 0) {
370 auto iter = sandboxInners_.find(formRecord.userId);
371 if (iter != sandboxInners_.end()) {
372 iter->second->AddRenderDeathRecipient(remoteObject);
373 }
374 } else {
375 auto iter = renderInners_.find(formRecord.userId);
376 if (iter != renderInners_.end()) {
377 iter->second->AddRenderDeathRecipient(remoteObject);
378 }
379 }
380 }
381
OnRenderingBlock(const std::string & bundleName)382 void FormRenderMgr::OnRenderingBlock(const std::string &bundleName)
383 {
384 HILOG_INFO("bundleName:%{public}s", bundleName.c_str());
385 FormEventInfo eventInfo;
386 eventInfo.bundleName = bundleName;
387 FormEventReport::SendSecondFormEvent(
388 FormEventName::FORM_RENDER_BLOCK, HiSysEventType::FAULT, eventInfo);
389
390 FormTrustMgr::GetInstance().MarkTrustFlag(bundleName, false);
391
392 Want want;
393 want.SetElementName(Constants::FRS_BUNDLE_NAME, "ServiceExtension");
394 want.AddFlags(Want::FLAG_ABILITY_FORM_ENABLED);
395 FormAmsHelper::GetInstance().StopExtensionAbility(want);
396 }
397
IsNeedRender(int64_t formId)398 bool FormRenderMgr::IsNeedRender(int64_t formId)
399 {
400 FormRecord formRecord;
401 bool isGetFormRecord = FormDataMgr::GetInstance().GetFormRecord(formId, formRecord);
402 if (!isGetFormRecord) {
403 HILOG_ERROR("not exist such form, formId:%{public}" PRId64 "", formId);
404 return false;
405 }
406 if (formRecord.uiSyntax != FormType::ETS) {
407 HILOG_DEBUG("no need render, formId:%{public}" PRId64 "", formId);
408 return false;
409 }
410 return true;
411 }
412
HandleConnectFailed(int64_t formId,int32_t errorCode) const413 void FormRenderMgr::HandleConnectFailed(int64_t formId, int32_t errorCode) const
414 {
415 HILOG_ERROR("Connect render service failed, formId:%{public}" PRId64 ", errorCode:%{public}d",
416 formId, errorCode);
417 std::vector<sptr<IRemoteObject>> formHostObjs;
418 FormDataMgr::GetInstance().GetFormHostRemoteObj(formId, formHostObjs);
419 for (const auto &host : formHostObjs) {
420 auto hostClient = iface_cast<IFormHost>(host);
421 if (hostClient == nullptr) {
422 HILOG_ERROR("null hostClient");
423 continue;
424 }
425 hostClient->OnError(errorCode, "Connect FormRenderService failed");
426 }
427 }
428
IsRerenderForRenderServiceDied(int64_t formId)429 bool FormRenderMgr::IsRerenderForRenderServiceDied(int64_t formId)
430 {
431 int32_t rerenderCount = 0;
432 int32_t reSandboxRenderCount = 0;
433 FormRecord formRecord;
434 bool isGetFormRecord = FormDataMgr::GetInstance().GetFormRecord(formId, formRecord);
435 if (!isGetFormRecord) {
436 HILOG_ERROR("get FormRecord fail, not exist such form, formId:%{public}" PRId64 "", formId);
437 return ERR_APPEXECFWK_FORM_NOT_EXIST_ID;
438 }
439 HILOG_INFO("formId:%{public}" PRId64 ", formUserId:%{public}d", formId, formRecord.userId);
440 auto renderIter = renderInners_.find(formRecord.userId);
441 if (renderIter != renderInners_.end()) {
442 rerenderCount = renderIter->second->GetReRenderCount();
443 }
444 auto sandboxIter = sandboxInners_.find(formRecord.userId);
445 if (sandboxIter != sandboxInners_.end()) {
446 reSandboxRenderCount = sandboxIter->second->GetReRenderCount();
447 }
448 bool ret = IsNeedRender(formId) && (rerenderCount > 0 || reSandboxRenderCount > 0);
449 HILOG_DEBUG("Is need to rerender:%{public}d", ret);
450 return ret;
451 }
452
InitRenderInner(bool isSandbox,int32_t userId)453 void FormRenderMgr::InitRenderInner(bool isSandbox, int32_t userId)
454 {
455 HILOG_INFO("isSandbox: %{public}d userId: %{public}d.", isSandbox, userId);
456 std::lock_guard<std::mutex> lock(renderInnerMutex_);
457 if (isSandbox) {
458 auto iter = sandboxInners_.find(userId);
459 if (iter == sandboxInners_.end()) {
460 auto formSandboxRenderMgr = std::make_shared<FormSandboxRenderMgrInner>();
461 formSandboxRenderMgr->SetUserId(userId);
462 sandboxInners_.emplace(userId, formSandboxRenderMgr);
463 }
464 } else {
465 auto iter = renderInners_.find(userId);
466 if (iter == renderInners_.end()) {
467 auto formRenderMgr = std::make_shared<FormRenderMgrInner>();
468 formRenderMgr->SetUserId(userId);
469 renderInners_.emplace(userId, formRenderMgr);
470 }
471 }
472 }
473
RecycleForms(const std::vector<int64_t> & formIds,const Want & want,const sptr<IRemoteObject> & remoteObjectOfHost)474 ErrCode FormRenderMgr::RecycleForms(
475 const std::vector<int64_t> &formIds, const Want &want, const sptr<IRemoteObject> &remoteObjectOfHost)
476 {
477 int callingUserId = want.GetIntParam(Constants::RECYCLE_FORMS_USER_ID, 0);
478 if (callingUserId == 0) {
479 callingUserId = IPCSkeleton::GetCallingUid() / Constants::CALLING_UID_TRANSFORM_DIVISOR;
480 HILOG_INFO("callingUserId is 0, update callingUserId:%{public}d", callingUserId);
481 }
482 auto renderIter = renderInners_.find(callingUserId);
483 if (renderIter != renderInners_.end()) {
484 return renderIter->second->RecycleForms(formIds, want, remoteObjectOfHost);
485 }
486 auto sandboxIter = sandboxInners_.find(callingUserId);
487 if (sandboxIter != sandboxInners_.end()) {
488 return sandboxIter->second->RecycleForms(formIds, want, remoteObjectOfHost);
489 }
490 return ERR_APPEXECFWK_FORM_RENDER_SERVICE_DIED;
491 }
492
RecoverForms(const std::vector<int64_t> & formIds,const WantParams & wantParams)493 ErrCode FormRenderMgr::RecoverForms(const std::vector<int64_t> &formIds, const WantParams &wantParams)
494 {
495 int32_t callingUserId = IPCSkeleton::GetCallingUid() / Constants::CALLING_UID_TRANSFORM_DIVISOR;
496 auto renderIter = renderInners_.find(callingUserId);
497 if (renderIter != renderInners_.end()) {
498 return renderIter->second->RecoverForms(formIds, wantParams);
499 }
500 auto sandboxIter = sandboxInners_.find(callingUserId);
501 if (sandboxIter != sandboxInners_.end()) {
502 return sandboxIter->second->RecoverForms(formIds, wantParams);
503 }
504 return ERR_APPEXECFWK_FORM_RENDER_SERVICE_DIED;
505 }
506
DisconnectAllRenderConnections(int userId)507 void FormRenderMgr::DisconnectAllRenderConnections(int userId)
508 {
509 HILOG_INFO("userId: %{public}d", userId);
510 auto renderIter = renderInners_.find(userId);
511 if (renderIter != renderInners_.end()) {
512 renderIter->second->DisconnectAllRenderConnections();
513 }
514 auto sandboxIter = sandboxInners_.find(userId);
515 if (sandboxIter != sandboxInners_.end()) {
516 sandboxIter->second->DisconnectAllRenderConnections();
517 }
518 }
519
RerenderAllFormsImmediate(int userId)520 void FormRenderMgr::RerenderAllFormsImmediate(int userId)
521 {
522 HILOG_INFO("userId: %{public}d", userId);
523 auto renderIter = renderInners_.find(userId);
524 if (renderIter != renderInners_.end()) {
525 renderIter->second->RerenderAllFormsImmediate();
526 }
527 auto sandboxIter = sandboxInners_.find(userId);
528 if (sandboxIter != sandboxInners_.end()) {
529 sandboxIter->second->RerenderAllFormsImmediate();
530 }
531 }
532 } // namespace AppExecFwk
533 } // namespace OHOS
534