mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
modify descriptor
Signed-off-by: yuwenze <yuwenze1@huawei.com> Change-Id: I7064c8191d0257f6a752f5e54815024b7a64b2ab
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user