mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 07:09:53 +00:00
Merge branch 'master' of https://gitee.com/openharmony/bundlemanager_bundle_framework
Change-Id: Ie7a7bc991a29575a092059749ee466f0684332a9
This commit is contained in:
commit
9ee75fcac9
@ -12,5 +12,5 @@
|
||||
# limitations under the License.
|
||||
|
||||
# any change to xxx_ipc_interface_code.h needs to be reviewed by @leonchan5
|
||||
interfaces/inner_api/appexecfwk_core/include/bundle_appexecfwk_core_ipc_interface_code.h @leonchan5
|
||||
services/bundlemgr/include/bundle_manager_services_ipc_interface_code.h @leonchan5
|
||||
interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h @leonchan5
|
||||
services/bundlemgr/include/bundle_framework_services_ipc_interface_code.h @leonchan5
|
@ -41,6 +41,7 @@ struct ExtensionFormInfo {
|
||||
std::int32_t defaultDimension;
|
||||
std::vector<int32_t> supportDimensions {};
|
||||
std::vector<FormCustomizeData> metadata {};
|
||||
bool dataProxyEnabled = false;
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -45,6 +45,7 @@ const std::string SUPPORT_DIMENSIONS = "supportDimensions";
|
||||
const std::string METADATA = "metadata";
|
||||
const std::string METADATA_NAME = "name";
|
||||
const std::string METADATA_VALUE = "value";
|
||||
const std::string DATA_PROXY_ENABLED = "dataProxyEnabled";
|
||||
}
|
||||
|
||||
class ExtensionFormProfile {
|
||||
|
@ -53,6 +53,7 @@ struct FormInfo : public Parcelable {
|
||||
std::vector<std::string> landscapeLayouts;
|
||||
std::vector<std::string> portraitLayouts;
|
||||
std::vector<FormCustomizeData> customizeDatas;
|
||||
bool dataProxyEnabled = false;
|
||||
|
||||
FormInfo() = default;
|
||||
explicit FormInfo(const ExtensionAbilityInfo &abilityInfo, const ExtensionFormInfo &formInfo);
|
||||
|
@ -74,6 +74,7 @@ struct ExtensionFormProfileInfo {
|
||||
std::string defaultDimension;
|
||||
std::vector<std::string> supportDimensions {};
|
||||
std::vector<Metadata> metadata {};
|
||||
bool dataProxyEnabled = false;
|
||||
};
|
||||
|
||||
struct ExtensionFormProfileInfoVec {
|
||||
@ -253,6 +254,14 @@ void from_json(const nlohmann::json &jsonObject, ExtensionFormProfileInfo &exten
|
||||
false,
|
||||
parseResult,
|
||||
ArrayType::OBJECT);
|
||||
GetValueIfFindKey<bool>(jsonObject,
|
||||
jsonObjectEnd,
|
||||
ExtensionFormProfileReader::DATA_PROXY_ENABLED,
|
||||
extensionFormProfileInfo.dataProxyEnabled,
|
||||
JsonType::BOOLEAN,
|
||||
false,
|
||||
parseResult,
|
||||
ArrayType::NOT_ARRAY);
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json &jsonObject, ExtensionFormProfileInfoVec &infos)
|
||||
@ -357,6 +366,8 @@ bool TransformToExtensionFormInfo(const ExtensionFormProfileInfo &form, Extensio
|
||||
customizeData.value = data.value;
|
||||
info.metadata.emplace_back(customizeData);
|
||||
}
|
||||
|
||||
info.dataProxyEnabled = form.dataProxyEnabled;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@ const std::string JSON_KEY_WINDOW = "window";
|
||||
const std::string JSON_KEY_DESIGN_WIDTH = "designWidth";
|
||||
const std::string JSON_KEY_AUTO_DESIGN_WIDTH = "autoDesignWidth";
|
||||
const std::string JSON_KEY_IS_STATIC = "isStatic";
|
||||
const std::string JSON_KEY_DATA_PROXY_ENABLED = "dataProxyEnabled";
|
||||
} // namespace
|
||||
|
||||
FormInfo::FormInfo(const ExtensionAbilityInfo &abilityInfo, const ExtensionFormInfo &formInfo)
|
||||
@ -96,6 +97,7 @@ FormInfo::FormInfo(const ExtensionAbilityInfo &abilityInfo, const ExtensionFormI
|
||||
for (const auto &metadata : formInfo.metadata) {
|
||||
customizeDatas.push_back(metadata);
|
||||
}
|
||||
dataProxyEnabled = formInfo.dataProxyEnabled;
|
||||
}
|
||||
|
||||
bool FormInfo::ReadCustomizeData(Parcel &parcel)
|
||||
@ -176,6 +178,7 @@ bool FormInfo::ReadFromParcel(Parcel &parcel)
|
||||
|
||||
window.designWidth = parcel.ReadInt32();
|
||||
window.autoDesignWidth = parcel.ReadBool();
|
||||
dataProxyEnabled = parcel.ReadBool();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -242,6 +245,7 @@ bool FormInfo::Marshalling(Parcel &parcel) const
|
||||
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, window.designWidth);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, window.autoDesignWidth);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, dataProxyEnabled);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -298,7 +302,8 @@ void to_json(nlohmann::json &jsonObject, const FormInfo &formInfo)
|
||||
{JSON_KEY_CUSTOMIZE_DATA, formInfo.customizeDatas},
|
||||
{JSON_KEY_LANDSCAPE_LAYOUTS, formInfo.landscapeLayouts},
|
||||
{JSON_KEY_PORTRAIT_LAYOUTS, formInfo.portraitLayouts},
|
||||
{JSON_KEY_WINDOW, formInfo.window}
|
||||
{JSON_KEY_WINDOW, formInfo.window},
|
||||
{JSON_KEY_DATA_PROXY_ENABLED, formInfo.dataProxyEnabled}
|
||||
};
|
||||
}
|
||||
|
||||
@ -354,6 +359,14 @@ void from_json(const nlohmann::json &jsonObject, FormInfo &formInfo)
|
||||
false,
|
||||
parseResult,
|
||||
ArrayType::NOT_ARRAY);
|
||||
GetValueIfFindKey<bool>(jsonObject,
|
||||
jsonObjectEnd,
|
||||
JSON_KEY_DATA_PROXY_ENABLED,
|
||||
formInfo.dataProxyEnabled,
|
||||
JsonType::BOOLEAN,
|
||||
false,
|
||||
parseResult,
|
||||
ArrayType::NOT_ARRAY);
|
||||
}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -17,8 +17,8 @@
|
||||
#define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_APP_CONTROL_PROXY_H
|
||||
|
||||
#include "app_control_interface.h"
|
||||
#include "bundle_framework_core_ipc_interface_code.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
||||
#define OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
||||
|
||||
/* SAID: 401 */
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
enum class AppControlManagerInterfaceCode : uint32_t {
|
||||
ADD_APP_INSTALL_CONTROL_RULE = 0,
|
||||
DELETE_APP_INSTALL_CONTROL_RULE,
|
||||
CLEAN_APP_INSTALL_CONTROL_RULE,
|
||||
GET_APP_INSTALL_CONTROL_RULE,
|
||||
ADD_APP_RUNNING_CONTROL_RULE,
|
||||
DELETE_APP_RUNNING_CONTROL_RULE,
|
||||
CLEAN_APP_RUNNING_CONTROL_RULE,
|
||||
GET_APP_RUNNING_CONTROL_RULE,
|
||||
GET_APP_RUNNING_CONTROL_RULE_RESULT,
|
||||
SET_DISPOSED_STATUS,
|
||||
DELETE_DISPOSED_STATUS,
|
||||
GET_DISPOSED_STATUS,
|
||||
CONFIRM_APP_JUMP_CONTROL_RULE,
|
||||
ADD_APP_JUMP_CONTROL_RULE,
|
||||
DELETE_APP_JUMP_CONTROL_RULE,
|
||||
DELETE_APP_JUMP_CONTROL_RULE_BY_CALLER,
|
||||
DELETE_APP_JUMP_CONTROL_RULE_BY_TARGET,
|
||||
GET_APP_JUMP_CONTROL_RULE,
|
||||
};
|
||||
|
||||
enum class BundleEventCallbackInterfaceCode : uint32_t {
|
||||
ON_RECEIVE_EVENT,
|
||||
};
|
||||
|
||||
enum class BundleInstallerInterfaceCode : uint32_t {
|
||||
INSTALL = 0,
|
||||
INSTALL_MULTIPLE_HAPS,
|
||||
UNINSTALL,
|
||||
UNINSTALL_MODULE,
|
||||
UNINSTALL_BY_UNINSTALL_PARAM,
|
||||
RECOVER,
|
||||
INSTALL_SANDBOX_APP,
|
||||
UNINSTALL_SANDBOX_APP,
|
||||
CREATE_STREAM_INSTALLER,
|
||||
DESTORY_STREAM_INSTALLER,
|
||||
};
|
||||
|
||||
enum class BundleStatusCallbackInterfaceCode : uint32_t {
|
||||
ON_BUNDLE_STATE_CHANGED,
|
||||
};
|
||||
|
||||
enum class BundleStreamInstallerInterfaceCode : uint32_t {
|
||||
CREATE_STREAM = 0,
|
||||
STREAM_INSTALL = 1,
|
||||
CREATE_SHARED_BUNDLE_STREAM = 2,
|
||||
};
|
||||
|
||||
enum class CleanCacheCallbackInterfaceCode : uint32_t {
|
||||
ON_CLEAN_CACHE_CALLBACK,
|
||||
};
|
||||
|
||||
enum class StatusReceiverInterfaceCode : uint32_t {
|
||||
ON_STATUS_NOTIFY,
|
||||
ON_FINISHED,
|
||||
};
|
||||
|
||||
enum class DefaultAppInterfaceCode : uint32_t {
|
||||
IS_DEFAULT_APPLICATION = 0,
|
||||
GET_DEFAULT_APPLICATION = 1,
|
||||
SET_DEFAULT_APPLICATION = 2,
|
||||
RESET_DEFAULT_APPLICATION = 3,
|
||||
};
|
||||
|
||||
enum class OverlayManagerInterfaceCode : uint32_t {
|
||||
GET_ALL_OVERLAY_MODULE_INFO = 0,
|
||||
GET_OVERLAY_MODULE_INFO_BY_NAME = 1,
|
||||
GET_OVERLAY_MODULE_INFO = 2,
|
||||
GET_TARGET_OVERLAY_MODULE_INFOS = 3,
|
||||
GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME = 4,
|
||||
GET_OVERLAY_BUNDLE_INFO_FOR_TARGET = 5,
|
||||
GET_OVERLAY_MODULE_INFO_FOR_TARGET = 6,
|
||||
SET_OVERLAY_ENABLED = 7,
|
||||
SET_OVERLAY_ENABLED_FOR_SELF = 8,
|
||||
};
|
||||
|
||||
enum class QuickFixManagerInterfaceCode : uint32_t {
|
||||
DEPLOY_QUICK_FIX = 0,
|
||||
SWITCH_QUICK_FIX = 1,
|
||||
DELETE_QUICK_FIX = 2,
|
||||
CREATE_FD = 3
|
||||
};
|
||||
|
||||
enum class QuickFixStatusCallbackInterfaceCode : uint32_t {
|
||||
ON_PATCH_DEPLOYED = 1,
|
||||
ON_PATCH_SWITCHED = 2,
|
||||
ON_PATCH_DELETED = 3
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
||||
#define OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* SAID: 401 */
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
enum class AppControlManagerInterfaceCode : uint32_t {
|
||||
ADD_APP_INSTALL_CONTROL_RULE = 0,
|
||||
DELETE_APP_INSTALL_CONTROL_RULE,
|
||||
CLEAN_APP_INSTALL_CONTROL_RULE,
|
||||
GET_APP_INSTALL_CONTROL_RULE,
|
||||
ADD_APP_RUNNING_CONTROL_RULE,
|
||||
DELETE_APP_RUNNING_CONTROL_RULE,
|
||||
CLEAN_APP_RUNNING_CONTROL_RULE,
|
||||
GET_APP_RUNNING_CONTROL_RULE,
|
||||
GET_APP_RUNNING_CONTROL_RULE_RESULT,
|
||||
SET_DISPOSED_STATUS,
|
||||
DELETE_DISPOSED_STATUS,
|
||||
GET_DISPOSED_STATUS,
|
||||
CONFIRM_APP_JUMP_CONTROL_RULE,
|
||||
ADD_APP_JUMP_CONTROL_RULE,
|
||||
DELETE_APP_JUMP_CONTROL_RULE,
|
||||
DELETE_APP_JUMP_CONTROL_RULE_BY_CALLER,
|
||||
DELETE_APP_JUMP_CONTROL_RULE_BY_TARGET,
|
||||
GET_APP_JUMP_CONTROL_RULE,
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_BUNDLE_APPEXECFWK_CORE_IPC_INTERFACE_CODE_H
|
@ -26,6 +26,10 @@ public:
|
||||
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.BundleEventCallback");
|
||||
|
||||
virtual void OnReceiveEvent(const EventFwk::CommonEventData eventData) = 0;
|
||||
|
||||
enum class Message {
|
||||
ON_RECEIVE_EVENT,
|
||||
};
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -120,6 +120,19 @@ public:
|
||||
virtual bool DestoryBundleStreamInstaller(uint32_t streamInstallerId) = 0;
|
||||
virtual ErrCode StreamInstall(const std::vector<std::string> &bundleFilePaths, const InstallParam &installParam,
|
||||
const sptr<IStatusReceiver> &statusReceiver) = 0;
|
||||
|
||||
enum Message : uint32_t {
|
||||
INSTALL = 0,
|
||||
INSTALL_MULTIPLE_HAPS,
|
||||
UNINSTALL,
|
||||
UNINSTALL_MODULE,
|
||||
UNINSTALL_BY_UNINSTALL_PARAM,
|
||||
RECOVER,
|
||||
INSTALL_SANDBOX_APP,
|
||||
UNINSTALL_SANDBOX_APP,
|
||||
CREATE_STREAM_INSTALLER,
|
||||
DESTORY_STREAM_INSTALLER,
|
||||
};
|
||||
};
|
||||
|
||||
#define PARCEL_WRITE_INTERFACE_TOKEN(parcel, token) \
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "bundle_installer_interface.h"
|
||||
#include "status_receiver_interface.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -111,7 +110,7 @@ public:
|
||||
const sptr<IStatusReceiver> &statusReceiver) override;
|
||||
|
||||
private:
|
||||
bool SendInstallRequest(BundleInstallerInterfaceCode code, MessageParcel& data, MessageParcel& reply,
|
||||
bool SendInstallRequest(const uint32_t& code, MessageParcel& data, MessageParcel& reply,
|
||||
MessageOption& option);
|
||||
ErrCode WriteFileToStream(sptr<IBundleStreamInstaller> &streamInstaller, const std::string &path);
|
||||
|
||||
|
@ -59,6 +59,10 @@ public:
|
||||
*/
|
||||
virtual void OnBundleRemoved(const std::string &bundleName, const int userId) = 0;
|
||||
|
||||
enum class Message {
|
||||
ON_BUNDLE_STATE_CHANGED,
|
||||
};
|
||||
|
||||
std::string GetBundleName()
|
||||
{
|
||||
return bundleName_;
|
||||
|
@ -43,6 +43,12 @@ public:
|
||||
}
|
||||
virtual void SetInstallerId(uint32_t installerId) {};
|
||||
virtual void UnInit() {};
|
||||
|
||||
enum StreamMessage : uint32_t {
|
||||
CREATE_STREAM = 0,
|
||||
STREAM_INSTALL = 1,
|
||||
CREATE_SHARED_BUNDLE_STREAM = 2,
|
||||
};
|
||||
};
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "ipc_types.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "parcel.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -39,7 +38,7 @@ public:
|
||||
private:
|
||||
static inline BrokerDelegator<BundleStreamInstallerProxy> delegator_;
|
||||
uint32_t installerId_ = -1;
|
||||
bool SendStreamInstallRequest(BundleStreamInstallerInterfaceCode code, MessageParcel& data, MessageParcel& reply);
|
||||
bool SendStreamInstallRequest(const uint32_t& code, MessageParcel& data, MessageParcel& reply);
|
||||
};
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
||||
|
@ -29,6 +29,10 @@ public:
|
||||
* @param succeeded Indicates the result of the clean cache files progress.
|
||||
*/
|
||||
virtual void OnCleanCacheFinished(bool succeeded) = 0;
|
||||
|
||||
enum class Message {
|
||||
ON_CLEAN_CACHE_CALLBACK,
|
||||
};
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -39,6 +39,11 @@ public:
|
||||
|
||||
virtual void SetStreamInstallId(uint32_t installerId) = 0;
|
||||
|
||||
enum class Message {
|
||||
ON_STATUS_NOTIFY,
|
||||
ON_FINISHED,
|
||||
};
|
||||
|
||||
enum {
|
||||
SUCCESS = 0,
|
||||
ERR_INSTALL_INTERNAL_ERROR = 9568260,
|
||||
|
@ -45,6 +45,13 @@ public:
|
||||
{
|
||||
return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
enum Message : uint32_t {
|
||||
IS_DEFAULT_APPLICATION = 0,
|
||||
GET_DEFAULT_APPLICATION = 1,
|
||||
SET_DEFAULT_APPLICATION = 2,
|
||||
RESET_DEFAULT_APPLICATION = 3,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "default_app_interface.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -34,8 +33,8 @@ public:
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
ErrCode GetParcelableInfo(DefaultAppInterfaceCode code, MessageParcel& data, T& parcelableInfo);
|
||||
bool SendRequest(DefaultAppInterfaceCode code, MessageParcel& data, MessageParcel& reply);
|
||||
ErrCode GetParcelableInfo(IDefaultApp::Message code, MessageParcel& data, T& parcelableInfo);
|
||||
bool SendRequest(IDefaultApp::Message code, MessageParcel& data, MessageParcel& reply);
|
||||
static inline BrokerDelegator<DefaultAppProxy> delegator_;
|
||||
};
|
||||
}
|
||||
|
@ -83,6 +83,18 @@ public:
|
||||
{
|
||||
return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
enum Message : uint32_t {
|
||||
GET_ALL_OVERLAY_MODULE_INFO = 0,
|
||||
GET_OVERLAY_MODULE_INFO_BY_NAME = 1,
|
||||
GET_OVERLAY_MODULE_INFO = 2,
|
||||
GET_TARGET_OVERLAY_MODULE_INFOS = 3,
|
||||
GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME = 4,
|
||||
GET_OVERLAY_BUNDLE_INFO_FOR_TARGET = 5,
|
||||
GET_OVERLAY_MODULE_INFO_FOR_TARGET = 6,
|
||||
SET_OVERLAY_ENABLED = 7,
|
||||
SET_OVERLAY_ENABLED_FOR_SELF = 8,
|
||||
};
|
||||
};
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "overlay_manager_interface.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -57,13 +56,13 @@ public:
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
ErrCode GetParcelableInfo(OverlayManagerInterfaceCode code, MessageParcel &data, T &parcelableInfo);
|
||||
ErrCode GetParcelableInfo(IOverlayManager::Message code, MessageParcel &data, T &parcelableInfo);
|
||||
|
||||
template<typename T>
|
||||
ErrCode GetParcelableInfosWithErrCode(OverlayManagerInterfaceCode code, MessageParcel &data,
|
||||
ErrCode GetParcelableInfosWithErrCode(IOverlayManager::Message code, MessageParcel &data,
|
||||
std::vector<T> &parcelableInfos);
|
||||
|
||||
bool SendTransactCmd(OverlayManagerInterfaceCode code, MessageParcel &data, MessageParcel &reply);
|
||||
bool SendTransactCmd(IOverlayManager::Message code, MessageParcel &data, MessageParcel &reply);
|
||||
|
||||
static inline BrokerDelegator<OverlayManagerProxy> delegator_;
|
||||
};
|
||||
|
@ -56,6 +56,12 @@ public:
|
||||
{
|
||||
return ERR_BUNDLEMANAGER_QUICK_FIX_INTERNAL_ERROR;
|
||||
}
|
||||
enum Message : uint32_t {
|
||||
DEPLOY_QUICK_FIX = 0,
|
||||
SWITCH_QUICK_FIX = 1,
|
||||
DELETE_QUICK_FIX = 2,
|
||||
CREATE_FD = 3
|
||||
};
|
||||
};
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "quick_fix_manager_interface.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -41,7 +40,7 @@ public:
|
||||
|
||||
private:
|
||||
virtual ErrCode CreateFd(const std::string &fileName, int32_t &fd, std::string &path) override;
|
||||
bool SendRequest(QuickFixManagerInterfaceCode code, MessageParcel &data, MessageParcel &reply);
|
||||
bool SendRequest(IQuickFixManager::Message code, MessageParcel &data, MessageParcel &reply);
|
||||
|
||||
static inline BrokerDelegator<QuickFixManagerProxy> delegator_;
|
||||
};
|
||||
|
@ -28,6 +28,12 @@ public:
|
||||
virtual void OnPatchDeployed(const std::shared_ptr<QuickFixResult> &result) = 0;
|
||||
virtual void OnPatchSwitched(const std::shared_ptr<QuickFixResult> &result) = 0;
|
||||
virtual void OnPatchDeleted(const std::shared_ptr<QuickFixResult> &result) = 0;
|
||||
|
||||
enum Message : uint32_t {
|
||||
ON_PATCH_DEPLOYED = 1,
|
||||
ON_PATCH_SWITCHED = 2,
|
||||
ON_PATCH_DELETED = 3
|
||||
};
|
||||
};
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "iremote_proxy.h"
|
||||
|
||||
#include "quick_fix_status_callback_interface.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -33,7 +32,7 @@ public:
|
||||
virtual void OnPatchDeleted(const std::shared_ptr<QuickFixResult> &result) override;
|
||||
|
||||
private:
|
||||
bool SendTransactCmd(QuickFixStatusCallbackInterfaceCode code, MessageParcel &data, MessageParcel &reply);
|
||||
bool SendTransactCmd(uint32_t code, MessageParcel &data, MessageParcel &reply);
|
||||
|
||||
static inline BrokerDelegator<QuickFixStatusCallbackProxy> delegator_;
|
||||
};
|
||||
|
@ -18,9 +18,9 @@
|
||||
#include "app_control_constants.h"
|
||||
#include "app_log_wrapper.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_framework_core_ipc_interface_code.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -45,7 +44,7 @@ int BundleEventCallbackHost::OnRemoteRequest(
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(BundleEventCallbackInterfaceCode::ON_RECEIVE_EVENT): {
|
||||
case static_cast<uint32_t>(IBundleEventCallback::Message::ON_RECEIVE_EVENT): {
|
||||
std::unique_ptr<EventFwk::CommonEventData> dataPtr(data.ReadParcelable<EventFwk::CommonEventData>());
|
||||
if (dataPtr == nullptr) {
|
||||
APP_LOGE("get CommonEventData failed");
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -55,7 +54,7 @@ void BundleEventCallbackProxy::OnReceiveEvent(const EventFwk::CommonEventData ev
|
||||
return;
|
||||
}
|
||||
int32_t ret = remote->SendRequest(
|
||||
static_cast<int32_t>(BundleEventCallbackInterfaceCode::ON_RECEIVE_EVENT), data, reply, option);
|
||||
static_cast<int32_t>(IBundleEventCallback::Message::ON_RECEIVE_EVENT), data, reply, option);
|
||||
if (ret != ERR_OK) {
|
||||
APP_LOGW("failed to SendRequest, errorCode : %{public}d", ret);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ bool BundleInstallerProxy::Install(
|
||||
return false;
|
||||
}
|
||||
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::INSTALL, data, reply, option);
|
||||
return SendInstallRequest(IBundleInstaller::Message::INSTALL, data, reply, option);
|
||||
}
|
||||
|
||||
bool BundleInstallerProxy::Install(const std::vector<std::string> &bundleFilePaths, const InstallParam &installParam,
|
||||
@ -93,7 +93,7 @@ bool BundleInstallerProxy::Install(const std::vector<std::string> &bundleFilePat
|
||||
return false;
|
||||
}
|
||||
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::INSTALL_MULTIPLE_HAPS, data, reply,
|
||||
return SendInstallRequest(IBundleInstaller::Message::INSTALL_MULTIPLE_HAPS, data, reply,
|
||||
option);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ bool BundleInstallerProxy::Recover(const std::string &bundleName,
|
||||
return false;
|
||||
}
|
||||
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::RECOVER, data, reply,
|
||||
return SendInstallRequest(IBundleInstaller::Message::RECOVER, data, reply,
|
||||
option);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ bool BundleInstallerProxy::Uninstall(
|
||||
return false;
|
||||
}
|
||||
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::UNINSTALL, data, reply, option);
|
||||
return SendInstallRequest(IBundleInstaller::Message::UNINSTALL, data, reply, option);
|
||||
}
|
||||
|
||||
bool BundleInstallerProxy::Uninstall(const std::string &bundleName, const std::string &modulePackage,
|
||||
@ -165,7 +165,7 @@ bool BundleInstallerProxy::Uninstall(const std::string &bundleName, const std::s
|
||||
return false;
|
||||
}
|
||||
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::UNINSTALL_MODULE, data, reply, option);
|
||||
return SendInstallRequest(IBundleInstaller::Message::UNINSTALL_MODULE, data, reply, option);
|
||||
}
|
||||
|
||||
bool BundleInstallerProxy::Uninstall(const UninstallParam &uninstallParam,
|
||||
@ -184,7 +184,7 @@ bool BundleInstallerProxy::Uninstall(const UninstallParam &uninstallParam,
|
||||
APP_LOGE("write parcel failed");
|
||||
return false;
|
||||
}
|
||||
return SendInstallRequest(BundleInstallerInterfaceCode::UNINSTALL_BY_UNINSTALL_PARAM, data, reply, option);
|
||||
return SendInstallRequest(IBundleInstaller::Message::UNINSTALL_BY_UNINSTALL_PARAM, data, reply, option);
|
||||
}
|
||||
|
||||
ErrCode BundleInstallerProxy::InstallSandboxApp(const std::string &bundleName, int32_t dlpType, int32_t userId,
|
||||
@ -213,7 +213,7 @@ ErrCode BundleInstallerProxy::InstallSandboxApp(const std::string &bundleName, i
|
||||
}
|
||||
|
||||
auto ret =
|
||||
SendInstallRequest(BundleInstallerInterfaceCode::INSTALL_SANDBOX_APP, data, reply, option);
|
||||
SendInstallRequest(IBundleInstaller::Message::INSTALL_SANDBOX_APP, data, reply, option);
|
||||
if (!ret) {
|
||||
APP_LOGE("install sandbox app failed due to send request fail");
|
||||
return ERR_APPEXECFWK_SANDBOX_INSTALL_SEND_REQUEST_ERROR;
|
||||
@ -251,7 +251,7 @@ ErrCode BundleInstallerProxy::UninstallSandboxApp(const std::string &bundleName,
|
||||
}
|
||||
|
||||
auto ret =
|
||||
SendInstallRequest(BundleInstallerInterfaceCode::UNINSTALL_SANDBOX_APP, data, reply, option);
|
||||
SendInstallRequest(IBundleInstaller::Message::UNINSTALL_SANDBOX_APP, data, reply, option);
|
||||
if (!ret) {
|
||||
APP_LOGE("uninstall sandbox app failed due to send request fail");
|
||||
return ERR_APPEXECFWK_SANDBOX_INSTALL_SEND_REQUEST_ERROR;
|
||||
@ -290,7 +290,7 @@ sptr<IBundleStreamInstaller> BundleInstallerProxy::CreateStreamInstaller(const I
|
||||
statusReceiver->OnFinished(ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, "");
|
||||
return nullptr;
|
||||
}
|
||||
bool res = SendInstallRequest(BundleInstallerInterfaceCode::CREATE_STREAM_INSTALLER, data, reply, option);
|
||||
bool res = SendInstallRequest(IBundleInstaller::Message::CREATE_STREAM_INSTALLER, data, reply, option);
|
||||
if (!res) {
|
||||
APP_LOGE("CreateStreamInstaller failed due to send request fail");
|
||||
statusReceiver->OnFinished(ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, "");
|
||||
@ -326,7 +326,7 @@ bool BundleInstallerProxy::DestoryBundleStreamInstaller(uint32_t streamInstaller
|
||||
|
||||
PARCEL_WRITE_INTERFACE_TOKEN(data, GetDescriptor());
|
||||
PARCEL_WRITE(data, Uint32, streamInstallerId);
|
||||
bool res = SendInstallRequest(BundleInstallerInterfaceCode::DESTORY_STREAM_INSTALLER, data, reply, option);
|
||||
bool res = SendInstallRequest(IBundleInstaller::Message::DESTORY_STREAM_INSTALLER, data, reply, option);
|
||||
if (!res) {
|
||||
APP_LOGE("CreateStreamInstaller failed due to send request fail");
|
||||
return false;
|
||||
@ -498,8 +498,8 @@ ErrCode BundleInstallerProxy::WriteSharedFileToStream(sptr<IBundleStreamInstalle
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
bool BundleInstallerProxy::SendInstallRequest(
|
||||
BundleInstallerInterfaceCode code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
|
||||
bool BundleInstallerProxy::SendInstallRequest(const uint32_t& code, MessageParcel& data, MessageParcel& reply,
|
||||
MessageOption& option)
|
||||
{
|
||||
sptr<IRemoteObject> remote = Remote();
|
||||
if (remote == nullptr) {
|
||||
@ -507,7 +507,7 @@ bool BundleInstallerProxy::SendInstallRequest(
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t ret = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t ret = remote->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGE("fail to sendRequest, for transact is failed and error code is: %{public}d", ret);
|
||||
return false;
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -47,7 +46,7 @@ int BundleStatusCallbackHost::OnRemoteRequest(
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(BundleStatusCallbackInterfaceCode::ON_BUNDLE_STATE_CHANGED): {
|
||||
case static_cast<uint32_t>(IBundleStatusCallback::Message::ON_BUNDLE_STATE_CHANGED): {
|
||||
uint8_t installType = data.ReadUint8();
|
||||
int32_t resultCode = data.ReadInt32();
|
||||
std::string resultMsg = Str16ToStr8(data.ReadString16());
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -210,7 +209,7 @@ void BundleStatusCallbackProxy::OnBundleStateChanged(
|
||||
}
|
||||
|
||||
int32_t ret = remote->SendRequest(
|
||||
static_cast<int32_t>(BundleStatusCallbackInterfaceCode::ON_BUNDLE_STATE_CHANGED), data, reply, option);
|
||||
static_cast<int32_t>(IBundleStatusCallback::Message::ON_BUNDLE_STATE_CHANGED), data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGW("fail to call OnBundleStateChanged, for transact is failed, error code is: %{public}d", ret);
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -85,18 +84,16 @@ ErrCode BundleStreamInstallerHost::HandleInstall(MessageParcel &data, MessagePar
|
||||
|
||||
void BundleStreamInstallerHost::init()
|
||||
{
|
||||
funcMap_.emplace(static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::CREATE_STREAM),
|
||||
[this](MessageParcel &data, MessageParcel &reply)->ErrCode {
|
||||
return this->HandleCreateStream(data, reply);
|
||||
});
|
||||
funcMap_.emplace(static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::CREATE_SHARED_BUNDLE_STREAM),
|
||||
funcMap_.emplace(StreamMessage::CREATE_STREAM, [this](MessageParcel &data, MessageParcel &reply)->ErrCode {
|
||||
return this->HandleCreateStream(data, reply);
|
||||
});
|
||||
funcMap_.emplace(StreamMessage::CREATE_SHARED_BUNDLE_STREAM,
|
||||
[this](MessageParcel &data, MessageParcel &reply)->ErrCode {
|
||||
return this->HandleCreateSharedBundleStream(data, reply);
|
||||
});
|
||||
funcMap_.emplace(static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::STREAM_INSTALL),
|
||||
[this](MessageParcel &data, MessageParcel &reply)->ErrCode {
|
||||
return this->HandleInstall(data, reply);
|
||||
});
|
||||
funcMap_.emplace(StreamMessage::STREAM_INSTALL, [this](MessageParcel &data, MessageParcel &reply)->ErrCode {
|
||||
return this->HandleInstall(data, reply);
|
||||
});
|
||||
}
|
||||
} // AppExecFwk
|
||||
} // OHOS
|
@ -52,7 +52,7 @@ int BundleStreamInstallerProxy::CreateStream(const std::string &hapName)
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendStreamInstallRequest(BundleStreamInstallerInterfaceCode::CREATE_STREAM, data, reply)) {
|
||||
if (!SendStreamInstallRequest(IBundleStreamInstaller::StreamMessage::CREATE_STREAM, data, reply)) {
|
||||
APP_LOGE("fail to SendStreamInstallRequest");
|
||||
return fd;
|
||||
}
|
||||
@ -93,7 +93,7 @@ int BundleStreamInstallerProxy::CreateSharedBundleStream(const std::string &hspN
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendStreamInstallRequest(BundleStreamInstallerInterfaceCode::CREATE_SHARED_BUNDLE_STREAM, data, reply)) {
|
||||
if (!SendStreamInstallRequest(IBundleStreamInstaller::StreamMessage::CREATE_SHARED_BUNDLE_STREAM, data, reply)) {
|
||||
APP_LOGE("fail to SendStreamInstallRequest");
|
||||
return fd;
|
||||
}
|
||||
@ -121,7 +121,7 @@ bool BundleStreamInstallerProxy::Install()
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
bool res = SendStreamInstallRequest(BundleStreamInstallerInterfaceCode::STREAM_INSTALL, data, reply);
|
||||
bool res = SendStreamInstallRequest(IBundleStreamInstaller::StreamMessage::STREAM_INSTALL, data, reply);
|
||||
if (!res) {
|
||||
APP_LOGE("fail to SendStreamInstallRequest");
|
||||
return res;
|
||||
@ -140,8 +140,8 @@ void BundleStreamInstallerProxy::SetInstallerId(uint32_t installerId)
|
||||
installerId_ = installerId;
|
||||
}
|
||||
|
||||
bool BundleStreamInstallerProxy::SendStreamInstallRequest(
|
||||
BundleStreamInstallerInterfaceCode code, MessageParcel& data, MessageParcel& reply)
|
||||
bool BundleStreamInstallerProxy::SendStreamInstallRequest(const uint32_t& code, MessageParcel& data,
|
||||
MessageParcel& reply)
|
||||
{
|
||||
sptr<IRemoteObject> remote = Remote();
|
||||
if (remote == nullptr) {
|
||||
@ -150,7 +150,7 @@ bool BundleStreamInstallerProxy::SendStreamInstallRequest(
|
||||
}
|
||||
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
int32_t ret = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t ret = remote->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGE("fail to sendRequest, for transact is failed and error code is: %{public}d", ret);
|
||||
return false;
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -46,7 +45,7 @@ int CleanCacheCallbackHost::OnRemoteRequest(
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(CleanCacheCallbackInterfaceCode::ON_CLEAN_CACHE_CALLBACK): {
|
||||
case static_cast<uint32_t>(ICleanCacheCallback::Message::ON_CLEAN_CACHE_CALLBACK): {
|
||||
bool succeed = data.ReadBool();
|
||||
OnCleanCacheFinished(succeed);
|
||||
break;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "parcel.h"
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -57,7 +56,7 @@ void CleanCacheCallbackProxy::OnCleanCacheFinished(bool succeeded)
|
||||
}
|
||||
|
||||
int32_t ret = remote->SendRequest(
|
||||
static_cast<int32_t>(CleanCacheCallbackInterfaceCode::ON_CLEAN_CACHE_CALLBACK), data, reply, option);
|
||||
static_cast<int32_t>(ICleanCacheCallback::Message::ON_CLEAN_CACHE_CALLBACK), data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGW("fail to call OnCleanCacheFinished, for transact is failed, error code is: %{public}d", ret);
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -46,13 +45,13 @@ int StatusReceiverHost::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(StatusReceiverInterfaceCode::ON_FINISHED): {
|
||||
case static_cast<uint32_t>(IStatusReceiver::Message::ON_FINISHED): {
|
||||
int32_t resultCode = data.ReadInt32();
|
||||
std::string resultMsg = Str16ToStr8(data.ReadString16());
|
||||
OnFinished(resultCode, resultMsg);
|
||||
break;
|
||||
}
|
||||
case static_cast<uint32_t>(StatusReceiverInterfaceCode::ON_STATUS_NOTIFY): {
|
||||
case static_cast<uint32_t>(IStatusReceiver::Message::ON_STATUS_NOTIFY): {
|
||||
int32_t progress = data.ReadInt32();
|
||||
OnStatusNotify(progress);
|
||||
break;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "hitrace_meter.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -47,13 +46,13 @@ int DefaultAppHost::OnRemoteRequest(
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(DefaultAppInterfaceCode::IS_DEFAULT_APPLICATION):
|
||||
case IDefaultApp::Message::IS_DEFAULT_APPLICATION:
|
||||
return HandleIsDefaultApplication(data, reply);
|
||||
case static_cast<uint32_t>(DefaultAppInterfaceCode::GET_DEFAULT_APPLICATION):
|
||||
case IDefaultApp::Message::GET_DEFAULT_APPLICATION:
|
||||
return HandleGetDefaultApplication(data, reply);
|
||||
case static_cast<uint32_t>(DefaultAppInterfaceCode::SET_DEFAULT_APPLICATION):
|
||||
case IDefaultApp::Message::SET_DEFAULT_APPLICATION:
|
||||
return HandleSetDefaultApplication(data, reply);
|
||||
case static_cast<uint32_t>(DefaultAppInterfaceCode::RESET_DEFAULT_APPLICATION):
|
||||
case IDefaultApp::Message::RESET_DEFAULT_APPLICATION:
|
||||
return HandleResetDefaultApplication(data, reply);
|
||||
default:
|
||||
APP_LOGW("DefaultAppHost receive unknown code, code = %{public}d", code);
|
||||
|
@ -50,7 +50,7 @@ ErrCode DefaultAppProxy::IsDefaultApplication(const std::string& type, bool& isD
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(DefaultAppInterfaceCode::IS_DEFAULT_APPLICATION, data, reply)) {
|
||||
if (!SendRequest(IDefaultApp::Message::IS_DEFAULT_APPLICATION, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -84,7 +84,7 @@ ErrCode DefaultAppProxy::GetDefaultApplication(int32_t userId, const std::string
|
||||
APP_LOGE("write type failed.");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
return GetParcelableInfo<BundleInfo>(DefaultAppInterfaceCode::GET_DEFAULT_APPLICATION, data, bundleInfo);
|
||||
return GetParcelableInfo<BundleInfo>(IDefaultApp::Message::GET_DEFAULT_APPLICATION, data, bundleInfo);
|
||||
}
|
||||
|
||||
ErrCode DefaultAppProxy::SetDefaultApplication(int32_t userId, const std::string& type, const Want& want)
|
||||
@ -111,7 +111,7 @@ ErrCode DefaultAppProxy::SetDefaultApplication(int32_t userId, const std::string
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(DefaultAppInterfaceCode::SET_DEFAULT_APPLICATION, data, reply)) {
|
||||
if (!SendRequest(IDefaultApp::Message::SET_DEFAULT_APPLICATION, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -144,7 +144,7 @@ ErrCode DefaultAppProxy::ResetDefaultApplication(int32_t userId, const std::stri
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(DefaultAppInterfaceCode::RESET_DEFAULT_APPLICATION, data, reply)) {
|
||||
if (!SendRequest(IDefaultApp::Message::RESET_DEFAULT_APPLICATION, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -153,7 +153,7 @@ ErrCode DefaultAppProxy::ResetDefaultApplication(int32_t userId, const std::stri
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ErrCode DefaultAppProxy::GetParcelableInfo(DefaultAppInterfaceCode code, MessageParcel& data, T& parcelableInfo)
|
||||
ErrCode DefaultAppProxy::GetParcelableInfo(IDefaultApp::Message code, MessageParcel& data, T& parcelableInfo)
|
||||
{
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(code, data, reply)) {
|
||||
@ -176,7 +176,7 @@ ErrCode DefaultAppProxy::GetParcelableInfo(DefaultAppInterfaceCode code, Message
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
bool DefaultAppProxy::SendRequest(DefaultAppInterfaceCode code, MessageParcel& data, MessageParcel& reply)
|
||||
bool DefaultAppProxy::SendRequest(IDefaultApp::Message code, MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
sptr<IRemoteObject> remote = Remote();
|
||||
@ -184,7 +184,7 @@ bool DefaultAppProxy::SendRequest(DefaultAppInterfaceCode code, MessageParcel& d
|
||||
APP_LOGE("failed to send request %{public}d due to remote object null.", code);
|
||||
return false;
|
||||
}
|
||||
int32_t result = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t result = remote->SendRequest(code, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
APP_LOGE("receive error code %{public}d in transact %{public}d", result, code);
|
||||
return false;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "hitrace_meter.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -37,23 +36,22 @@ OverlayManagerHost::~OverlayManagerHost()
|
||||
|
||||
void OverlayManagerHost::init()
|
||||
{
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_ALL_OVERLAY_MODULE_INFO),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_ALL_OVERLAY_MODULE_INFO,
|
||||
&OverlayManagerHost::HandleGetAllOverlayModuleInfo);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_NAME),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_NAME,
|
||||
&OverlayManagerHost::HandleGetOverlayModuleInfoByName);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO,
|
||||
&OverlayManagerHost::HandleGetOverlayModuleInfo);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_TARGET_OVERLAY_MODULE_INFOS),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_TARGET_OVERLAY_MODULE_INFOS,
|
||||
&OverlayManagerHost::HandleGetTargetOverlayModuleInfo);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME,
|
||||
&OverlayManagerHost::HandleGetOverlayModuleInfoByBundleName);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET,
|
||||
&OverlayManagerHost::HandleGetOverlayBundleInfoForTarget);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_FOR_TARGET),
|
||||
funcMap_.emplace(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_FOR_TARGET,
|
||||
&OverlayManagerHost::HandleGetOverlayModuleInfoForTarget);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED),
|
||||
&OverlayManagerHost::HandleSetOverlayEnabled);
|
||||
funcMap_.emplace(static_cast<uint32_t>(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED_FOR_SELF),
|
||||
funcMap_.emplace(IOverlayManager::Message::SET_OVERLAY_ENABLED, &OverlayManagerHost::HandleSetOverlayEnabled);
|
||||
funcMap_.emplace(IOverlayManager::Message::SET_OVERLAY_ENABLED_FOR_SELF,
|
||||
&OverlayManagerHost::HandleSetOverlayEnabledForSelf);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ ErrCode OverlayManagerProxy::GetAllOverlayModuleInfo(const std::string &bundleNa
|
||||
}
|
||||
|
||||
return GetParcelableInfosWithErrCode<OverlayModuleInfo>(
|
||||
OverlayManagerInterfaceCode::GET_ALL_OVERLAY_MODULE_INFO, data, overlayModuleInfo);
|
||||
IOverlayManager::Message::GET_ALL_OVERLAY_MODULE_INFO, data, overlayModuleInfo);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::GetOverlayModuleInfo(const std::string &bundleName, const std::string &moduleName,
|
||||
@ -92,7 +92,7 @@ ErrCode OverlayManagerProxy::GetOverlayModuleInfo(const std::string &bundleName,
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
|
||||
return GetParcelableInfo(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_NAME, data, overlayModuleInfo);
|
||||
return GetParcelableInfo(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_NAME, data, overlayModuleInfo);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::GetOverlayModuleInfo(const std::string &moduleName,
|
||||
@ -120,7 +120,7 @@ ErrCode OverlayManagerProxy::GetOverlayModuleInfo(const std::string &moduleName,
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
|
||||
return GetParcelableInfo(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO, data, overlayModuleInfo);
|
||||
return GetParcelableInfo(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO, data, overlayModuleInfo);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::GetTargetOverlayModuleInfo(const std::string &targetModuleName,
|
||||
@ -150,7 +150,7 @@ ErrCode OverlayManagerProxy::GetTargetOverlayModuleInfo(const std::string &targe
|
||||
}
|
||||
|
||||
return GetParcelableInfosWithErrCode<OverlayModuleInfo>(
|
||||
OverlayManagerInterfaceCode::GET_TARGET_OVERLAY_MODULE_INFOS, data, overlayModuleInfos);
|
||||
IOverlayManager::Message::GET_TARGET_OVERLAY_MODULE_INFOS, data, overlayModuleInfos);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::GetOverlayModuleInfoByBundleName(const std::string &bundleName,
|
||||
@ -183,7 +183,7 @@ ErrCode OverlayManagerProxy::GetOverlayModuleInfoByBundleName(const std::string
|
||||
}
|
||||
|
||||
return GetParcelableInfosWithErrCode<OverlayModuleInfo>(
|
||||
OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, data, overlayModuleInfos);
|
||||
IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, data, overlayModuleInfos);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::GetOverlayModuleInfoForTarget(const std::string &targetBundleName,
|
||||
@ -217,7 +217,7 @@ ErrCode OverlayManagerProxy::GetOverlayModuleInfoForTarget(const std::string &ta
|
||||
}
|
||||
|
||||
return GetParcelableInfosWithErrCode<OverlayModuleInfo>(
|
||||
OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_FOR_TARGET, data, overlayModuleInfo);
|
||||
IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_FOR_TARGET, data, overlayModuleInfo);
|
||||
}
|
||||
|
||||
ErrCode OverlayManagerProxy::SetOverlayEnabledForSelf(const std::string &moduleName, bool isEnabled,
|
||||
@ -250,7 +250,7 @@ ErrCode OverlayManagerProxy::SetOverlayEnabledForSelf(const std::string &moduleN
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendTransactCmd(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED_FOR_SELF, data, reply)) {
|
||||
if (!SendTransactCmd(IOverlayManager::Message::SET_OVERLAY_ENABLED_FOR_SELF, data, reply)) {
|
||||
APP_LOGE("SendTransactCmd failed");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -294,7 +294,7 @@ ErrCode OverlayManagerProxy::SetOverlayEnabled(const std::string &bundleName, co
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendTransactCmd(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED, data, reply)) {
|
||||
if (!SendTransactCmd(IOverlayManager::Message::SET_OVERLAY_ENABLED, data, reply)) {
|
||||
APP_LOGE("SendTransactCmd failed");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -332,11 +332,11 @@ ErrCode OverlayManagerProxy::GetOverlayBundleInfoForTarget(const std::string &ta
|
||||
}
|
||||
|
||||
return GetParcelableInfosWithErrCode<OverlayBundleInfo>(
|
||||
OverlayManagerInterfaceCode::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET, data, overlayBundleInfo);
|
||||
IOverlayManager::Message::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET, data, overlayBundleInfo);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ErrCode OverlayManagerProxy::GetParcelableInfo(OverlayManagerInterfaceCode code, MessageParcel &data, T &parcelableInfo)
|
||||
ErrCode OverlayManagerProxy::GetParcelableInfo(IOverlayManager::Message code, MessageParcel &data, T &parcelableInfo)
|
||||
{
|
||||
MessageParcel reply;
|
||||
if (!SendTransactCmd(code, data, reply)) {
|
||||
@ -361,7 +361,7 @@ ErrCode OverlayManagerProxy::GetParcelableInfo(OverlayManagerInterfaceCode code,
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ErrCode OverlayManagerProxy::GetParcelableInfosWithErrCode(OverlayManagerInterfaceCode code, MessageParcel &data,
|
||||
ErrCode OverlayManagerProxy::GetParcelableInfosWithErrCode(IOverlayManager::Message code, MessageParcel &data,
|
||||
std::vector<T> &parcelableInfos)
|
||||
{
|
||||
MessageParcel reply;
|
||||
@ -388,7 +388,7 @@ ErrCode OverlayManagerProxy::GetParcelableInfosWithErrCode(OverlayManagerInterfa
|
||||
return res;
|
||||
}
|
||||
|
||||
bool OverlayManagerProxy::SendTransactCmd(OverlayManagerInterfaceCode code, MessageParcel &data, MessageParcel &reply)
|
||||
bool OverlayManagerProxy::SendTransactCmd(IOverlayManager::Message code, MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
|
||||
@ -397,7 +397,7 @@ bool OverlayManagerProxy::SendTransactCmd(OverlayManagerInterfaceCode code, Mess
|
||||
APP_LOGE("fail to send transact cmd %{public}d due to remote object", code);
|
||||
return false;
|
||||
}
|
||||
int32_t result = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t result = remote->SendRequest(code, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
APP_LOGE("receive error transact code %{public}d in transact cmd %{public}d", result, code);
|
||||
return false;
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "hitrace_meter.h"
|
||||
#include "ipc_types.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -50,13 +49,13 @@ int QuickFixManagerHost::OnRemoteRequest(uint32_t code, MessageParcel& data,
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(QuickFixManagerInterfaceCode::DEPLOY_QUICK_FIX):
|
||||
case IQuickFixManager::Message::DEPLOY_QUICK_FIX:
|
||||
return HandleDeployQuickFix(data, reply);
|
||||
case static_cast<uint32_t>(QuickFixManagerInterfaceCode::SWITCH_QUICK_FIX):
|
||||
case IQuickFixManager::Message::SWITCH_QUICK_FIX:
|
||||
return HandleSwitchQuickFix(data, reply);
|
||||
case static_cast<uint32_t>(QuickFixManagerInterfaceCode::DELETE_QUICK_FIX):
|
||||
case IQuickFixManager::Message::DELETE_QUICK_FIX:
|
||||
return HandleDeleteQuickFix(data, reply);
|
||||
case static_cast<uint32_t>(QuickFixManagerInterfaceCode::CREATE_FD):
|
||||
case IQuickFixManager::Message::CREATE_FD:
|
||||
return HandleCreateFd(data, reply);
|
||||
default:
|
||||
APP_LOGW("QuickFixManagerHost receive unknown code, code = %{public}d", code);
|
||||
|
@ -68,7 +68,7 @@ ErrCode QuickFixManagerProxy::DeployQuickFix(const std::vector<std::string> &bun
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(QuickFixManagerInterfaceCode::DEPLOY_QUICK_FIX, data, reply)) {
|
||||
if (!SendRequest(IQuickFixManager::Message::DEPLOY_QUICK_FIX, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_BUNDLEMANAGER_QUICK_FIX_SEND_REQUEST_FAILED;
|
||||
}
|
||||
@ -106,7 +106,7 @@ ErrCode QuickFixManagerProxy::SwitchQuickFix(const std::string &bundleName, bool
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(QuickFixManagerInterfaceCode::SWITCH_QUICK_FIX, data, reply)) {
|
||||
if (!SendRequest(IQuickFixManager::Message::SWITCH_QUICK_FIX, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_BUNDLEMANAGER_QUICK_FIX_SEND_REQUEST_FAILED;
|
||||
}
|
||||
@ -140,7 +140,7 @@ ErrCode QuickFixManagerProxy::DeleteQuickFix(const std::string &bundleName,
|
||||
}
|
||||
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(QuickFixManagerInterfaceCode::DELETE_QUICK_FIX, data, reply)) {
|
||||
if (!SendRequest(IQuickFixManager::Message::DELETE_QUICK_FIX, data, reply)) {
|
||||
APP_LOGE("SendRequest failed.");
|
||||
return ERR_BUNDLEMANAGER_QUICK_FIX_SEND_REQUEST_FAILED;
|
||||
}
|
||||
@ -165,7 +165,7 @@ ErrCode QuickFixManagerProxy::CreateFd(const std::string &fileName, int32_t &fd,
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
MessageParcel reply;
|
||||
if (!SendRequest(QuickFixManagerInterfaceCode::CREATE_FD, data, reply)) {
|
||||
if (!SendRequest(IQuickFixManager::Message::CREATE_FD, data, reply)) {
|
||||
APP_LOGE("send request failed.");
|
||||
return ERR_APPEXECFWK_PARCEL_ERROR;
|
||||
}
|
||||
@ -241,7 +241,7 @@ ErrCode QuickFixManagerProxy::CopyFiles(
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
bool QuickFixManagerProxy::SendRequest(QuickFixManagerInterfaceCode code, MessageParcel &data, MessageParcel &reply)
|
||||
bool QuickFixManagerProxy::SendRequest(IQuickFixManager::Message code, MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
sptr<IRemoteObject> remote = Remote();
|
||||
@ -249,7 +249,7 @@ bool QuickFixManagerProxy::SendRequest(QuickFixManagerInterfaceCode code, Messag
|
||||
APP_LOGE("failed to send request %{public}d due to remote object null.", code);
|
||||
return false;
|
||||
}
|
||||
int32_t result = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t result = remote->SendRequest(code, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
APP_LOGE("receive error code %{public}d in transact %{public}d", result, code);
|
||||
return false;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "ipc_types.h"
|
||||
#include "string_ex.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -37,11 +36,11 @@ QuickFixStatusCallbackHost::~QuickFixStatusCallbackHost()
|
||||
|
||||
void QuickFixStatusCallbackHost::Init()
|
||||
{
|
||||
funcMap_.emplace(static_cast<uint32_t>(QuickFixStatusCallbackInterfaceCode::ON_PATCH_DEPLOYED),
|
||||
funcMap_.emplace(IQuickFixStatusCallback::Message::ON_PATCH_DEPLOYED,
|
||||
&QuickFixStatusCallbackHost::HandleOnPatchDeployed);
|
||||
funcMap_.emplace(static_cast<uint32_t>(QuickFixStatusCallbackInterfaceCode::ON_PATCH_SWITCHED),
|
||||
funcMap_.emplace(IQuickFixStatusCallback::Message::ON_PATCH_SWITCHED,
|
||||
&QuickFixStatusCallbackHost::HandleOnPatchSwitched);
|
||||
funcMap_.emplace(static_cast<uint32_t>(QuickFixStatusCallbackInterfaceCode::ON_PATCH_DELETED),
|
||||
funcMap_.emplace(IQuickFixStatusCallback::Message::ON_PATCH_DELETED,
|
||||
&QuickFixStatusCallbackHost::HandleOnPatchDeleted);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ void QuickFixStatusCallbackProxy::OnPatchDeployed(const std::shared_ptr<QuickFix
|
||||
MessageParcel reply;
|
||||
WRITE_PARCEL_AND_RETURN(InterfaceToken, data, QuickFixStatusCallbackProxy::GetDescriptor());
|
||||
WRITE_PARCEL_AND_RETURN(Parcelable, data, result.get());
|
||||
if (!SendTransactCmd(QuickFixStatusCallbackInterfaceCode::ON_PATCH_DEPLOYED, data, reply)) {
|
||||
if (!SendTransactCmd(IQuickFixStatusCallback::Message::ON_PATCH_DEPLOYED, data, reply)) {
|
||||
APP_LOGE("fail to OnPatchDeployed due to transact command fail");
|
||||
}
|
||||
}
|
||||
@ -52,7 +52,7 @@ void QuickFixStatusCallbackProxy::OnPatchSwitched(const std::shared_ptr<QuickFix
|
||||
MessageParcel reply;
|
||||
WRITE_PARCEL_AND_RETURN(InterfaceToken, data, QuickFixStatusCallbackProxy::GetDescriptor());
|
||||
WRITE_PARCEL_AND_RETURN(Parcelable, data, result.get());
|
||||
if (!SendTransactCmd(QuickFixStatusCallbackInterfaceCode::ON_PATCH_SWITCHED, data, reply)) {
|
||||
if (!SendTransactCmd(IQuickFixStatusCallback::Message::ON_PATCH_SWITCHED, data, reply)) {
|
||||
APP_LOGE("fail to OnPatchSwitched due to transact command fail");
|
||||
}
|
||||
}
|
||||
@ -63,13 +63,12 @@ void QuickFixStatusCallbackProxy::OnPatchDeleted(const std::shared_ptr<QuickFixR
|
||||
MessageParcel reply;
|
||||
WRITE_PARCEL_AND_RETURN(InterfaceToken, data, QuickFixStatusCallbackProxy::GetDescriptor());
|
||||
WRITE_PARCEL_AND_RETURN(Parcelable, data, result.get());
|
||||
if (!SendTransactCmd(QuickFixStatusCallbackInterfaceCode::ON_PATCH_DELETED, data, reply)) {
|
||||
if (!SendTransactCmd(IQuickFixStatusCallback::Message::ON_PATCH_DELETED, data, reply)) {
|
||||
APP_LOGE("fail to OnPatchDeleted due to transact command fail");
|
||||
}
|
||||
}
|
||||
|
||||
bool QuickFixStatusCallbackProxy::SendTransactCmd(
|
||||
QuickFixStatusCallbackInterfaceCode code, MessageParcel &data, MessageParcel &reply)
|
||||
bool QuickFixStatusCallbackProxy::SendTransactCmd(uint32_t code, MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
|
||||
@ -78,7 +77,7 @@ bool QuickFixStatusCallbackProxy::SendTransactCmd(
|
||||
APP_LOGE("fail to send transact cmd %{public}d due to remote object", code);
|
||||
return false;
|
||||
}
|
||||
int32_t result = remote->SendRequest(static_cast<uint32_t>(code), data, reply, option);
|
||||
int32_t result = remote->SendRequest(code, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
APP_LOGE("receive error transact code %{public}d in transact cmd %{public}d", result, code);
|
||||
return false;
|
||||
|
@ -16,6 +16,8 @@
|
||||
#ifndef OHOS_BUNDLE_MANAGER_SERVICE_IPC_INTERFACE_CODE_H
|
||||
#define OHOS_BUNDLE_MANAGER_SERVICE_IPC_INTERFACE_CODE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* SAID: 401 */
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
@ -18,10 +18,10 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "iremote_proxy.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_framework_services_ipc_interface_code.h"
|
||||
#include "iremote_proxy.h"
|
||||
#include "ipc/installd_interface.h"
|
||||
#include "bundle_manager_services_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "bundle_permission_mgr.h"
|
||||
#include "bundle_sandbox_app_helper.h"
|
||||
#include "bundle_util.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -68,34 +67,34 @@ int BundleInstallerHost::OnRemoteRequest(
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::INSTALL):
|
||||
case IBundleInstaller::Message::INSTALL:
|
||||
HandleInstallMessage(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::INSTALL_MULTIPLE_HAPS):
|
||||
case IBundleInstaller::Message::INSTALL_MULTIPLE_HAPS:
|
||||
HandleInstallMultipleHapsMessage(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::UNINSTALL):
|
||||
case IBundleInstaller::Message::UNINSTALL:
|
||||
HandleUninstallMessage(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::UNINSTALL_MODULE):
|
||||
case IBundleInstaller::Message::UNINSTALL_MODULE:
|
||||
HandleUninstallModuleMessage(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::UNINSTALL_BY_UNINSTALL_PARAM):
|
||||
case IBundleInstaller::Message::UNINSTALL_BY_UNINSTALL_PARAM:
|
||||
HandleUninstallByUninstallParam(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::RECOVER):
|
||||
case IBundleInstaller::Message::RECOVER:
|
||||
HandleRecoverMessage(data);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::INSTALL_SANDBOX_APP):
|
||||
case IBundleInstaller::Message::INSTALL_SANDBOX_APP:
|
||||
HandleInstallSandboxApp(data, reply);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::UNINSTALL_SANDBOX_APP):
|
||||
case IBundleInstaller::Message::UNINSTALL_SANDBOX_APP:
|
||||
HandleUninstallSandboxApp(data, reply);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::CREATE_STREAM_INSTALLER):
|
||||
case IBundleInstaller::Message::CREATE_STREAM_INSTALLER:
|
||||
HandleCreateStreamInstaller(data, reply);
|
||||
break;
|
||||
case static_cast<uint32_t>(BundleInstallerInterfaceCode::DESTORY_STREAM_INSTALLER):
|
||||
case IBundleInstaller::Message::DESTORY_STREAM_INSTALLER:
|
||||
HandleDestoryBundleStreamInstaller(data, reply);
|
||||
break;
|
||||
default:
|
||||
|
@ -16,10 +16,10 @@
|
||||
#include "bundle_manager_callback_stub.h"
|
||||
|
||||
#include "app_log_wrapper.h"
|
||||
#include "bundle_framework_services_ipc_interface_code.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "message_parcel.h"
|
||||
#include "string_ex.h"
|
||||
#include "bundle_manager_services_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
@ -18,10 +18,10 @@
|
||||
#include "app_log_wrapper.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_constants.h"
|
||||
#include "bundle_framework_services_ipc_interface_code.h"
|
||||
#include "bundle_memory_guard.h"
|
||||
#include "parcel_macro.h"
|
||||
#include "string_ex.h"
|
||||
#include "bundle_manager_services_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -71,16 +71,12 @@ void InstalldHost::init()
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::IS_DIR_EMPTY), &InstalldHost::HandleIsDirEmpty);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::OBTAIN_QUICK_FIX_DIR),
|
||||
&InstalldHost::HandObtainQuickFixFileDir);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::COPY_FILES),
|
||||
&InstalldHost::HandCopyFiles);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::EXTRACT_FILES),
|
||||
&InstalldHost::HandleExtractFiles);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::COPY_FILES), &InstalldHost::HandCopyFiles);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::EXTRACT_FILES), &InstalldHost::HandleExtractFiles);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::GET_NATIVE_LIBRARY_FILE_NAMES),
|
||||
&InstalldHost::HandGetNativeLibraryFileNames);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::EXECUTE_AOT),
|
||||
&InstalldHost::HandleExecuteAOT);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::IS_EXIST_FILE),
|
||||
&InstalldHost::HandleIsExistFile);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::EXECUTE_AOT), &InstalldHost::HandleExecuteAOT);
|
||||
funcMap_.emplace(static_cast<uint32_t>(InstalldInterfaceCode::IS_EXIST_FILE), &InstalldHost::HandleIsExistFile);
|
||||
}
|
||||
|
||||
int InstalldHost::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "app_log_wrapper.h"
|
||||
#include "appexecfwk_errors.h"
|
||||
#include "bundle_mgr_service.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
@ -563,8 +562,7 @@ void StatusReceiverProxy::OnStatusNotify(const int32_t progress)
|
||||
}
|
||||
|
||||
int32_t ret =
|
||||
remote->SendRequest(
|
||||
static_cast<int32_t>(StatusReceiverInterfaceCode::ON_STATUS_NOTIFY), data, reply, option);
|
||||
remote->SendRequest(static_cast<int32_t>(IStatusReceiver::Message::ON_STATUS_NOTIFY), data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGE("fail to call OnStatusNotify, for transact is failed, error code is: %{public}d", ret);
|
||||
}
|
||||
@ -599,8 +597,7 @@ void StatusReceiverProxy::OnFinished(const int32_t resultCode, const std::string
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t ret = remote->SendRequest(
|
||||
static_cast<int32_t>(StatusReceiverInterfaceCode::ON_FINISHED), data, reply, option);
|
||||
int32_t ret = remote->SendRequest(static_cast<int32_t>(IStatusReceiver::Message::ON_FINISHED), data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
APP_LOGE("fail to call OnFinished, for transact is failed, error code is: %{public}d", ret);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "bundle_data_mgr.h"
|
||||
#include "bundle_framework_services_ipc_interface_code.h"
|
||||
#include "bundle_mgr_service.h"
|
||||
#include "installd/installd_service.h"
|
||||
#include "bundle_manager_callback.h"
|
||||
@ -26,7 +27,6 @@
|
||||
#include "mock_bundle_manager_callback_stub.h"
|
||||
#include "bundle_distributed_manager.h"
|
||||
#include "bundle_manager_callback_proxy.h"
|
||||
#include "bundle_manager_services_ipc_interface_code.h"
|
||||
#define private public
|
||||
|
||||
using namespace testing::ext;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#define private public
|
||||
#include "overlay_manager_proxy.h"
|
||||
#include "overlay_manager_host.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
#undef private
|
||||
#include "bundle_overlay_manager_host_impl.h"
|
||||
|
||||
@ -443,8 +442,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_1100, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_ALL_OVERLAY_MODULE_INFO), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_ALL_OVERLAY_MODULE_INFO, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -472,8 +471,7 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_1200, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO, data, reply, option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -499,8 +497,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_1300, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_BUNDLE_INFO_FOR_TARGET, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -528,8 +526,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_1400, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_FOR_TARGET), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_FOR_TARGET, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -558,8 +556,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_1500, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(TEST_HOST_DESCRIPTOR);
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_FOR_TARGET), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_FOR_TARGET, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, OBJECT_NULL);
|
||||
}
|
||||
|
||||
@ -672,8 +670,7 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_2200, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::SET_OVERLAY_ENABLED, data, reply, option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
ret = reply.ReadInt32();
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
@ -802,8 +799,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_3000, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_NAME), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_NAME, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -829,8 +826,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_3100, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_TARGET_OVERLAY_MODULE_INFOS), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_TARGET_OVERLAY_MODULE_INFOS, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -858,9 +855,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_3200, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME),
|
||||
data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, data,
|
||||
reply, option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
||||
ret = reply.ReadInt32();
|
||||
@ -888,8 +884,8 @@ HWTEST_F(BmsBundleOverlayIpcTest, OverlayIpcTest_3300, Function | SmallTest | Le
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
data.WriteInterfaceToken(OverlayManagerHost::GetDescriptor());
|
||||
auto ret = overlayHost->OnRemoteRequest(
|
||||
static_cast<uint32_t>(OverlayManagerInterfaceCode::SET_OVERLAY_ENABLED_FOR_SELF), data, reply, option);
|
||||
auto ret = overlayHost->OnRemoteRequest(IOverlayManager::Message::SET_OVERLAY_ENABLED_FOR_SELF, data, reply,
|
||||
option);
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
ret = reply.ReadInt32();
|
||||
EXPECT_EQ(ret, ERR_OK);
|
||||
|
@ -19,7 +19,6 @@
|
||||
#define private public
|
||||
#include "clean_cache_callback_host.h"
|
||||
#include "bundle_user_mgr_host.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
#undef private
|
||||
|
||||
using namespace testing::ext;
|
||||
@ -56,7 +55,7 @@ void BmsCleanCacheCallbackHostTest::TearDown() {}
|
||||
*/
|
||||
HWTEST_F(BmsCleanCacheCallbackHostTest, CleanCacheCallbackHost_001, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(CleanCacheCallbackInterfaceCode::ON_CLEAN_CACHE_CALLBACK);
|
||||
uint32_t code = static_cast<uint32_t>(ICleanCacheCallback::Message::ON_CLEAN_CACHE_CALLBACK);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
@ -74,7 +73,7 @@ HWTEST_F(BmsCleanCacheCallbackHostTest, CleanCacheCallbackHost_001, TestSize.Lev
|
||||
*/
|
||||
HWTEST_F(BmsCleanCacheCallbackHostTest, CleanCacheCallbackHost_002, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(CleanCacheCallbackInterfaceCode::ON_CLEAN_CACHE_CALLBACK);
|
||||
uint32_t code = static_cast<uint32_t>(ICleanCacheCallback::Message::ON_CLEAN_CACHE_CALLBACK);
|
||||
MessageParcel data;
|
||||
sptr<MockCleanCacheCallbackHost> cleanCacheCallbackHost = new (std::nothrow) MockCleanCacheCallbackHost();
|
||||
data.WriteInterfaceToken(CleanCacheCallbackHost::GetDescriptor());
|
||||
@ -94,7 +93,7 @@ HWTEST_F(BmsCleanCacheCallbackHostTest, CleanCacheCallbackHost_002, TestSize.Lev
|
||||
*/
|
||||
HWTEST_F(BmsCleanCacheCallbackHostTest, CleanCacheCallbackHost_003, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(CleanCacheCallbackInterfaceCode::ON_CLEAN_CACHE_CALLBACK) + 1;
|
||||
uint32_t code = static_cast<uint32_t>(ICleanCacheCallback::Message::ON_CLEAN_CACHE_CALLBACK) + 1;
|
||||
MessageParcel data;
|
||||
sptr<MockCleanCacheCallbackHost> cleanCacheCallbackHost = new (std::nothrow) MockCleanCacheCallbackHost();
|
||||
data.WriteInterfaceToken(CleanCacheCallbackHost::GetDescriptor());
|
||||
|
@ -19,7 +19,6 @@
|
||||
#define private public
|
||||
#include "bundle_stream_installer_host.h"
|
||||
#include "bundle_user_mgr_host.h"
|
||||
#include "bundle_appexecfwk_core_ipc_interface_code.h"
|
||||
#undef private
|
||||
|
||||
using namespace testing::ext;
|
||||
@ -92,7 +91,7 @@ HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_001, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_002, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::STREAM_INSTALL);
|
||||
uint32_t code = BundleStreamInstallerHost::StreamMessage::STREAM_INSTALL;
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
@ -110,7 +109,7 @@ HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_002, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_003, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::STREAM_INSTALL);
|
||||
uint32_t code = BundleStreamInstallerHost::StreamMessage::STREAM_INSTALL;
|
||||
MessageParcel data;
|
||||
data.WriteInterfaceToken(BundleStreamInstallerHost::GetDescriptor());
|
||||
MessageParcel reply;
|
||||
@ -133,7 +132,7 @@ HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_003, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_004, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::STREAM_INSTALL);
|
||||
uint32_t code = BundleStreamInstallerHost::StreamMessage::STREAM_INSTALL;
|
||||
MessageParcel data;
|
||||
data.WriteInterfaceToken(BundleStreamInstallerHost::GetDescriptor());
|
||||
MessageParcel reply;
|
||||
@ -156,7 +155,7 @@ HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_004, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(BmsStreamInstallerHostTest, StreamInstallerHost_005, TestSize.Level1)
|
||||
{
|
||||
uint32_t code = static_cast<uint32_t>(BundleStreamInstallerInterfaceCode::CREATE_STREAM);
|
||||
uint32_t code = BundleStreamInstallerHost::StreamMessage::CREATE_STREAM;
|
||||
MessageParcel data;
|
||||
data.WriteInterfaceToken(BundleStreamInstallerHost::GetDescriptor());
|
||||
MessageParcel reply;
|
||||
|
Loading…
Reference in New Issue
Block a user