{"action":"opened","issue":{"url":"https://api.github.com/repos/openatx/uiautomator2/issues/41","repository_url":"https://api.github.com/repos/openatx/uiautomator2","labels_url":"https://api.github.com/repos/openatx/uiautomator2/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/openatx/uiautomator2/issues/41/comments","events_url":"https://api.github.com/repos/openatx/uiautomator2/issues/41/events","html_url":"https://github.com/openatx/uiautomator2/issues/41","id":294284789,"number":41,"title":"vivo Y67上执行d.info非常慢","user":{"login":"codeskyblue","id":3281689,"avatar_url":"https://avatars3.githubusercontent.com/u/3281689?v=4","gravatar_id":"","url":"https://api.github.com/users/codeskyblue","html_url":"https://github.com/codeskyblue","followers_url":"https://api.github.com/users/codeskyblue/followers","following_url":"https://api.github.com/users/codeskyblue/following{/other_user}","gists_url":"https://api.github.com/users/codeskyblue/gists{/gist_id}","starred_url":"https://api.github.com/users/codeskyblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeskyblue/subscriptions","organizations_url":"https://api.github.com/users/codeskyblue/orgs","repos_url":"https://api.github.com/users/codeskyblue/repos","events_url":"https://api.github.com/users/codeskyblue/events{/privacy}","received_events_url":"https://api.github.com/users/codeskyblue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-05T06:16:39Z","updated_at":"2018-02-05T06:16:39Z","closed_at":null,"author_association":"OWNER","body":"原因分析.\r\n\r\n`d.info`中会调用`UiDevice.getDisplayRotation()` 之后，该函数的实现如下\r\n\r\n```java\r\n    public int getDisplayRotation() {\r\n        Tracer.trace();\r\n        waitForIdle();\r\n        return getAutomatorBridge().getRotation();\r\n    }\r\n```\r\n\r\nwaitForIdle为等待当前UI稳定的意思。默认等待时间10s。（基本都会超时）\r\n\r\n>另外这里uiautomator2也有bug，参考链接 <https://www.ydkf.me/archives/22>\r\n\r\n## 解决方法\r\n![image](https://user-images.githubusercontent.com/3281689/35790738-dddd4d84-0a7e-11e8-9730-e58444a2c8b0.png)\r\n\r\n将上方的黄色提示框关掉之后。使用IP连接设备，`d.info`调用速度恢复正常。\r\n怀疑是上方的提示框影响了waitForIdle函数\r\n"}}
{"actor":{"display_login":"codeskyblue"}}