1 /*
2  * Copyright (c) 2021 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_state_callback_host.h"
17 #include "appexecfwk_errors.h"
18 #include "hilog_tag_wrapper.h"
19 #include "ipc_types.h"
20 #include "iremote_object.h"
21 #include "app_state_callback_proxy.h"
22 
23 namespace OHOS {
24 namespace AppExecFwk {
AppStateCallbackHost()25 AppStateCallbackHost::AppStateCallbackHost()
26 {}
27 
~AppStateCallbackHost()28 AppStateCallbackHost::~AppStateCallbackHost()
29 {}
30 
OnRemoteRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)31 int AppStateCallbackHost::OnRemoteRequest(
32     uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
33 {
34     return 0;
35 }
36 
OnAbilityRequestDone(const sptr<IRemoteObject> &,const AbilityState)37 void AppStateCallbackHost::OnAbilityRequestDone(const sptr<IRemoteObject>&, const AbilityState)
38 {
39     TAG_LOGD(AAFwkTag::TEST, "OnAbilityRequestDone called");
40 }
41 
OnAppStateChanged(const AppProcessData &)42 void AppStateCallbackHost::OnAppStateChanged(const AppProcessData&)
43 {
44     TAG_LOGD(AAFwkTag::TEST, "OnAppStateChanged called");
45 }
46 
NotifyStartResidentProcess(std::vector<AppExecFwk::BundleInfo> & bundleInfos)47 void AppStateCallbackHost::NotifyStartResidentProcess(std::vector<AppExecFwk::BundleInfo> &bundleInfos)
48 {
49     TAG_LOGD(AAFwkTag::TEST, "NotifyStartResidentProcess called");
50 }
51 
NotifyAppPreCache(int32_t pid,int32_t userId)52 void AppStateCallbackHost::NotifyAppPreCache(int32_t pid, int32_t userId)
53 {
54     TAG_LOGD(AAFwkTag::TEST, "NotifyAppPreCache called");
55 }
56 
HandleOnAppStateChanged(MessageParcel & data,MessageParcel & reply)57 int32_t AppStateCallbackHost::HandleOnAppStateChanged(MessageParcel& data, MessageParcel& reply)
58 {
59     return NO_ERROR;
60 }
61 
HandleOnAbilityRequestDone(MessageParcel & data,MessageParcel & reply)62 int32_t AppStateCallbackHost::HandleOnAbilityRequestDone(MessageParcel& data, MessageParcel& reply)
63 {
64     return NO_ERROR;
65 }
66 
HandleNotifyStartResidentProcess(MessageParcel & data,MessageParcel & reply)67 int32_t AppStateCallbackHost::HandleNotifyStartResidentProcess(MessageParcel &data, MessageParcel &reply)
68 {
69     return NO_ERROR;
70 }
71 
HandleNotifyAppPreCache(MessageParcel & data,MessageParcel & reply)72 int32_t AppStateCallbackHost::HandleNotifyAppPreCache(MessageParcel &data, MessageParcel &reply)
73 {
74     return NO_ERROR;
75 }
76 }  // namespace AppExecFwk
77 }  // namespace OHOS
78