• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef OHOS_FORM_FWK_FORM_MGR_H
17 #define OHOS_FORM_FWK_FORM_MGR_H
18 
19 #include <mutex>
20 #include <singleton.h>
21 #include <thread>
22 
23 #include "form_callback_interface.h"
24 #include "form_constants.h"
25 #include "form_errors.h"
26 #include "form_death_callback.h"
27 #include "form_info.h"
28 #include "form_instance.h"
29 #include "form_instances_filter.h"
30 #include "form_js_info.h"
31 #include "form_mgr_interface.h"
32 #include "form_provider_data.h"
33 #include "form_provider_data_proxy.h"
34 #include "form_state_info.h"
35 #include "iremote_object.h"
36 #include "want.h"
37 
38 namespace OHOS {
39 namespace AppExecFwk {
40 using OHOS::AAFwk::Want;
41 
42 static volatile int recoverStatus_ = Constants::NOT_IN_RECOVERY;
43 
44 /**
45  * @class FormMgr
46  * FormMgr is used to access form manager services.
47  */
48 class FormMgr final : public DelayedRefSingleton<FormMgr> {
49     DECLARE_DELAYED_REF_SINGLETON(FormMgr)
50 public:
51     DISALLOW_COPY_AND_MOVE(FormMgr);
52 
53     friend class FormMgrDeathRecipient;
54 
55     /**
56      * @brief Register click callback observer.
57      * @param bundleName BundleName of the form host.
58      * @param formEventType Form event type.
59      * @param observer Form click event callback listener.
60      * @return Returns ERR_OK on success, others on failure.
61      */
62     ErrCode RegisterClickEventObserver(
63         const std::string &bundleName, const std::string &formEventType, const sptr<IRemoteObject> &observer);
64 
65     /**
66      * @brief Unregister click callback observer.
67      * @param bundleName BundleName of the form host.
68      * @param formEventType Form event type.
69      * @param observer Form click event callback listener.
70      * @return Returns ERR_OK on success, others on failure.
71      */
72     ErrCode UnregisterClickEventObserver(
73         const std::string &bundleName, const std::string &formEventType, const sptr<IRemoteObject> &observer);
74 
75     /**
76      * @brief Get the error message by error code.
77      * @param errorCode the error code return form fms.
78      * @return Returns the error message detail.
79      */
80     std::string GetErrorMsg(int errorCode);
81 
82     /**
83      * @brief Add form with want, send want to form manager service.
84      * @param formId The Id of the forms to add.
85      * @param want The want of the form to add.
86      * @param callerToken Caller ability token.
87      * @param formInfo Form info.
88      * @return Returns ERR_OK on success, others on failure.
89      */
90     int AddForm(const int64_t formId, const Want &want, const sptr<IRemoteObject> &callerToken,
91         FormJsInfo &formInfo);
92 
93     /**
94      * @brief Delete forms with formIds, send formIds to form manager service.
95      * @param formId The Id of the forms to delete.
96      * @param callerToken Caller ability token.
97      * @return Returns ERR_OK on success, others on failure.
98      */
99     int DeleteForm(const int64_t formId, const sptr<IRemoteObject> &callerToken);
100 
101     /**
102      * @brief Stop rendering form.
103      * @param formId The Id of the forms to delete.
104      * @param compId The compId of the forms to delete.
105      * @return Returns ERR_OK on success, others on failure.
106      */
107     int StopRenderingForm(const int64_t formId, const std::string &compId);
108 
109     /**
110      * @brief Release forms with formIds, send formIds to form manager service.
111      * @param formId The Id of the forms to release.
112      * @param callerToken Caller ability token.
113      * @param delCache Delete Cache or not.
114      * @return Returns ERR_OK on success, others on failure.
115      */
116     int ReleaseForm(const int64_t formId, const sptr<IRemoteObject> &callerToken, const bool delCache);
117 
118     /**
119      * @brief Update form with formId, send formId to form manager service.
120      * @param formId The Id of the form to update.
121      * @param formBindingData Form binding data.
122      * @param std::vector<FormDataProxy> Form proxy vector.
123      * @return Returns ERR_OK on success, others on failure.
124      */
125     int UpdateForm(const int64_t formId, const FormProviderData &formBindingData,
126         const std::vector<FormDataProxy> &formDataProxies = {});
127 
128     /**
129      * @brief Notify the form service that the form user's lifecycle is updated.
130      *
131      * This should be called when form user request form.
132      *
133      * @param formId Indicates the unique id of form.
134      * @param callerToken Indicates the callback remote object of specified form user.
135      * @param want information passed to supplier.
136      * @return Returns ERR_OK on success, others on failure.
137      */
138     int RequestForm(const int64_t formId, const sptr<IRemoteObject> &callerToken, const Want &want);
139 
140     /**
141      * @brief Form visible/invisible notify, send formIds to form manager service.
142      * @param formIds The Id list of the forms to notify.
143      * @param callerToken Caller ability token.
144      * @param formVisibleType The form visible type, including FORM_VISIBLE and FORM_INVISIBLE.
145      * @return Returns ERR_OK on success, others on failure.
146      */
147     int NotifyWhetherVisibleForms(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &callerToken,
148     const int32_t formVisibleType);
149 
150     /**
151      * @brief Release renderer.
152      * @param formId The Id of the forms to release.
153      * @param compId The compId of the forms to release.
154      * @return Returns ERR_OK on success, others on failure.
155      */
156     int ReleaseRenderer(const int64_t formId, const std::string &compId);
157 
158     /**
159      * @brief temp form to normal form.
160      * @param formId The Id of the form.
161      * @param callerToken Caller ability token.
162      * @return None.
163      */
164     int CastTempForm(const int64_t formId, const sptr<IRemoteObject> &callerToken);
165 
166     /**
167      * @brief Dump all of form storage infos.
168      * @param formInfos All of form storage infos.
169      * @return Returns ERR_OK on success, others on failure.
170      */
171     int DumpStorageFormInfos(std::string &formInfos);
172     /**
173      * @brief Dump form info by a bundle name.
174      * @param bundleName The bundle name of form provider.
175      * @param formInfos Form infos.
176      * @return Returns ERR_OK on success, others on failure.
177      */
178     int DumpFormInfoByBundleName(const std::string bundleName, std::string &formInfos);
179     /**
180      * @brief Dump form info by a bundle name.
181      * @param formId The id of the form.
182      * @param formInfo Form info.
183      * @return Returns ERR_OK on success, others on failure.
184      */
185     int DumpFormInfoByFormId(const std::int64_t formId, std::string &formInfo);
186     /**
187      * @brief Dump form timer by form id.
188      * @param formId The id of the form.
189      * @param formInfo Form timer.
190      * @return Returns ERR_OK on success, others on failure.
191      */
192     int DumpFormTimerByFormId(const std::int64_t formId, std::string &isTimingService);
193     /**
194      * @brief Process js message event.
195      * @param formId Indicates the unique id of form.
196      * @param want information passed to supplier.
197      * @param callerToken Caller ability token.
198      * @return Returns ERR_OK on success, others on failure.
199      */
200     int MessageEvent(const int64_t formId, const Want &want, const sptr<IRemoteObject> &callerToken);
201 
202     /**
203      * @brief Process js router event.
204      * @param formId Indicates the unique id of form.
205      * @param want the want of the ability to start.
206      * @param callerToken Caller ability token.
207      * @return Returns ERR_OK on success, others on failure.
208      */
209     int RouterEvent(const int64_t formId, Want &want, const sptr<IRemoteObject> &callerToken);
210 
211     /**
212      * @brief Process Background event.
213      * @param formId Indicates the unique id of form.
214      * @param want the want of the ability to start.
215      * @param callerToken Caller ability token.
216      * @return Returns true if execute success, false otherwise.
217      */
218     int BackgroundEvent(const int64_t formId, Want &want, const sptr<IRemoteObject> &callerToken);
219 
220     /**
221      * @brief Get fms recoverStatus.
222      *
223      * @return The current recover status.
224      */
225     static int GetRecoverStatus();
226 
227     /**
228      * @brief Register death callback.
229      *
230      * @param formDeathCallback The death callback.
231      */
232     void RegisterDeathCallback(const std::shared_ptr<FormCallbackInterface> &formDeathCallback);
233 
234     /**
235      * @brief UnRegister death callback.
236      *
237      * @param formDeathCallback The death callback.
238      */
239     void UnRegisterDeathCallback(const std::shared_ptr<FormCallbackInterface> &formDeathCallback);
240 
241     /**
242      * @brief Set the next refresh time
243      *
244      * @param formId The id of the form.
245      * @param nextTime Next refresh time
246      * @return Returns ERR_OK on success, others on failure.
247      */
248     int SetNextRefreshTime(const int64_t formId, const int64_t nextTime);
249 
250     /**
251      * @brief Request to publish a form to the form host.
252      *
253      * @param want The want of the form to publish.
254      * @param withFormBindingData Indicates whether the formBindingData is carried with.
255      * @param formBindingData Indicates the form data.
256      * @param formId Return the form id to be published.
257      * @return Returns ERR_OK on success, others on failure.
258      */
259     ErrCode RequestPublishForm(Want &want, bool withFormBindingData,
260         std::unique_ptr<FormProviderData> &formBindingData, int64_t &formId,
261         const std::vector<FormDataProxy> &formDataProxies = {});
262 
263     /**
264      * @brief Lifecycle Update.
265      * @param formIds The id of the forms.
266      * @param callerToken Host client.
267      * @param updateType update type, enable if true and disable if false.
268      * @return Returns ERR_OK on success, others on failure.
269      */
270     int LifecycleUpdate(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &callerToken,
271                         bool updateType);
272 
273     /**
274      * @brief Set fms recoverStatus.
275      *
276      * @param recoverStatus The recover status.
277      */
278     static void SetRecoverStatus(int recoverStatus);
279 
280     /**
281      * @brief Set form mgr service for test.
282      */
283     void SetFormMgrService(sptr<IFormMgr> formMgrService);
284 
285     /**
286      * @brief Get death recipient.
287      * @return deathRecipient_.
288      */
289     sptr<IRemoteObject::DeathRecipient> GetDeathRecipient() const;
290 
291     /**
292      * @brief Check whether the specified death callback is registered in form mgr.
293      * @param formDeathCallback The specified death callback for checking.
294      * @return Return true on success, false on failure.
295      */
296     bool CheckIsDeathCallbackRegistered(const std::shared_ptr<FormCallbackInterface> &formDeathCallback);
297 
298     /**
299      * @brief Get the error message content.
300      *
301      * @param errCode Error code.
302      * @return Message content.
303      */
304     std::string GetErrorMessage(int errCode);
305 
306     /**
307      * @brief Delete the invalid forms.
308      * @param formIds Indicates the ID of the valid forms.
309      * @param callerToken Host client.
310      * @param numFormsDeleted Returns the number of the deleted forms.
311      * @return Returns ERR_OK on success, others on failure.
312      */
313     int DeleteInvalidForms(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &callerToken,
314                            int32_t &numFormsDeleted);
315 
316     /**
317      * @brief Acquire form state info by passing a set of parameters (using Want) to the form provider.
318      * @param want Indicates a set of parameters to be transparently passed to the form provider.
319      * @param callerToken Host client.
320      * @param stateInfo Returns the form's state info of the specify.
321      * @return Returns ERR_OK on success, others on failure.
322      */
323     int AcquireFormState(const Want &want, const sptr<IRemoteObject> &callerToken, FormStateInfo &stateInfo);
324 
325     /**
326      * @brief Notify the form is visible or not.
327      * @param formIds Indicates the ID of the forms.
328      * @param isVisible Visible or not.
329      * @param callerToken Host client.
330      * @return Returns ERR_OK on success, others on failure.
331      */
332     int NotifyFormsVisible(const std::vector<int64_t> &formIds, bool isVisible, const sptr<IRemoteObject> &callerToken);
333 
334     /**
335      * @brief Notify the form is privacy protected or not.
336      * @param formIds Indicates the ID of the forms.
337      * @param isProtected isProtected or not.
338      * @param callerToken Host client.
339      * @return Returns ERR_OK on success, others on failure.
340      */
341     int NotifyFormsPrivacyProtected(const std::vector<int64_t> &formIds, bool isProtected,
342                                     const sptr<IRemoteObject> &callerToken);
343 
344     /**
345      * @brief Notify the form is enable to be updated or not.
346      * @param formIds Indicates the ID of the forms.
347      * @param isEnableUpdate enable update or not.
348      * @param callerToken Host client.
349      * @return Returns ERR_OK on success, others on failure.
350      */
351     int NotifyFormsEnableUpdate(const std::vector<int64_t> &formIds, bool isEnableUpdate,
352                                 const sptr<IRemoteObject> &callerToken);
353 
354     /**
355      * @brief Get All FormsInfo.
356      * @param formInfos Return the forms' information of all forms provided.
357      * @return Returns ERR_OK on success, others on failure.
358      */
359     int GetAllFormsInfo(std::vector<FormInfo> &formInfos);
360 
361     /**
362      * @brief Get forms info by bundle name .
363      * @param bundleName Application name.
364      * @param formInfos Return the forms' information of the specify application name.
365      * @return Returns ERR_OK on success, others on failure.
366      */
367     int GetFormsInfoByApp(std::string &bundleName, std::vector<FormInfo> &formInfos);
368 
369     /**
370      * @brief Get forms info by bundle name and module name.
371      * @param bundleName bundle name.
372      * @param moduleName Module name of hap.
373      * @param formInfos Return the forms' information of the specify bundle name and module name.
374      * @return Returns ERR_OK on success, others on failure.
375      */
376     int GetFormsInfoByModule(std::string &bundleName, std::string &moduleName, std::vector<FormInfo> &formInfos);
377 
378     /**
379     * @brief This function is called by formProvider and gets forms info by the bundle name of the calling ability.
380     *        The bundle name will be retrieved by form service manager.
381     * @param filter filter that contains attributes that the formInfos have to have.
382     * @param formInfos Return the forms' information of the calling bundle name
383     * @return Returns ERR_OK on success, others on failure.
384     */
385     int32_t GetFormsInfo(const FormInfoFilter &filter, std::vector<FormInfo> &formInfos);
386 
387     /**
388      * @brief Get all running form infos.
389      * @param isUnusedIncluded Indicates whether to include unused forms.
390      * @param runningFormInfos Return the running forms' infos currently.
391      * @return Returns ERR_OK on success, others on failure.
392      */
393     ErrCode GetRunningFormInfos(bool isUnusedIncluded, std::vector<RunningFormInfo> &runningFormInfos);
394 
395     /**
396      * @brief Get the running form infos by bundle name.
397      * @param bundleName Application name.
398      * @param isUnusedIncluded Indicates whether to include unused forms.
399      * @param runningFormInfos Return the running forms' infos of the specify application name.
400      * @return Returns ERR_OK on success, others on failure.
401      */
402     ErrCode GetRunningFormInfosByBundleName(
403         const std::string &bundleName, bool isUnusedIncluded, std::vector<RunningFormInfo> &runningFormInfos);
404 
405     /**
406      * @brief Check if the request of publishing a form is supported by the host.
407      * @return Returns true if the request is supported and false otherwise.
408      */
409     bool IsRequestPublishFormSupported();
410 
411     /**
412      * @brief Start an ability. This function can only be called by a form extension of a system app.
413      * @param want includes ability name, parameters and relative info sending to an ability.
414      * @param callerToken token of the ability that initially calls this function.
415      * @return Returns ERR_OK on success, others on failure.
416      */
417     int32_t StartAbility(const Want &want, const sptr<IRemoteObject> &callerToken);
418 
419     /**
420      * @brief Share form with formId and remote device id.
421      * @param formId The Id of the forms to share.
422      * @param remoteDeviceId The Id of the remote revice to share.
423      * @param callerToken Indicates the host client.
424      * @param requestCode The request code of this share form.
425      * @return Returns ERR_OK on success, others on failure.
426      */
427     int32_t ShareForm(int64_t formId, const std::string &remoteDeviceId, const sptr<IRemoteObject> &callerToken,
428         int64_t requestCode);
429 
430     /**
431      * @brief Acquire form data by formId.
432      * @param formId The Id of the form to acquire data.
433      * @param requestCode The request code of this acquire form.
434      * @param callerToken Indicates the host client.
435      * @param formData Return the forms' information of customization
436      * @return Returns ERR_OK on success, others on failure.
437      */
438     int32_t AcquireFormData(int64_t formId, int64_t requestCode, const sptr<IRemoteObject> &callerToken,
439          AAFwk::WantParams &formData);
440 
441     /**
442      * @brief Check form manager service ready.
443      *
444      * @return Return true if form manager service ready; returns false otherwise.
445      */
446     bool CheckFMSReady();
447 
448     /**
449      * @brief Registers the callback for publish form. The callback is used to process the publish form request
450      * when the system handler is not found.
451      * @param interceptorCallback The injected callback, should implementation IFormPublishInterceptor.
452      * @return Returns ERR_OK on success, others on failure.
453      */
454     int32_t RegisterPublishFormInterceptor(const sptr<IRemoteObject> &interceptorCallback);
455 
456     /**
457      * @brief Unregisters the callback for publish form. The callback is used to process the publish form request
458      * when the system handler is not found.
459      * @param interceptorCallback The injected callback, should implementation IFormPublishInterceptor.
460      * @return Returns ERR_OK on success, others on failure.
461      */
462     int32_t UnregisterPublishFormInterceptor(const sptr<IRemoteObject> &interceptorCallback);
463 
464     /**
465      * @brief Get external error from innerErrorCode.
466      * @param innerErrorCode innerErrorCode, get from FMS.
467      * @param externalErrorCode output externalErrorCode.
468      * @param errorMsg output errorMsg.
469      */
470     void GetExternalError(int32_t innerErrorCode, int32_t &externalErrorCode, std::string &errorMsg);
471 
472     /**
473      * @brief Get external error message by external error code.
474      *
475      * @param externalErrorCode External error code.
476      * @return External error message.
477      */
478     std::string GetErrorMsgByExternalErrorCode(int32_t externalErrorCode);
479 
480     /**
481      * @brief Register form add observer by bundle.
482      * @param bundleName BundleName of the form host
483      * @param callerToken Caller ability token.
484      * @return Returns ERR_OK on success, others on failure.
485      */
486     ErrCode RegisterFormAddObserverByBundle(const std::string bundleName, const sptr<IRemoteObject> &callerToken);
487 
488     /**
489      * @brief Register form remove observer by bundle.
490      * @param bundleName BundleName of the form host
491      * @param callerToken Caller ability token.
492      * @return Returns ERR_OK on success, others on failure.
493      */
494     ErrCode RegisterFormRemoveObserverByBundle(const std::string bundleName, const sptr<IRemoteObject> &callerToken);
495 
496     /**
497     * @brief get forms count.
498     * @param isTempFormFlag Indicates temp form or not.
499     * @param formCount Returns the number of the cast or temp form.
500     * @return Returns ERR_OK on success, others on failure.
501     */
502     int32_t GetFormsCount(bool isTempFormFlag, int32_t &formCount);
503 
504     /**
505     * @brief get host forms count.
506     * @param bundleName Indicates form host bundleName.
507     * @param formCount Returns the number of the host form.
508     * @return Returns ERR_OK on success, others on failure.
509     */
510     int32_t GetHostFormsCount(std::string &bundleName, int32_t &formCount);
511 
512     /**
513     * @brief Get form instances by filter info.
514     * @param formInstancesFilter includes bundleName, moduleName, formName, abilityName to get formInstances.
515     * @param formInstances return formInstances
516     * @return return ERR_OK on get info success, others on failure.
517     */
518     ErrCode GetFormInstancesByFilter(const FormInstancesFilter &formInstancesFilter,
519         std::vector<FormInstance> &formInstances);
520 
521    /**
522     * @brief Get form instance by formId.
523     * @param formId formId Indicates the unique id of form.
524     * @param formInstance return formInstance
525     * @return return ERR_OK on get info success, others on failure.
526     */
527     ErrCode GetFormInstanceById(const int64_t formId, FormInstance &formInstance);
528 
529     /**
530      * @brief Get form instance by formId, include form store in DB.
531      * @param formId formId Indicates the unique id of form.
532      * @param isUnusedIncluded Indicates whether to include unused form.
533      * @param formInstance return formInstance
534      * @return return ERR_OK on get info success, others on failure.
535      */
536     ErrCode GetFormInstanceById(const int64_t formId, bool isUnusedIncluded, FormInstance &formInstance);
537 
538     /**
539      * @brief Register form add observer.
540      * @param bundleName BundleName of the form host
541      * @param callerToken Caller ability token.
542      * @return Returns ERR_OK on success, others on failure.
543      */
544     ErrCode RegisterAddObserver(const std::string &bundleName, const sptr<IRemoteObject> &callerToken);
545 
546     /**
547      * @brief Register form remove observer.
548      * @param bundleName BundleName of the form host
549      * @param callerToken Caller ability token.
550      * @return Returns ERR_OK on success, others on failure.
551      */
552     ErrCode RegisterRemoveObserver(const std::string &bundleName, const sptr<IRemoteObject> &callerToken);
553 
554     /**
555      * @brief Register form router event proxy.
556      * @param formIds Indicates the ID of the forms.
557      * @param callerToken Router proxy call back client.
558      * @return Returns ERR_OK on success, others on failure.
559      */
560     ErrCode RegisterFormRouterProxy(const std::vector<int64_t> &formIds, const sptr<IRemoteObject> &callerToken);
561 
562     /**
563      * @brief Unregister form router event proxy.
564      * @param formIds Indicates the ID of the forms.
565      * @return Returns ERR_OK on success, others on failure.
566      */
567     ErrCode UnregisterFormRouterProxy(const std::vector<int64_t> &formIds);
568 
569     /**
570      * @brief Set forms recyclable
571      * @param formIds Indicates the id of the forms.
572      * @return Returns ERR_OK on success, others on failure.
573      */
574     int32_t SetFormsRecyclable(const std::vector<int64_t> &formIds);
575 
576     /**
577      * @brief Recycle forms
578      * @param formIds Indicates the id of the forms.
579      * @param want The want of forms to be recycled.
580      * @return Returns ERR_OK on success, others on failure.
581      */
582     int32_t RecycleForms(const std::vector<int64_t> &formIds, const Want &want);
583 
584     /**
585      * @brief Recover recycled forms
586      * @param formIds Indicates the id of the forms.
587      * @param want The want of forms to be recovered.
588      * @return Returns ERR_OK on success, others on failure.
589      */
590     int32_t RecoverForms(const std::vector<int64_t> &formIds, const Want &want);
591 
592 private:
593     /**
594      * @brief Connect form manager service.
595      * @return Returns ERR_OK on success, others on failure.
596      */
597     ErrCode Connect();
598 
599     /**
600     * @brief Reconnect form manager service once per 1000 milliseconds,
601     *        until the connection succeeds or reaching the max retry times.
602     * @return Returns true if execute success, false otherwise.
603     */
604     bool Reconnect();
605     /**
606      * @brief Reset proxy.
607      * @param remote remote object.
608      */
609     void ResetProxy(const wptr<IRemoteObject> &remote);
610 
611     /**
612      * @class FormMgrDeathRecipient
613      * FormMgrDeathRecipient notices IRemoteBroker died.
614      */
615     class FormMgrDeathRecipient : public IRemoteObject::DeathRecipient {
616     public:
617         FormMgrDeathRecipient() = default;
618         ~FormMgrDeathRecipient() = default;
619 
620         /**
621          * @brief Notices IRemoteBroker died.
622          * @param remote remote object.
623          */
624         void OnRemoteDied(const wptr<IRemoteObject> &remote) override;
625     private:
626         DISALLOW_COPY_AND_MOVE(FormMgrDeathRecipient);
627     };
628 
629     std::mutex connectMutex_;
630     sptr<IFormMgr> remoteProxy_;
631 
632     sptr<IRemoteObject::DeathRecipient> deathRecipient_ {nullptr};
633 
634     // True: need to get a new fms remote object,
635     // False: no need to get a new fms remote object.
636     volatile bool resetFlag_ = false;
637 
638     std::vector<std::shared_ptr<FormCallbackInterface>> formDeathCallbacks_;
639 };
640 }  // namespace AppExecFwk
641 }  // namespace OHOS
642 #endif  // OHOS_FORM_FWK_FORM_MGR_H
643