1 /* 2 * Copyright (c) 2021-2022 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 #ifndef OHOS_FORM_FWK_FORM_TASK_MGR_H 17 #define OHOS_FORM_FWK_FORM_TASK_MGR_H 18 19 #include <singleton.h> 20 #include <vector> 21 #include <unordered_map> 22 #include <mutex> 23 24 #include "form_event_handler.h" 25 #include "form_js_info.h" 26 #include "form_record.h" 27 #include "form_host_record.h" 28 #include "form_serial_queue.h" 29 #include "form_state_info.h" 30 #include "iremote_object.h" 31 #include "running_form_info.h" 32 #include "form_mgr_service.h" 33 #include "want.h" 34 35 namespace OHOS { 36 namespace AppExecFwk { 37 using Want = OHOS::AAFwk::Want; 38 using WantParams = OHOS::AAFwk::WantParams; 39 enum class TaskType : int64_t { 40 RECYCLE_FORM, // add form type base 0 41 RENDER_FORM, 42 43 DELETE_FORM_HOST_RECORD = 10000 // add form_host type base 10000 44 }; 45 namespace { 46 constexpr int32_t FORM_TASK_DELAY_TIME = 20; // ms 47 constexpr int32_t FORM_FRS_DIED_TASK_DELAY_TIME = 100; // ms 48 constexpr int32_t FORM_BUILD_DELAY_TIME = 1400; // ms 49 constexpr int32_t ENTERPRISE_APP_INSTALL_FAILED_DELAY_TIME = 5000; // ms 50 constexpr int32_t CLEAN_FORM_HOST_TASK_DELAY_TIME = 100; // ms 51 constexpr int32_t FORM_CON_NETWORK_DELAY_TIME = 500; // ms 52 constexpr int32_t PROVIDER_UPDATE_REFRESH_FORMS_TASK_DELAY_TIME = 500; // ms 53 } 54 /** 55 * @class FormTaskMgr 56 * form task manager. 57 */ 58 class FormTaskMgr final : public DelayedRefSingleton<FormTaskMgr> { 59 DECLARE_DELAYED_REF_SINGLETON(FormTaskMgr) 60 61 public: 62 DISALLOW_COPY_AND_MOVE(FormTaskMgr); 63 64 /** 65 * @brief SetSerialQueue. 66 * @param serialQueue serial queue 67 */ SetSerialQueue(const std::shared_ptr<FormSerialQueue> & serialQueue)68 inline void SetSerialQueue(const std::shared_ptr<FormSerialQueue> &serialQueue) 69 { 70 serialQueue_ = serialQueue; 71 } 72 73 /** 74 * @brief Acquire form data from form provider(task). 75 * @param formId The Id of the form. 76 * @param want The want of the request. 77 * @param remoteObject Form provider proxy object. 78 */ 79 void PostAcquireTask(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 80 81 /** 82 * @brief Acquire share form data from form provider(task). 83 * @param formId The Id of the form. 84 * @param remoteDeviceId The device ID to share. 85 * @param want The want of the request. 86 * @param remoteObject Form provider proxy object. 87 */ 88 void PostShareAcquireTask(int64_t formId, const std::string &remoteDeviceId, const Want &want, 89 const sptr<IRemoteObject> &remoteObject); 90 91 /** 92 * @brief Delete form data from form provider(task). 93 * @param formId The Id of the form. 94 * @param want The want of the request. 95 * @param remoteObject Form provider proxy object. 96 */ 97 void PostDeleteTask(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 98 /** 99 * @brief Notify provider batch delete. 100 * @param formIds The Id list. 101 * @param want The want of the request. 102 * @param remoteObject Form provider proxy object. 103 */ 104 void PostProviderBatchDeleteTask(std::set<int64_t> &formIds, const Want &want, 105 const sptr<IRemoteObject> &remoteObject); 106 /** 107 * @brief Refresh form data from form provider(task). 108 * 109 * @param formId The Id of the form. 110 * @param want The want of the form. 111 * @param remoteObject Form provider proxy object. 112 * @return none. 113 */ 114 void PostRefreshTask(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 115 116 /** 117 * @brief Cast temp form data from form provider(task). 118 * 119 * @param formId The Id of the form. 120 * @param want The want of the request. 121 * @param remoteObject Form provider proxy object. 122 * @return none. 123 */ 124 void PostCastTempTask(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 125 126 /** 127 * @brief Post form data to form host(task) when acquire form. 128 * @param formId The Id of the form. 129 * @param record form record. 130 * @param remoteObject Form provider proxy object. 131 */ 132 void PostAcquireTaskToHost(const int64_t formId, const FormRecord &record, const sptr<IRemoteObject> &remoteObject); 133 134 /** 135 * @brief Post form data to form host(task) when update form. 136 * @param formId The Id of the form. 137 * @param record form record. 138 * @param remoteObject Form provider proxy object. 139 */ 140 void PostUpdateTaskToHost(const int64_t formId, const FormRecord &record, const sptr<IRemoteObject> &remoteObject); 141 142 /** 143 * @brief Handel form host died(task). 144 * @param remoteHost Form host proxy object. 145 */ 146 void PostHostDiedTask(const sptr<IRemoteObject> &remoteHost); 147 148 /** 149 * @brief Post event notify to form provider. 150 * 151 * @param formEvent The vector of form ids. 152 * @param formVisibleType The form visible type, including FORM_VISIBLE and FORM_INVISIBLE. 153 * @param want The want of the form. 154 * @param remoteObject The form provider proxy object. 155 */ 156 void PostEventNotifyTask(const std::vector<int64_t> &formEvent, const int32_t formVisibleType, const Want &want, 157 const sptr<IRemoteObject> &remoteObject); 158 159 /** 160 * @brief Post message event to form provider. 161 * @param formId The Id of the from. 162 * @param message Event message. 163 * @param want The want of the request. 164 * @param remoteObject Form provider proxy object. 165 */ 166 void PostFormEventTask(const int64_t formId, const std::string &message, const Want &want, 167 const sptr<IRemoteObject> &remoteObject); 168 169 /** 170 * @brief Post acquire state to form provider. 171 * @param wantArg The want of onAcquireFormState. 172 * @param provider The provider info. 173 * @param want The want of the request. 174 * @param remoteObject Form provider proxy object. 175 */ 176 void PostAcquireStateTask(const Want &wantArg, const std::string &provider, const Want &want, 177 const sptr <IRemoteObject> &remoteObject); 178 179 /** 180 * @brief Post acquire data to form provider. 181 * @param formId The Id of the from. 182 * @param want The want of the request. 183 * @param remoteObject Form provider proxy object. 184 */ 185 void PostAcquireDataTask(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 186 187 /** 188 * @brief Post uninstall message to form host(task). 189 * @param formIds The Id list of the forms. 190 * @param remoteObject Form provider proxy object. 191 */ 192 void PostUninstallTaskToHost(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &remoteObject); 193 194 /** 195 * @brief Post acquire form state message to form host(task). 196 * @param state The form state. 197 * @param want The want of onAcquireFormState. 198 * @param remoteObject Form provider proxy object. 199 */ 200 void PostAcquireStateTaskToHost(AppExecFwk::FormState state, const AAFwk::Want &want, 201 const sptr<IRemoteObject> &remoteObject); 202 203 /** 204 * @brief Post acquire form data message to form host(task). 205 * @param wantParams Indicates the data information acquired by the form. 206 * @param requestCode Indicates the requested id. 207 * @param remoteObject Form provider proxy object. 208 */ 209 void PostAcquireDataTaskToHost(const AAFwk::WantParams &wantParams, int64_t requestCode, 210 const sptr<IRemoteObject> &remoteObject); 211 212 /** 213 * @brief Post form share error code to form host(task). 214 * @param formShareRequestCode The request code for this share. 215 * @param result The error code of this share. 216 */ 217 void PostFormShareSendResponse(int64_t formShareRequestCode, int32_t result); 218 219 void PostRenderForm(const FormRecord &formRecord, const Want &want, const sptr<IRemoteObject> &remoteObject); 220 221 void PostStopRenderingForm(const FormRecord &formRecord, const Want &want, const sptr<IRemoteObject> &remoteObject); 222 223 void PostReloadForm(const std::vector<FormRecord> &&formRecords, const Want &want, 224 const sptr<IRemoteObject> &remoteObject); 225 226 void PostAddTaskToHost(const std::string bundleName, const sptr<IRemoteObject> &remoteObject, 227 const RunningFormInfo &runningFormInfo); 228 229 void PostRouterProxyToHost(const int64_t formId, const sptr<IRemoteObject> &remoteObject, const Want &want); 230 231 void PostRemoveTaskToHost(const std::string bundleName, const sptr<IRemoteObject> &remoteObject, 232 const RunningFormInfo &runningFormInfo); 233 234 void PostEnterpriseAppInstallFailedRetryTask(const int64_t formId, const Want &want, bool isVisibleToFresh); 235 236 void PostReleaseRenderer(int64_t formId, const std::string &compId, const std::string &uid, 237 const sptr<IRemoteObject> &remoteObject, bool isDynamic = true); 238 239 void PostOnUnlock(const sptr<IRemoteObject> &remoteObject); 240 241 void PostSetVisibleChange(int64_t formId, bool isVisible, const sptr<IRemoteObject> &remoteObject); 242 243 /** 244 * @brief Post Form visible/invisible notify. 245 * @param formIds the Ids of forms need to notify. 246 * @param formInstanceMaps formInstances for visibleNotify. 247 * @param eventMaps eventMaps for event notify. 248 * @param formVisibleType The form visible type, including FORM_VISIBLE and FORM_INVISIBLE. 249 * @param visibleNotifyDelay delay time. 250 * @param callerToken Caller ability token. 251 */ 252 void PostVisibleNotify(const std::vector<int64_t> &formIds, 253 std::map<std::string, std::vector<FormInstance>> &formInstanceMaps, 254 std::map<std::string, std::vector<int64_t>> &eventMaps, 255 const int32_t formVisibleType, int32_t visibleNotifyDelay, 256 const sptr<IRemoteObject> &callerToken); 257 258 /** 259 * @brief Post form click event. 260 * @param bundleName BundleName of the form host 261 * @param formEventType form event type. 262 * @param remoteObject thr remote observer. 263 * @param runningFormInfo Current form data. 264 */ 265 void PostFormClickEventToHost( 266 const std::string &bundleName, const std::string &formEventType, const sptr<IRemoteObject> &remoteObject, 267 const RunningFormInfo &runningFormInfo); 268 269 /** 270 * @brief Post recycle forms. 271 * @param formIds the Ids of forms to be recycled. 272 * @param want The want of the request. 273 * @param remoteObjectOfHost Form host proxy object. 274 * @param remoteObjectOfRender Form render proxy object. 275 */ 276 void PostRecycleForms(const std::vector<int64_t> &formIds, const Want &want, 277 const sptr<IRemoteObject> &remoteObjectOfHost, const sptr<IRemoteObject> &remoteObjectOfRender); 278 279 /** 280 * @brief Post recover form. 281 * @param formIds the Id of form to be recovered. 282 * @param want The want of the request. 283 * @param remoteObject Form render proxy object. 284 */ 285 void PostRecoverForm(const FormRecord &record, const Want &want, const sptr<IRemoteObject> &remoteObject); 286 287 void PostUpdateFormSize(const int64_t &formId, float width, float height, float borderWidth, 288 const std::string &uid, const sptr<IRemoteObject> &remoteObject); 289 290 void UpdateFormSize(const int64_t &formId, float width, float height, float borderWidth, const std::string &uid, 291 const sptr<IRemoteObject> &remoteObject); 292 293 /** 294 * @brief post delay RecheckWhetherNeedCleanFormHost task. 295 * @param callerUid The calleruid of FormHostRecord of vector<FormHostRecord> clientRecords_. 296 * @param remoteObjectOfHost The client stub of the form host record. 297 */ 298 void PostDelayRecheckWhetherNeedCleanFormHostTask( 299 const int callerUid, const sptr<IRemoteObject> &remoteObjectOfHost); 300 301 /** 302 * @brief Cancel delay task. 303 * @param eventMsg Delay Task. 304 */ 305 void CancelDelayTask(const std::pair<int64_t, int64_t> &eventMsg); 306 307 /** 308 * @brief Post BatchRefresh forms. 309 * @param formRefreshType batch refresh forms type. 310 */ 311 void PostBatchRefreshForms(const int32_t formRefreshType); 312 313 /** 314 * @brief Post enable form task. 315 * @param formIds formIds The Id list of the forms. 316 * @param enable True or false. 317 * @param remoteObject Form host proxy object. 318 */ 319 void PostEnableFormsTaskToHost(const std::vector<int64_t> &formIds, const bool enable, 320 const sptr<IRemoteObject> &remoteObject); 321 322 /** 323 * @brief Post lock form task. 324 * @param formIds formIds The Id list of the forms. 325 * @param lock True or false. 326 * @param remoteObject Form host proxy object. 327 */ 328 void PostLockFormsTaskToHost(const std::vector<int64_t> &formIds, const bool lock, 329 const sptr<IRemoteObject> &remoteObject); 330 331 /** 332 * @brief Post task to excute. 333 * @param func Task function. 334 * @param delayMs Task excute delay time(ms). 335 */ 336 void PostTask(const std::function<void()> &func, uint64_t delayMs = FORM_TASK_DELAY_TIME); 337 338 /** 339 * @brief Post re-add form task to form host when FormRenderService is died. 340 * @param remoteObject Form host proxy object. 341 */ 342 void PostFrsDiedTaskToHost(const sptr<IRemoteObject> &remoteObject); 343 344 /** 345 * @brief Post task to connect NetWork. 346 */ 347 void PostConnectNetWork(); 348 349 /** 350 * @brief Post delay refresh forms task when provider update. 351 * @param updatedForms Need refresh forms. 352 * @param want The want of the request. 353 */ 354 void PostDelayRefreshForms(const std::vector<FormRecord> updatedForms, const Want &want); 355 356 private: 357 /** 358 * @brief Acquire form data from form provider. 359 * @param formId The Id of the from. 360 * @param want The want of the request. 361 * @param remoteObject Form provider proxy object. 362 */ 363 void AcquireProviderFormInfo(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 364 365 /** 366 * @brief Acquire share form data from form provider(task). 367 * @param formId The Id of the form. 368 * @param remoteDeviceId The device ID to share. 369 * @param want The want of the request. 370 * @param remoteObject Form provider proxy object. 371 */ 372 void AcquireShareFormData(int64_t formId, const std::string &remoteDeviceId, const Want &want, 373 const sptr<IRemoteObject> &remoteObject); 374 375 /** 376 * @brief Notify form provider for delete form. 377 * @param formId The Id of the from. 378 * @param want The want of the form. 379 * @param remoteObject Form provider proxy object. 380 */ 381 void NotifyFormDelete(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 382 383 /** 384 * @brief Notify form provider for updating form. 385 * @param formId The Id of the from. 386 * @param want The want of the form. 387 * @param remoteObject Form provider proxy object. 388 */ 389 void NotifyFormUpdate(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 390 391 /** 392 * @brief Event notify to form provider. 393 * 394 * @param formEvents The vector of form ids. 395 * @param formVisibleType The form visible type, including FORM_VISIBLE and FORM_INVISIBLE. 396 * @param want The want of the form. 397 * @param remoteObject The form provider proxy object. 398 */ 399 void EventNotify(const std::vector<int64_t> &formEvents, const int32_t formVisibleType, const Want &want, 400 const sptr<IRemoteObject> &remoteObject); 401 402 /** 403 * @brief Notify form provider for cast temp form. 404 * 405 * @param formId The Id of the from. 406 * @param want The want of the form. 407 * @param remoteObject Form provider proxy object. 408 * @return none. 409 */ 410 void NotifyCastTemp(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 411 /** 412 * @brief Post form data to form host when acquire form.. 413 * @param formId The Id of the form. 414 * @param record form record. 415 * @param remoteObject Form provider proxy object. 416 */ 417 void AcquireTaskToHost(const int64_t formId, const FormRecord &record, const sptr<IRemoteObject> &remoteObject); 418 419 /** 420 * @brief Post form data to form host when update form. 421 * @param formId The Id of the form. 422 * @param record form record. 423 * @param remoteObject Form provider proxy object. 424 */ 425 void UpdateTaskToHost(const int64_t formId, const FormRecord &record, const sptr<IRemoteObject> &remoteObject); 426 427 /** 428 * @brief Handle form host died. 429 * @param remoteHost Form host proxy object. 430 */ 431 void HostDied(const sptr<IRemoteObject> &remoteHost); 432 433 /** 434 * @brief Post provider batch delete. 435 * @param formIds The Id list. 436 * @param want The want of the request. 437 * @param remoteObject Form provider proxy object. 438 */ 439 void ProviderBatchDelete(std::set<int64_t> &formIds, const Want &want, const sptr<IRemoteObject> &remoteObject); 440 /** 441 * @brief Fire message event to form provider. 442 * @param formId The Id of the from. 443 * @param message Event message. 444 * @param want The want of the request. 445 * @param remoteObject Form provider proxy object. 446 */ 447 void FireFormEvent(const int64_t formId, const std::string &message, const Want &want, 448 const sptr<IRemoteObject> &remoteObject); 449 450 /** 451 * @brief Acquire form state to form provider. 452 * @param wantArg The want of onAcquireFormState. 453 * @param provider The provider info. 454 * @param want The want of the request. 455 * @param remoteObject Form provider proxy object. 456 */ 457 void AcquireState(const Want &wantArg, const std::string &provider, const Want &want, 458 const sptr <IRemoteObject> &remoteObject); 459 /** 460 * @brief Handle acquire data. 461 * @param wantParams Indicates the data information acquired by the form. 462 * @param requestCode Indicates the requested id. 463 * @param remoteObject Form provider proxy object. 464 */ 465 void AcquireFormDataBack(const AAFwk::WantParams &wantParams, int64_t requestCode, 466 const sptr<IRemoteObject> &remoteObject); 467 468 /** 469 * @brief Acquire form data to form provider. 470 * @param formId The Id of the form. 471 * @param want The want of the request. 472 * @param remoteObject Form provider proxy object. 473 */ 474 void AcquireFormData(const int64_t formId, const Want &want, const sptr<IRemoteObject> &remoteObject); 475 476 /** 477 * @brief Handle uninstall message. 478 * @param formIds The Id list of the forms. 479 * @param remoteObject Form provider proxy object. 480 */ 481 void FormUninstall(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &remoteObject); 482 483 /** 484 * @brief Handle acquire state. 485 * @param state the form state. 486 * @param want The want of onAcquireFormState. 487 * @param remoteObject Form provider proxy object. 488 */ 489 void AcquireStateBack(AppExecFwk::FormState state, const AAFwk::Want &want, 490 const sptr <IRemoteObject> &remoteObject); 491 492 /** 493 * @brief Create form data for form host. 494 * @param formId The Id of the form. 495 * @param record Form record. 496 * @return Form data. 497 */ 498 FormJsInfo CreateFormJsInfo(const int64_t formId, const FormRecord &record); 499 500 /** 501 * @brief Post form share error code to form host(task). 502 * @param formShareRequestCode The request code for this share. 503 * @param result The error code of this share. 504 */ 505 void FormShareSendResponse(int64_t formShareRequestCode, int32_t result); 506 507 /** 508 * @brief Post form share error code to form host(task). 509 * @param formShareRequestCode The request code for this share. 510 * @param result The error code of this share. 511 */ 512 void RenderForm(const FormRecord &formRecord, const Want &want, const sptr<IRemoteObject> &remoteObject); 513 514 void StopRenderingForm(const FormRecord &formRecord, const Want &want, const sptr<IRemoteObject> &remoteObject); 515 516 void ReloadForm(const std::vector<FormRecord> &&formRecords, const Want &want, 517 const sptr<IRemoteObject> &remoteObject); 518 519 void FormAdd(const std::string bundleName, const sptr<IRemoteObject> &remoteObject, 520 const RunningFormInfo &runningFormInfo); 521 522 void FormRemove(const std::string bundleName, const sptr<IRemoteObject> &remoteObject, 523 const RunningFormInfo &runningFormInfo); 524 525 void ReleaseRenderer( 526 int64_t formId, const std::string &compId, const std::string &uid, const sptr<IRemoteObject> &remoteObject); 527 528 void OnUnlock(const sptr<IRemoteObject> &remoteObject); 529 530 void SetVisibleChange(int64_t formId, bool isVisible, const sptr<IRemoteObject> &remoteObject); 531 532 void RemoveConnection(int32_t connectId); 533 534 /** 535 * @brief Form router event proxy. 536 * @param formId The id of the form. 537 * @param remoteObject Form router proxy manager object. 538 * @param want The want of the form for router event. 539 */ 540 void FormRouterEventProxy(const int64_t formId, const sptr<IRemoteObject> &remoteObject, const Want &want); 541 542 /** 543 * @brief Form visible/invisible notify. 544 * @param formIds the Ids of forms need to notify. 545 * @param formInstanceMaps formInstances for visibleNotify. 546 * @param eventMaps eventMaps for event notify. 547 * @param formVisibleType The form visible type, including FORM_VISIBLE and FORM_INVISIBLE. 548 * @param callerToken Caller ability token. 549 */ 550 void NotifyVisible(const std::vector<int64_t> &formIds, 551 std::map<std::string, std::vector<FormInstance>> formInstanceMaps, 552 std::map<std::string, std::vector<int64_t>> eventMaps, const int32_t formVisibleType, 553 const sptr<IRemoteObject> &callerToken); 554 555 /** 556 * @brief Handle recycle form message. 557 * @param formId The Id of form to be recycled. 558 * @param remoteObjectOfHost Form host proxy object. 559 * @param remoteObjectOfRender Form render proxy object. 560 */ 561 void RecycleForm(const int64_t &formId, const sptr<IRemoteObject> &remoteObjectOfHost, 562 const sptr<IRemoteObject> &remoteObjectOfRender); 563 564 /** 565 * @brief Handle recover form message. 566 * @param formId The Id of form to be recovered. 567 * @param want The want of the request. 568 * @param remoteObject Form render proxy object. 569 */ 570 void RecoverForm(const FormRecord &record, const Want &want, const sptr<IRemoteObject> &remoteObject); 571 572 /** 573 * @brief Notify remote observer form click event. 574 * @param bundleName BundleName of the form host 575 * @param formEventType form event type. 576 * @param remoteObject thr remote observer. 577 * @param runningFormInfo Current form data. 578 */ 579 void FormClickEvent(const std::string &bundleName, const std::string &formEventType, 580 const sptr<IRemoteObject> &remoteObject, const RunningFormInfo &runningFormInfo); 581 582 /** 583 * @brief Enable form or disable form. 584 * @param formIds formIds The Id list of the forms. 585 * @param enable True or false. 586 * @param remoteObject Form host proxy object. 587 */ 588 void EnableFormsTaskToHost(const std::vector<int64_t> &formIds, const bool enable, 589 const sptr<IRemoteObject> &remoteObject); 590 591 /** 592 * @brief Lock form or unlock form. 593 * @param formIds formIds The Id list of the forms. 594 * @param lock True or false. 595 * @param remoteObject Form host proxy object. 596 */ 597 void LockFormsTaskToHost(const std::vector<int64_t> &formIds, const bool lock, 598 const sptr<IRemoteObject> &remoteObject); 599 600 /** 601 * @brief Post re-add form task to form host when FormRenderService is died. 602 * @param remoteObject Form host proxy object. 603 */ 604 void FrsDiedTaskToHost(const sptr<IRemoteObject> &remoteObject); 605 606 /** 607 * @brief Post task to connect NetWork. 608 */ 609 void ConnectNetWork(); 610 611 void InnerPostRenderForm(const FormRecord &formRecord, const Want &want, 612 const sptr<IRemoteObject> &remoteObject); 613 private: 614 std::mutex formRecoverTimesMutex_; 615 std::unordered_map<int64_t, int64_t> formLastRecoverTimes; 616 std::shared_ptr<FormSerialQueue> serialQueue_ = nullptr; 617 }; 618 } // namespace AppExecFwk 619 } // namespace OHOS 620 #endif // OHOS_FORM_FWK_FORM_TASK_MGR_H 621