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 #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(const sptr<IRemoteObject> & token,const sptr<IRemoteObject> & preToken,const AbilityInfo & abilityInfo,const ApplicationInfo & appInfo,const AAFwk::Want & want)41 AppMgrResultCode AppMgrClient::LoadAbility(const sptr<IRemoteObject>& token, const sptr<IRemoteObject>& preToken,
42 const AbilityInfo& abilityInfo, const ApplicationInfo& appInfo, const AAFwk::Want& want)
43 {
44 return AppMgrResultCode::RESULT_OK;
45 }
46
TerminateAbility(const sptr<IRemoteObject> & token,bool clearMissionFlag)47 AppMgrResultCode AppMgrClient::TerminateAbility(const sptr<IRemoteObject>& token, bool clearMissionFlag)
48 {
49 return AppMgrResultCode::RESULT_OK;
50 }
51
UpdateAbilityState(const sptr<IRemoteObject> & token,const AbilityState state)52 AppMgrResultCode AppMgrClient::UpdateAbilityState(const sptr<IRemoteObject>& token, const AbilityState state)
53 {
54 return AppMgrResultCode::RESULT_OK;
55 }
56
RegisterAppStateCallback(const sptr<IAppStateCallback> & callback)57 AppMgrResultCode AppMgrClient::RegisterAppStateCallback(const sptr<IAppStateCallback>& callback)
58 {
59 return AppMgrResultCode::RESULT_OK;
60 }
61
AbilityBehaviorAnalysis(const sptr<IRemoteObject> & token,const sptr<IRemoteObject> & preToken,const int32_t visibility,const int32_t perceptibility,const int32_t connectionState)62 AppMgrResultCode AppMgrClient::AbilityBehaviorAnalysis(const sptr<IRemoteObject>& token,
63 const sptr<IRemoteObject>& preToken, const int32_t visibility, const int32_t perceptibility,
64 const int32_t connectionState)
65 {
66 return AppMgrResultCode::RESULT_OK;
67 }
68
KillProcessByAbilityToken(const sptr<IRemoteObject> & token)69 AppMgrResultCode AppMgrClient::KillProcessByAbilityToken(const sptr<IRemoteObject>& token)
70 {
71 return AppMgrResultCode::RESULT_OK;
72 }
73
KillProcessesByUserId(int32_t userId)74 AppMgrResultCode AppMgrClient::KillProcessesByUserId(int32_t userId)
75 {
76 return AppMgrResultCode::RESULT_OK;
77 }
78
KillApplication(const std::string & bundleName)79 AppMgrResultCode AppMgrClient::KillApplication(const std::string& bundleName)
80 {
81 return AppMgrResultCode::RESULT_OK;
82 }
83
ClearUpApplicationData(const std::string & bundleName)84 AppMgrResultCode AppMgrClient::ClearUpApplicationData(const std::string& bundleName)
85 {
86 return AppMgrResultCode::RESULT_OK;
87 }
88
GetAllRunningProcesses(std::vector<RunningProcessInfo> & info)89 AppMgrResultCode AppMgrClient::GetAllRunningProcesses(std::vector<RunningProcessInfo>& info)
90 {
91 return AppMgrResultCode::RESULT_OK;
92 }
93
GetAllRenderProcesses(std::vector<RenderProcessInfo> & info)94 AppMgrResultCode AppMgrClient::GetAllRenderProcesses(std::vector<RenderProcessInfo>& info)
95 {
96 return AppMgrResultCode::RESULT_OK;
97 }
98
ConnectAppMgrService()99 AppMgrResultCode AppMgrClient::ConnectAppMgrService()
100 {
101 return AppMgrResultCode::RESULT_OK;
102 }
103
104 // void AppMgrClient::SetServiceManager(std::unique_ptr<AppServiceManager> serviceMgr)
105 // {}
106
AbilityAttachTimeOut(const sptr<IRemoteObject> & token)107 void AppMgrClient::AbilityAttachTimeOut(const sptr<IRemoteObject>& token)
108 {}
109
PrepareTerminate(const sptr<IRemoteObject> & token)110 void AppMgrClient::PrepareTerminate(const sptr<IRemoteObject>& token)
111 {}
112 } // namespace AppExecFwk
113 } // namespace OHOS
114