{"action":"created","issue":{"url":"https://api.github.com/repos/selendroid/selendroid/issues/929","labels_url":"https://api.github.com/repos/selendroid/selendroid/issues/929/labels{/name}","comments_url":"https://api.github.com/repos/selendroid/selendroid/issues/929/comments","events_url":"https://api.github.com/repos/selendroid/selendroid/issues/929/events","html_url":"https://github.com/selendroid/selendroid/pull/929","id":92112872,"number":929,"title":"[server] Fix NPE in ViewHierarchyAnalyzer","user":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T14:42:51Z","updated_at":"2015-06-30T19:18:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/selendroid/selendroid/pulls/929","html_url":"https://github.com/selendroid/selendroid/pull/929","diff_url":"https://github.com/selendroid/selendroid/pull/929.diff","patch_url":"https://github.com/selendroid/selendroid/pull/929.patch"},"body":"Summary: We are seeing cases where we're querying native elements, but\r\nthere is no current activity. Previously this would result in a\r\n`NullPointerException` in the `ViewHierarchyAnalyzer`. This changes\r\nfixes the exception and adds a fallback when looking for resources:\r\n\r\n- added a check to see if the activity is `null`\r\n- if that's the case, try to get the resources from the passed view\r\n- before getting trying to get the resource name, check if the resources\r\n  returned are non null (we've seen that case as well)\r\n\r\nTest Plan: Ran our internal e2e tests against selendroid with this\r\npatch."},"comment":{"url":"https://api.github.com/repos/selendroid/selendroid/issues/comments/117311209","html_url":"https://github.com/selendroid/selendroid/pull/929#issuecomment-117311209","issue_url":"https://api.github.com/repos/selendroid/selendroid/issues/929","id":117311209,"user":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T19:18:03Z","updated_at":"2015-06-30T19:18:03Z","body":"More green! :tada: "}}