{"action":"created","comment":{"url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/comments/73642349","id":73642349,"diff_hunk":"@@ -1,51 +1,91 @@\n package io.appium.uiautomator2.handler;\n \n+import android.support.test.uiautomator.UiDevice;\n+import android.support.test.uiautomator.UiObjectNotFoundException;\n+\n import org.json.JSONException;\n import org.json.JSONObject;\n \n+import io.appium.uiautomator2.common.exceptions.InvalidCoordinatesException;\n import io.appium.uiautomator2.handler.request.SafeRequestHandler;\n import io.appium.uiautomator2.http.AppiumResponse;\n import io.appium.uiautomator2.http.IHttpRequest;\n+import io.appium.uiautomator2.model.AndroidElement;\n+import io.appium.uiautomator2.model.KnownElements;\n import io.appium.uiautomator2.server.WDStatus;\n import io.appium.uiautomator2.utils.Device;\n import io.appium.uiautomator2.utils.Logger;\n+import io.appium.uiautomator2.utils.Point;\n+import io.appium.uiautomator2.utils.PositionHelper;\n \n public class Swipe extends SafeRequestHandler {\n+    UiDevice device;\n \n     public Swipe(String mappedUri) {\n         super(mappedUri);\n     }\n \n     @Override\n     public AppiumResponse safeHandle(IHttpRequest request) {\n+        Point absStartPos, absEndPos;","path":"app/src/main/java/io/appium/uiautomator2/handler/Swipe.java","position":30,"original_position":30,"commit_id":"c5b9f6e73386ce1ec4a4f73b016af863b8ba438d","original_commit_id":"c5b9f6e73386ce1ec4a4f73b016af863b8ba438d","user":{"login":"mpujari","id":1962338,"avatar_url":"https://avatars.githubusercontent.com/u/1962338?v=3","gravatar_id":"","url":"https://api.github.com/users/mpujari","html_url":"https://github.com/mpujari","followers_url":"https://api.github.com/users/mpujari/followers","following_url":"https://api.github.com/users/mpujari/following{/other_user}","gists_url":"https://api.github.com/users/mpujari/gists{/gist_id}","starred_url":"https://api.github.com/users/mpujari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpujari/subscriptions","organizations_url":"https://api.github.com/users/mpujari/orgs","repos_url":"https://api.github.com/users/mpujari/repos","events_url":"https://api.github.com/users/mpujari/events{/privacy}","received_events_url":"https://api.github.com/users/mpujari/received_events","type":"User","site_admin":false},"body":"Minor: declare the variable where its being first initialized, by this we narrow the scope of the variable. Same goes with swipeArgs as well.","created_at":"2016-08-05T05:04:59Z","updated_at":"2016-08-05T05:04:59Z","html_url":"https://github.com/appium/appium-uiautomator2-server/pull/21#discussion_r73642349","pull_request_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/comments/73642349"},"html":{"href":"https://github.com/appium/appium-uiautomator2-server/pull/21#discussion_r73642349"},"pull_request":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21","id":80026731,"html_url":"https://github.com/appium/appium-uiautomator2-server/pull/21","diff_url":"https://github.com/appium/appium-uiautomator2-server/pull/21.diff","patch_url":"https://github.com/appium/appium-uiautomator2-server/pull/21.patch","issue_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/21","number":21,"state":"open","locked":false,"title":"Added Swipe on the Element functionality along with coordinates","user":{"login":"anandsadu","id":13962113,"avatar_url":"https://avatars.githubusercontent.com/u/13962113?v=3","gravatar_id":"","url":"https://api.github.com/users/anandsadu","html_url":"https://github.com/anandsadu","followers_url":"https://api.github.com/users/anandsadu/followers","following_url":"https://api.github.com/users/anandsadu/following{/other_user}","gists_url":"https://api.github.com/users/anandsadu/gists{/gist_id}","starred_url":"https://api.github.com/users/anandsadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandsadu/subscriptions","organizations_url":"https://api.github.com/users/anandsadu/orgs","repos_url":"https://api.github.com/users/anandsadu/repos","events_url":"https://api.github.com/users/anandsadu/events{/privacy}","received_events_url":"https://api.github.com/users/anandsadu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-04T06:52:43Z","updated_at":"2016-08-05T05:04:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76d07aecc78f03e05921f6af2e292adea9c7bbb7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21/commits","review_comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21/comments","review_comment_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/21/comments","statuses_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/statuses/c5b9f6e73386ce1ec4a4f73b016af863b8ba438d","head":{"label":"anandsadu:master","ref":"master","sha":"c5b9f6e73386ce1ec4a4f73b016af863b8ba438d","user":{"login":"anandsadu","id":13962113,"avatar_url":"https://avatars.githubusercontent.com/u/13962113?v=3","gravatar_id":"","url":"https://api.github.com/users/anandsadu","html_url":"https://github.com/anandsadu","followers_url":"https://api.github.com/users/anandsadu/followers","following_url":"https://api.github.com/users/anandsadu/following{/other_user}","gists_url":"https://api.github.com/users/anandsadu/gists{/gist_id}","starred_url":"https://api.github.com/users/anandsadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandsadu/subscriptions","organizations_url":"https://api.github.com/users/anandsadu/orgs","repos_url":"https://api.github.com/users/anandsadu/repos","events_url":"https://api.github.com/users/anandsadu/events{/privacy}","received_events_url":"https://api.github.com/users/anandsadu/received_events","type":"User","site_admin":false},"repo":{"id":64822092,"name":"appium-uiautomator2-server","full_name":"anandsadu/appium-uiautomator2-server","owner":{"login":"anandsadu","id":13962113,"avatar_url":"https://avatars.githubusercontent.com/u/13962113?v=3","gravatar_id":"","url":"https://api.github.com/users/anandsadu","html_url":"https://github.com/anandsadu","followers_url":"https://api.github.com/users/anandsadu/followers","following_url":"https://api.github.com/users/anandsadu/following{/other_user}","gists_url":"https://api.github.com/users/anandsadu/gists{/gist_id}","starred_url":"https://api.github.com/users/anandsadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandsadu/subscriptions","organizations_url":"https://api.github.com/users/anandsadu/orgs","repos_url":"https://api.github.com/users/anandsadu/repos","events_url":"https://api.github.com/users/anandsadu/events{/privacy}","received_events_url":"https://api.github.com/users/anandsadu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anandsadu/appium-uiautomator2-server","description":null,"fork":true,"url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server","forks_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/forks","keys_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/teams","hooks_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/hooks","issue_events_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/issues/events{/number}","events_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/events","assignees_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/assignees{/user}","branches_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/branches{/branch}","tags_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/tags","blobs_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/statuses/{sha}","languages_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/languages","stargazers_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/stargazers","contributors_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/contributors","subscribers_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/subscribers","subscription_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/subscription","commits_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/contents/{+path}","compare_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/merges","archive_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/downloads","issues_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/issues{/number}","pulls_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/pulls{/number}","milestones_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/milestones{/number}","notifications_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/labels{/name}","releases_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/releases{/id}","deployments_url":"https://api.github.com/repos/anandsadu/appium-uiautomator2-server/deployments","created_at":"2016-08-03T06:43:48Z","updated_at":"2016-08-03T06:43:49Z","pushed_at":"2016-08-04T06:51:26Z","git_url":"git://github.com/anandsadu/appium-uiautomator2-server.git","ssh_url":"git@github.com:anandsadu/appium-uiautomator2-server.git","clone_url":"https://github.com/anandsadu/appium-uiautomator2-server.git","svn_url":"https://github.com/anandsadu/appium-uiautomator2-server","homepage":null,"size":3057,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appium:master","ref":"master","sha":"a908688951dbb2e57cf4ac9bdb2afe39ad96cd66","user":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":53297769,"name":"appium-uiautomator2-server","full_name":"appium/appium-uiautomator2-server","owner":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appium/appium-uiautomator2-server","description":"","fork":false,"url":"https://api.github.com/repos/appium/appium-uiautomator2-server","forks_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/forks","keys_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/teams","hooks_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/events","assignees_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/tags","blobs_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/languages","stargazers_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/subscription","commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/merges","archive_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/downloads","issues_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/releases{/id}","deployments_url":"https://api.github.com/repos/appium/appium-uiautomator2-server/deployments","created_at":"2016-03-07T05:18:34Z","updated_at":"2016-05-24T09:02:32Z","pushed_at":"2016-08-04T06:52:43Z","git_url":"git://github.com/appium/appium-uiautomator2-server.git","ssh_url":"git@github.com:appium/appium-uiautomator2-server.git","clone_url":"https://github.com/appium/appium-uiautomator2-server.git","svn_url":"https://github.com/appium/appium-uiautomator2-server","homepage":null,"size":3570,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21"},"html":{"href":"https://github.com/appium/appium-uiautomator2-server/pull/21"},"issue":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/21"},"comments":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-server/statuses/c5b9f6e73386ce1ec4a4f73b016af863b8ba438d"}}}}
{"actor":{"display_login":"mpujari"}}