1 /* 2 * Copyright (c) 2021-2024 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_ABILITY_RUNTIME_APP_MGR_PROXY_H 17 #define OHOS_ABILITY_RUNTIME_APP_MGR_PROXY_H 18 19 #include "app_jsheap_mem_info.h" 20 #include "app_malloc_info.h" 21 #include "app_mgr_interface.h" 22 #include "bundle_info.h" 23 #include "iremote_proxy.h" 24 #include "memory_level_info.h" 25 #include "running_process_info.h" 26 #include "want.h" 27 28 namespace OHOS { 29 namespace AppExecFwk { 30 class AppMgrProxy : public IRemoteProxy<IAppMgr> { 31 public: 32 explicit AppMgrProxy(const sptr<IRemoteObject> &impl); 33 virtual ~AppMgrProxy() = default; 34 35 /** 36 * AttachApplication, call AttachApplication() through proxy object, 37 * get all the information needed to start the Application (data related to the Application ). 38 * 39 * @param app, information needed to start the Application. 40 * @return 41 */ 42 virtual void AttachApplication(const sptr<IRemoteObject> &obj) override; 43 44 /** 45 * Preload application. 46 * 47 * @param bundleName The bundle name of the application to preload. 48 * @param userId Indicates the user identification. 49 * @param preloadMode Preload application mode. 50 * @param appIndex The index of application clone. 51 * @return Returns ERR_OK on success, others on failure. 52 */ 53 virtual int32_t PreloadApplication(const std::string &bundleName, int32_t userId, 54 AppExecFwk::PreloadMode preloadMode, int32_t appIndex = 0) override; 55 56 /** 57 * ApplicationForegrounded, call ApplicationForegrounded() through proxy object, 58 * set the application to Foreground State. 59 * 60 * @param recordId, a unique record that identifies this Application from others. 61 * @return 62 */ 63 virtual void ApplicationForegrounded(const int32_t recordId) override; 64 65 /** 66 * ApplicationBackgrounded, call ApplicationBackgrounded() through proxy object, 67 * set the application to Backgrounded State. 68 * 69 * @param recordId, a unique record that identifies this Application from others. 70 * @return 71 */ 72 virtual void ApplicationBackgrounded(const int32_t recordId) override; 73 74 /** 75 * ApplicationTerminated, call ApplicationTerminated() through proxy object, 76 * terminate the application. 77 * 78 * @param recordId, a unique record that identifies this Application from others. 79 * @return 80 */ 81 virtual void ApplicationTerminated(const int32_t recordId) override; 82 83 /** 84 * AbilityCleaned,call through AbilityCleaned() proxy project, clean Ability record. 85 * 86 * @param token, a unique record that identifies AbilityCleaned from others. 87 * @return 88 */ 89 virtual void AbilityCleaned(const sptr<IRemoteObject> &token) override; 90 91 /** 92 * GetAmsMgr, call GetAmsMgr() through proxy object, get AMS interface instance. 93 * 94 * @return sptr<IAmsMgr>, return to AMS interface instance. 95 */ 96 virtual sptr<IAmsMgr> GetAmsMgr() override; 97 98 /** 99 * ClearUpApplicationData, call ClearUpApplicationData() through proxy project, 100 * clear the application data. 101 * 102 * @param bundleName, bundle name in Application record. 103 * @param appCloneIndex the app clone id. 104 * @param userId the user id. 105 * @return ErrCode 106 */ 107 virtual int32_t ClearUpApplicationData(const std::string &bundleName, int32_t appCloneIndex, 108 int32_t userId = -1) override; 109 110 /** 111 * ClearUpApplicationData, call ClearUpApplicationData() through proxy project, 112 * clear the application data. 113 * 114 * @param bundleName, bundle name in Application record. 115 * @return 116 */ 117 virtual int32_t ClearUpApplicationDataBySelf(int32_t userId = -1) override; 118 119 /** 120 * GetAllRunningProcesses, call GetAllRunningProcesses() through proxy project. 121 * Obtains information about application processes that are running on the device. 122 * 123 * @param info, app name in Application record. 124 * @return ERR_OK ,return back success,others fail. 125 */ 126 virtual int32_t GetAllRunningProcesses(std::vector<RunningProcessInfo> &info) override; 127 128 /** 129 * GetALLRunningMultiAppInfo, call GetALLRunningMultiAppInfo() through proxy project. 130 * Obtains information about multiapp that are running on the device. 131 * 132 * @param info, app name in multiappinfo. 133 * @return ERR_OK ,return back success,others fail. 134 */ 135 virtual int32_t GetRunningMultiAppInfoByBundleName(const std::string &bundleName, 136 RunningMultiAppInfo &info) override; 137 138 /** 139 * GetRunningProcessesByBundleType, call GetRunningProcessesByBundleType() through proxy project. 140 * Obtains information about application processes by bundle type that are running on the device. 141 * 142 * @param bundleType, bundle type of the processes 143 * @param info, app name in Application record. 144 * @return ERR_OK ,return back success,others fail. 145 */ 146 virtual int GetRunningProcessesByBundleType(const BundleType bundleType, 147 std::vector<RunningProcessInfo> &info) override; 148 149 /** 150 * GetAllRenderProcesses, call GetAllRenderProcesses() through proxy project. 151 * Obtains information about render processes that are running on the device. 152 * 153 * @param info, render process info. 154 * @return ERR_OK, return back success, others fail. 155 */ 156 virtual int32_t GetAllRenderProcesses(std::vector<RenderProcessInfo> &info) override; 157 158 /** 159 * GetAllChildrenProcesses, call GetAllChildrenProcesses() through proxy project. 160 * Obtains information about children processes that are running on the device. 161 * 162 * @param info, child process info. 163 * @return ERR_OK, return back success, others fail. 164 */ 165 virtual int GetAllChildrenProcesses(std::vector<ChildProcessInfo> &info) override; 166 167 /** 168 * JudgeSandboxByPid, call JudgeSandboxByPid() through proxy project. 169 * Obtains information about application processes that are running on the device. 170 * 171 * @param pid, the pid of current app running record. 172 * @param isSandbox, current app is or not a sandbox. 173 * @return ERR_OK ,return back success,others fail. 174 */ 175 virtual int32_t JudgeSandboxByPid(pid_t pid, bool &isSandbox) override; 176 177 /** 178 * GetProcessRunningInfosByUserId, call GetProcessRunningInfosByUserId() through proxy project. 179 * Obtains information about application processes that are running on the device. 180 * 181 * @param info, app name in Application record. 182 * @return ERR_OK ,return back success,others fail. 183 */ 184 virtual int32_t GetProcessRunningInfosByUserId(std::vector<RunningProcessInfo> &info, int32_t userId) override; 185 186 /** 187 * GetProcessRunningInformation, call GetProcessRunningInformation() through proxy project. 188 * Obtains information about current application process which is running on the device. 189 * 190 * @param info, app name in Application record. 191 * @return ERR_OK ,return back success,others fail. 192 */ 193 virtual int32_t GetProcessRunningInformation(RunningProcessInfo &info) override; 194 195 /** 196 * NotifyMemoryLevel, call NotifyMemoryLevel() through proxy project. 197 * Notify abilities background the current memory level. 198 * 199 * @param level, the current memory level 200 * @return ERR_OK ,return back success,others fail. 201 */ 202 virtual int32_t NotifyMemoryLevel(int32_t level) override; 203 204 /** 205 * NotifyProcMemoryLevel, call NotifyMemoryLevel() through proxy project. 206 * Notify abilities the current memory level. 207 * 208 * @param procLevelMap ,<pid, level> map; 209 * @return ERR_OK ,return back success,others fail. 210 */ 211 virtual int32_t NotifyProcMemoryLevel(const std::map<pid_t, MemoryLevel> &procLevelMap) override; 212 213 /** 214 * DumpHeapMemory, call DumpHeapMemory() through proxy project. 215 * Get the application's memory allocation info. 216 * 217 * @param pid, pid input. 218 * @param mallocInfo, dynamic storage information output. 219 * @return ERR_OK ,return back success,others fail. 220 */ 221 virtual int32_t DumpHeapMemory(const int32_t pid, OHOS::AppExecFwk::MallocInfo &mallocInfo) override; 222 223 /** 224 * DumpJsHeapMemory, call DumpJsHeapMemory() through proxy project. 225 * triggerGC and dump the application's jsheap memory info. 226 * 227 * @param info, pid tid needGc needSnapshot 228 * @return ERR_OK ,return back success, others fail. 229 */ 230 virtual int32_t DumpJsHeapMemory(OHOS::AppExecFwk::JsHeapDumpInfo &info) override; 231 232 /** 233 * Notify that the ability stage has been updated 234 * @param recordId, the app record. 235 */ 236 virtual void AddAbilityStageDone(const int32_t recordId) override; 237 238 /** 239 * Start a resident process 240 */ 241 virtual void StartupResidentProcess(const std::vector<AppExecFwk::BundleInfo> &bundleInfos) override; 242 243 /** 244 * Register application or process state observer. 245 * @param observer, ability token. 246 * @return Returns ERR_OK on success, others on failure. 247 */ 248 virtual int32_t RegisterApplicationStateObserver(const sptr<IApplicationStateObserver> &observer, 249 const std::vector<std::string> &bundleNameList = {}) override; 250 251 /** 252 * Unregister application or process state observer. 253 * @param observer, ability token. 254 * @return Returns ERR_OK on success, others on failure. 255 */ 256 virtual int32_t UnregisterApplicationStateObserver(const sptr<IApplicationStateObserver> &observer) override; 257 258 /** 259 * Register application or process state observer. 260 * @param observer, Is ability foreground state observer 261 * @return Returns ERR_OK on success, others on failure. 262 */ 263 int32_t RegisterAbilityForegroundStateObserver(const sptr<IAbilityForegroundStateObserver> &observer) override; 264 265 /** 266 * Unregister application or process state observer. 267 * @param observer, Is ability foreground state observer 268 * @return Returns ERR_OK on success, others on failure. 269 */ 270 int32_t UnregisterAbilityForegroundStateObserver(const sptr<IAbilityForegroundStateObserver> &observer) override; 271 272 /** 273 * Get foreground applications. 274 * @param list, foreground apps. 275 * @return Returns ERR_OK on success, others on failure. 276 */ 277 virtual int32_t GetForegroundApplications(std::vector<AppStateData> &list) override; 278 279 /** 280 * Start user test process. 281 * @param want, want object. 282 * @param observer, test observer remote object. 283 * @param bundleInfo, bundle info. 284 * @param userId the user id. 285 * @return Returns ERR_OK on success, others on failure. 286 */ 287 virtual int StartUserTestProcess(const AAFwk::Want &want, const sptr<IRemoteObject> &observer, 288 const BundleInfo &bundleInfo, int32_t userId) override; 289 290 /** 291 * @brief Finish user test. 292 * @param msg user test message. 293 * @param resultCode user test result Code. 294 * @param bundleName user test bundleName. 295 * 296 * @return Returns ERR_OK on success, others on failure. 297 */ 298 virtual int FinishUserTest( 299 const std::string &msg, const int64_t &resultCode, const std::string &bundleName) override; 300 301 virtual void ScheduleAcceptWantDone( 302 const int32_t recordId, const AAFwk::Want &want, const std::string &flag) override; 303 304 virtual void ScheduleNewProcessRequestDone( 305 const int32_t recordId, const AAFwk::Want &want, const std::string &flag) override; 306 307 /** 308 * Get the token of ability records by process ID. 309 * 310 * @param pid The process id. 311 * @param tokens The token of ability records. 312 * @return Returns true on success, others on failure. 313 */ 314 virtual int GetAbilityRecordsByProcessID(const int pid, std::vector<sptr<IRemoteObject>> &tokens) override; 315 316 /** 317 * Prestart nwebspawn process. 318 * 319 * @return Returns ERR_OK on success, others on failure. 320 */ 321 virtual int PreStartNWebSpawnProcess() override; 322 323 /** 324 * Start nweb render process, called by nweb host. 325 * 326 * @param renderParam, params passed to renderprocess. 327 * @param ipcFd, ipc file descriptior for web browser and render process. 328 * @param sharedFd, shared memory file descriptior. 329 * @param crashFd, crash signal file descriptior. 330 * @param renderPid, created render pid. 331 * @param isGPU, is or not GPU process 332 * @return Returns ERR_OK on success, others on failure. 333 */ 334 virtual int StartRenderProcess(const std::string &renderParam, 335 int32_t ipcFd, int32_t sharedFd, 336 int32_t crashFd, pid_t &renderPid, bool isGPU = false) override; 337 338 /** 339 * Render process call this to attach app manager service. 340 * 341 * @param renderApp, information needed to start the Application. 342 */ 343 virtual void AttachRenderProcess(const sptr<IRemoteObject> &renderApp) override; 344 345 /** 346 * Get render process termination status, called by nweb host. 347 * 348 * @param renderPid, target render pid. 349 * @param status, termination status of the render process. 350 * @return Returns ERR_OK on success, others on failure. 351 */ 352 virtual int GetRenderProcessTerminationStatus(pid_t renderPid, int &status) override; 353 354 /** 355 * Notify Fault Data 356 * 357 * @param faultData the fault data. 358 * @return Returns ERR_OK on success, others on failure. 359 */ 360 virtual int32_t NotifyAppFault(const FaultData &faultData) override; 361 362 /** 363 * Notify App Fault Data By SA 364 * 365 * @param faultData the fault data notified by SA. 366 * @return Returns ERR_OK on success, others on failure. 367 */ 368 virtual int32_t NotifyAppFaultBySA(const AppFaultDataBySA &faultData) override; 369 370 /** 371 * Set Appfreeze Detect Filter 372 * 373 * @param pid the process pid. 374 * @return Returns true on success, others on failure. 375 */ 376 virtual bool SetAppFreezeFilter(int32_t pid) override; 377 378 virtual int32_t GetConfiguration(Configuration& config) override; 379 380 virtual int32_t UpdateConfiguration(const Configuration &config, const int32_t userId = -1) override; 381 382 virtual int32_t UpdateConfigurationByBundleName(const Configuration &config, const std::string &name) override; 383 384 virtual int32_t RegisterConfigurationObserver(const sptr<IConfigurationObserver> &observer) override; 385 386 virtual int32_t UnregisterConfigurationObserver(const sptr<IConfigurationObserver> &observer) override; 387 388 bool GetAppRunningStateByBundleName(const std::string &bundleName) override; 389 390 int32_t NotifyLoadRepairPatch(const std::string &bundleName, const sptr<IQuickFixCallback> &callback) override; 391 392 int32_t NotifyHotReloadPage(const std::string &bundleName, const sptr<IQuickFixCallback> &callback) override; 393 394 int32_t NotifyUnLoadRepairPatch(const std::string &bundleName, const sptr<IQuickFixCallback> &callback) override; 395 396 #ifdef BGTASKMGR_CONTINUOUS_TASK_ENABLE 397 int32_t SetContinuousTaskProcess(int32_t pid, bool isContinuousTask) override; 398 #endif 399 400 /** 401 * @brief Check whether the shared bundle is running. 402 * 403 * @param bundleName Shared bundle name. 404 * @param versionCode Shared bundle version code. 405 * @return Returns the shared bundle running result. The result is true if running, false otherwise. 406 */ 407 virtual bool IsSharedBundleRunning(const std::string &bundleName, uint32_t versionCode) override; 408 409 virtual int32_t StartNativeProcessForDebugger(const AAFwk::Want &want) override; 410 411 /** 412 * Get bundleName by pid. 413 * 414 * @param pid process id. 415 * @param bundleName Output parameters, return bundleName. 416 * @param uid Output parameters, return userId. 417 * @return Returns ERR_OK on success, others on failure. 418 */ 419 virtual int32_t GetBundleNameByPid(const int pid, std::string &bundleName, int32_t &uid) override; 420 421 /** 422 * Get running process information by pid. 423 * 424 * @param pid process id. 425 * @param info Output parameters, return runningProcessInfo. 426 * @return Returns ERR_OK on success, others on failure. 427 */ 428 virtual int32_t GetRunningProcessInfoByPid(const pid_t pid, OHOS::AppExecFwk::RunningProcessInfo &info) override; 429 430 /** 431 * get memorySize by pid. 432 * 433 * @param pid process id. 434 * @param memorySize Output parameters, return memorySize in KB. 435 * @return Returns ERR_OK on success, others on failure. 436 */ 437 virtual int32_t GetProcessMemoryByPid(const int32_t pid, int32_t &memorySize) override; 438 439 /** 440 * get application processes information list by bundleName. 441 * 442 * @param bundleName Bundle name. 443 * @param userId user Id in Application record. 444 * @param info Output parameters, return running process info list. 445 * @return Returns ERR_OK on success, others on failure. 446 */ 447 virtual int32_t GetRunningProcessInformation( 448 const std::string &bundleName, int32_t userId, std::vector<RunningProcessInfo> &info) override; 449 450 /** 451 * @brief Notify AbilityManagerService the page show. 452 * @param token Ability identify. 453 * @param pageStateData The data of ability's page state. 454 * @return Returns ERR_OK on success, others on failure. 455 */ 456 virtual int32_t NotifyPageShow(const sptr<IRemoteObject> &token, const PageStateData &pageStateData) override; 457 458 /** 459 * @brief Notify AbilityManagerService the page hide. 460 * @param token Ability identify. 461 * @param pageStateData The data of ability's page state. 462 * @return Returns ERR_OK on success, others on failure. 463 */ 464 virtual int32_t NotifyPageHide(const sptr<IRemoteObject> &token, const PageStateData &pageStateData) override; 465 466 /** 467 * @brief Notify NativeEngine GC of status change. 468 * 469 * @param state GC state 470 * @param pid pid 471 * @return Returns ERR_OK on success, others on failure. 472 */ 473 virtual int32_t ChangeAppGcState(pid_t pid, int32_t state) override; 474 475 /** 476 * Register appRunning status listener. 477 * 478 * @param listener Running status listener. 479 * @return Returns ERR_OK on success, others on failure. 480 */ 481 int32_t RegisterAppRunningStatusListener(const sptr<IRemoteObject> &listener) override; 482 483 /** 484 * Unregister appRunning status listener. 485 * 486 * @param listener Running status listener. 487 * @return Returns ERR_OK on success, others on failure. 488 */ 489 int32_t UnregisterAppRunningStatusListener(const sptr<IRemoteObject> &listener) override; 490 491 /** 492 * Register application foreground state observer. 493 * @param observer, app Is app foreground state observer 494 * @return Returns ERR_OK on success, others on failure. 495 */ 496 int32_t RegisterAppForegroundStateObserver(const sptr<IAppForegroundStateObserver> &observer) override; 497 498 /** 499 * Unregister application foreground state observer. 500 * @param observer, app Is app foreground state observer 501 * @return Returns ERR_OK on success, others on failure. 502 */ 503 int32_t UnregisterAppForegroundStateObserver(const sptr<IAppForegroundStateObserver> &observer) override; 504 505 /** 506 * Check whether the bundle is running. 507 * 508 * @param bundleName Indicates the bundle name of the bundle. 509 * @param isRunning Obtain the running status of the application, the result is true if running, false otherwise. 510 * @return Return ERR_OK if success, others fail. 511 */ 512 int32_t IsApplicationRunning(const std::string &bundleName, bool &isRunning) override; 513 514 /** 515 * Check whether the bundle is running. 516 * 517 * @param bundleName Indicates the bundle name of the bundle. 518 * @param appCloneIndex the appindex of the bundle. 519 * @param isRunning Obtain the running status of the application, the result is true if running, false otherwise. 520 * @return Return ERR_OK if success, others fail. 521 */ 522 int32_t IsAppRunning(const std::string &bundleName, int32_t appCloneIndex, bool &isRunning) override; 523 524 /** 525 * Start child process, called by ChildProcessManager. 526 * 527 * @param childPid Created child process pid. 528 * @param request Child process start request params. 529 * @return Returns ERR_OK on success, others on failure. 530 */ 531 int32_t StartChildProcess(pid_t &childPid, const ChildProcessRequest &request) override; 532 533 /** 534 * Get child process record for self. 535 * 536 * @return child process info. 537 */ 538 int32_t GetChildProcessInfoForSelf(ChildProcessInfo &info) override; 539 540 /** 541 * Attach child process scheduler to app manager service. 542 * 543 * @param childScheduler scheduler of child process. 544 */ 545 void AttachChildProcess(const sptr<IRemoteObject> &childScheduler) override; 546 547 /** 548 * Exit child process, called by itself. 549 */ 550 void ExitChildProcessSafely() override; 551 552 /** 553 * Whether the current application process is the last surviving process. 554 * 555 * @return Returns true is final application process, others return false. 556 */ 557 bool IsFinalAppProcess() override; 558 559 /** 560 * Register render state observer. 561 * @param observer Render process state observer. 562 * @return Returns ERR_OK on success, others on failure. 563 */ 564 virtual int32_t RegisterRenderStateObserver(const sptr<IRenderStateObserver> &observer) override; 565 566 /** 567 * Unregister render state observer. 568 * @param observer Render process state observer. 569 * @return Returns ERR_OK on success, others on failure. 570 */ 571 virtual int32_t UnregisterRenderStateObserver(const sptr<IRenderStateObserver> &observer) override; 572 573 /** 574 * Update render state. 575 * @param renderPid Render pid. 576 * @param state foreground or background state. 577 * @return Returns ERR_OK on success, others on failure. 578 */ 579 virtual int32_t UpdateRenderState(pid_t renderPid, int32_t state) override; 580 581 int32_t SignRestartAppFlag(int32_t uid) override; 582 583 int32_t GetAppRunningUniqueIdByPid(pid_t pid, std::string &appRunningUniqueId) override; 584 585 /* 586 * Get all uiextension root host process id, need apply permission ohos.permission.GET_RUNNING_INFO. 587 * If specified pid mismatch UIExtensionAbility type, return empty vector. 588 * @param pid Process id. 589 * @param hostPids All host process id. 590 * @return Returns 0 on success, others on failure. 591 */ 592 int32_t GetAllUIExtensionRootHostPid(pid_t pid, std::vector<pid_t> &hostPids) override; 593 594 /** 595 * Get all uiextension provider process id, need apply permission ohos.permission.GET_RUNNING_INFO. 596 * If specified hostPid didn't start any UIExtensionAbility, return empty vector. 597 * @param hostPid Host process id. 598 * @param providerPids All provider process id started by specified hostPid. 599 * @return Returns 0 on success, others on failure. 600 */ 601 int32_t GetAllUIExtensionProviderPid(pid_t hostPid, std::vector<pid_t> &providerPids) override; 602 603 /** 604 * @brief Notify memory size state changed to sufficient or insufficent. 605 * @param isMemorySizeSufficent Indicates the memory size state. 606 * @return Returns ERR_OK on success, others on failure. 607 */ 608 virtual int32_t NotifyMemorySizeStateChanged(bool isMemorySizeSufficent) override; 609 610 /** 611 * Set application assertion pause state. 612 * 613 * @param flag assertion pause state. 614 */ 615 void SetAppAssertionPauseState(bool flag) override; 616 617 int32_t SetSupportedProcessCacheSelf(bool isSupport) override; 618 619 int32_t SetSupportedProcessCache(int32_t pid, bool isSupport) override; 620 621 virtual void SaveBrowserChannel(sptr<IRemoteObject> browser) override; 622 623 /** 624 * Check caller is test ability 625 * 626 * @param pid, the pid of ability. 627 * @return Returns ERR_OK is test ability, others is not test ability. 628 */ 629 int32_t CheckCallingIsUserTestMode(const pid_t pid, bool &isUserTest) override; 630 631 /** 632 * Start native child process, callde by ChildProcessManager. 633 * @param libName lib file name to be load in child process 634 * @param childProcessCount current started child process count 635 * @param callback callback for notify start result 636 * @return Returns ERR_OK on success, others on failure. 637 */ 638 int32_t StartNativeChildProcess(const std::string &libName, int32_t childProcessCount, 639 const sptr<IRemoteObject> &callback) override; 640 641 virtual int32_t NotifyProcessDependedOnWeb() override; 642 643 virtual void KillProcessDependedOnWeb() override; 644 645 virtual void RestartResidentProcessDependedOnWeb() override; 646 647 virtual int32_t GetAppIndexByPid(pid_t pid, int32_t &appIndex) override; 648 private: 649 bool SendTransactCmd(AppMgrInterfaceCode code, MessageParcel &data, MessageParcel &reply); 650 bool WriteInterfaceToken(MessageParcel &data); 651 int32_t SendRequest(AppMgrInterfaceCode code, MessageParcel &data, MessageParcel &reply, 652 MessageOption& option); 653 template<typename T> 654 int GetParcelableInfos(MessageParcel &reply, std::vector<T> &parcelableInfos); 655 static inline BrokerDelegator<AppMgrProxy> delegator_; 656 }; 657 } // namespace AppExecFwk 658 } // namespace OHOS 659 #endif // OHOS_ABILITY_RUNTIME_APP_MGR_PROXY_H 660