• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2025 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 "app_mgr_client.h"
17 
18 #include <cstdio>
19 #include <string>
20 #include <unistd.h>
21 
22 #include "if_system_ability_manager.h"
23 #include "ipc_skeleton.h"
24 
25 #include "app_mgr_interface.h"
26 #include "app_service_manager.h"
27 
28 namespace OHOS {
29 namespace AppExecFwk {
AppMgrClient()30 AppMgrClient::AppMgrClient()
31 {}
32 
~AppMgrClient()33 AppMgrClient::~AppMgrClient()
34 {}
35 
GetRunningProcessInfoByToken(const sptr<IRemoteObject> & token,RunningProcessInfo & info)36 void AppMgrClient::GetRunningProcessInfoByToken(const sptr<IRemoteObject>& token, RunningProcessInfo& info)
37 {}
38 
GetRunningProcessInfoByPid(const pid_t pid,OHOS::AppExecFwk::RunningProcessInfo & info) const39 void AppMgrClient::GetRunningProcessInfoByPid(const pid_t pid, OHOS::AppExecFwk::RunningProcessInfo& info) const {}
40 
LoadAbility(sptr<IRemoteObject> token,sptr<IRemoteObject> preToken,const AbilityInfo & abilityInfo,const ApplicationInfo & appInfo,const AAFwk::Want & want,int32_t abilityRecordId)41 AppMgrResultCode AppMgrClient::LoadAbility(sptr<IRemoteObject> token, sptr<IRemoteObject> preToken,
42     const AbilityInfo& abilityInfo, const ApplicationInfo& appInfo, const AAFwk::Want& want,
43     int32_t abilityRecordId)
44 {
45     return AppMgrResultCode::RESULT_OK;
46 }
47 
TerminateAbility(const sptr<IRemoteObject> & token,bool clearMissionFlag)48 AppMgrResultCode AppMgrClient::TerminateAbility(const sptr<IRemoteObject>& token, bool clearMissionFlag)
49 {
50     return AppMgrResultCode::RESULT_OK;
51 }
52 
UpdateAbilityState(const sptr<IRemoteObject> & token,const AbilityState state)53 AppMgrResultCode AppMgrClient::UpdateAbilityState(const sptr<IRemoteObject>& token, const AbilityState state)
54 {
55     return AppMgrResultCode::RESULT_OK;
56 }
57 
RegisterAppStateCallback(const sptr<IAppStateCallback> & callback)58 AppMgrResultCode AppMgrClient::RegisterAppStateCallback(const sptr<IAppStateCallback>& callback)
59 {
60     return AppMgrResultCode::RESULT_OK;
61 }
62 
KillProcessByAbilityToken(const sptr<IRemoteObject> & token)63 AppMgrResultCode AppMgrClient::KillProcessByAbilityToken(const sptr<IRemoteObject>& token)
64 {
65     return AppMgrResultCode::RESULT_OK;
66 }
67 
KillProcessesByUserId(int32_t userId,bool isNeedSendAppSpawnMsg,sptr<AAFwk::IUserCallback> callback)68 AppMgrResultCode AppMgrClient::KillProcessesByUserId(int32_t userId, bool isNeedSendAppSpawnMsg,
69     sptr<AAFwk::IUserCallback> callback)
70 {
71     return AppMgrResultCode::RESULT_OK;
72 }
73 
KillApplication(const std::string & bundleName,bool clearPageStack=false,int32_t appIndex=0)74 AppMgrResultCode AppMgrClient::KillApplication(
75     const std::string& bundleName, bool clearPageStack = false, int32_t appIndex = 0)
76 {
77     return AppMgrResultCode::RESULT_OK;
78 }
79 
ClearUpApplicationData(const std::string & bundleName,const int32_t userId)80 AppMgrResultCode AppMgrClient::ClearUpApplicationData(const std::string& bundleName, const int32_t userId)
81 {
82     return AppMgrResultCode::RESULT_OK;
83 }
84 
GetAllRunningProcesses(std::vector<RunningProcessInfo> & info)85 AppMgrResultCode AppMgrClient::GetAllRunningProcesses(std::vector<RunningProcessInfo>& info)
86 {
87     return AppMgrResultCode::RESULT_OK;
88 }
89 
GetAllRenderProcesses(std::vector<RenderProcessInfo> & info)90 AppMgrResultCode AppMgrClient::GetAllRenderProcesses(std::vector<RenderProcessInfo>& info)
91 {
92     return AppMgrResultCode::RESULT_OK;
93 }
94 
ConnectAppMgrService()95 AppMgrResultCode AppMgrClient::ConnectAppMgrService()
96 {
97     return AppMgrResultCode::RESULT_OK;
98 }
99 
100 // void AppMgrClient::SetServiceManager(std::unique_ptr<AppServiceManager> serviceMgr)
101 // {}
102 
AbilityAttachTimeOut(const sptr<IRemoteObject> & token)103 void AppMgrClient::AbilityAttachTimeOut(const sptr<IRemoteObject>& token)
104 {}
105 
PrepareTerminate(const sptr<IRemoteObject> & token,bool clearMissionFlag)106 void AppMgrClient::PrepareTerminate(const sptr<IRemoteObject>& token, bool clearMissionFlag)
107 {}
108 }  // namespace AppExecFwk
109 }  // namespace OHOS
110