!109 对应UITest连接无障碍服务失败

Merge pull request !109 from Mupceet/release_420_uitest
This commit is contained in:
openharmony_ci 2022-04-20 14:26:15 +00:00 committed by Gitee
commit deaaa95654
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 28 additions and 2 deletions

View File

@ -79,6 +79,17 @@ public:
int32_t GetChannelId();
void OnAbilityConnectDoneSync(const AppExecFwk::ElementName &element, const sptr<IRemoteObject> &remoteObject,
int32_t resultCode)
{
InnerOnAbilityConnectDone(element, remoteObject, resultCode);
}
void OnAbilityDisconnectDoneSync(const AppExecFwk::ElementName &element, int32_t resultCode)
{
InnerOnAbilityDisconnectDone(element, resultCode);
}
private:
class AccessibleAbilityConnectionDeathRecipient final : public IRemoteObject::DeathRecipient {
public:

View File

@ -1494,7 +1494,7 @@ void AccessibleAbilityManagerService::AddUITestClient(const sptr<IRemoteObject>
HILOG_ERROR("connection is null");
return;
}
connection->OnAbilityConnectDone(*elementName, obj, 0);
connection->OnAbilityConnectDoneSync(*elementName, obj, 0);
}
bool AccessibleAbilityManagerService::DisableUITestAbility()
@ -1545,7 +1545,7 @@ void AccessibleAbilityManagerService::RemoveUITestClient(sptr<AccessibleAbilityC
return;
}
accountData->RemoveInstalledAbility(UI_TEST_BUNDLE_NAME);
connection->OnAbilityDisconnectDone(connection->GetElementName(), 0);
connection->OnAbilityDisconnectDoneSync(connection->GetElementName(), 0);
}
int32_t AccessibleAbilityManagerService::GetActiveWindow()

View File

@ -276,5 +276,20 @@ void AccessibleAbilityConnection::OnAccessibilityEvent(AccessibilityEventInfo &e
{
(void)eventInfo;
}
void AccessibleAbilityConnection::InnerOnAbilityConnectDone(const AppExecFwk::ElementName &element,
const sptr<IRemoteObject> &remoteObject, int32_t resultCode)
{
(void)element;
(void)remoteObject;
(void)resultCode;
}
void AccessibleAbilityConnection::InnerOnAbilityDisconnectDone(const AppExecFwk::ElementName &element,
int32_t resultCode)
{
(void)element;
(void)resultCode;
}
} // namespace Accessibility
} // namespace OHOS