modify descriptor

Signed-off-by: yuwenze <yuwenze1@huawei.com>
Change-Id: I7064c8191d0257f6a752f5e54815024b7a64b2ab
This commit is contained in:
yuwenze
2023-07-19 06:35:37 +00:00
parent f1533c5fab
commit dd3dddff4f
2 changed files with 6 additions and 3 deletions
@@ -33,7 +33,7 @@ class Want;
*/
class IExtensionManager : public OHOS::IRemoteBroker {
public:
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.aafwk.AbilityManager")
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.aafwk.ExtensionManager")
/**
* Connect ability common method.
@@ -27,6 +27,9 @@
namespace OHOS {
namespace AAFwk {
namespace {
const std::u16string extensionDescriptor = u"ohos.aafwk.ExtensionManager";
}
AbilityManagerStub::AbilityManagerStub()
{
FirstStepInit();
@@ -313,9 +316,9 @@ void AbilityManagerStub::ThirdStepInit()
int AbilityManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
{
std::u16string descriptor = AbilityManagerStub::GetDescriptor();
std::u16string abilityDescriptor = AbilityManagerStub::GetDescriptor();
std::u16string remoteDescriptor = data.ReadInterfaceToken();
if (descriptor != remoteDescriptor) {
if (abilityDescriptor != remoteDescriptor && extensionDescriptor != remoteDescriptor) {
HILOG_ERROR("local descriptor is not equal to remote");
return ERR_INVALID_STATE;
}