mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-23 15:01:17 +00:00
fix get root node failed
Signed-off-by: yichengzhao <yichengzhao1@huawei.com> Change-Id: I1f7730389436e1035570ddb3153a74f5b727c53c
This commit is contained in:
parent
4a66f93854
commit
58b4d3f5cd
@ -14,6 +14,10 @@
|
||||
*/
|
||||
|
||||
#include "accessible_ability_client_impl.h"
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
#include "accessible_ability_client.h"
|
||||
#include "display_manager.h"
|
||||
#include "hilog_wrapper.h"
|
||||
@ -23,6 +27,8 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Accessibility {
|
||||
// tmp: wait for window registing when client connect done
|
||||
constexpr int WAIT_WINDOW_REGIST = 500;
|
||||
namespace {
|
||||
constexpr int32_t NONE_ID = -1;
|
||||
std::mutex g_Mutex;
|
||||
@ -111,6 +117,7 @@ void AccessibleAbilityClientImpl::Init(const sptr<IAccessibleAbilityChannel> &ch
|
||||
HILOG_DEBUG("Add death recipient");
|
||||
object->AddDeathRecipient(deathRecipient_);
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(WAIT_WINDOW_REGIST));
|
||||
listener_->OnAbilityConnected();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user