{"action":"created","comment":{"url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments/52888409","id":52888409,"diff_hunk":"@@ -267,7 +303,12 @@ def _grant_requested_permissions(self):\n                 break\n \n         for permission in permissions:\n-            self.device.execute(\"pm grant {} {}\".format(self.package, permission))\n+            # \"Normal\" Permisions are automatically granted and cannot be changed\n+            for normal in ANDROID_NORMAL_PERMISSIONS:\n+                if normal in permission:\n+                    break\n+            else:\n+                self.device.execute(\"pm grant {} {}\".format(self.package, permission))","path":"wlauto/common/android/workload.py","position":53,"original_position":53,"commit_id":"69b1abbee04141b1aac8c0b2b3c92b5e1dd37f14","original_commit_id":"69b1abbee04141b1aac8c0b2b3c92b5e1dd37f14","user":{"login":"setrofim","id":904685,"avatar_url":"https://avatars.githubusercontent.com/u/904685?v=3","gravatar_id":"","url":"https://api.github.com/users/setrofim","html_url":"https://github.com/setrofim","followers_url":"https://api.github.com/users/setrofim/followers","following_url":"https://api.github.com/users/setrofim/following{/other_user}","gists_url":"https://api.github.com/users/setrofim/gists{/gist_id}","starred_url":"https://api.github.com/users/setrofim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setrofim/subscriptions","organizations_url":"https://api.github.com/users/setrofim/orgs","repos_url":"https://api.github.com/users/setrofim/repos","events_url":"https://api.github.com/users/setrofim/events{/privacy}","received_events_url":"https://api.github.com/users/setrofim/received_events","type":"User","site_admin":false},"body":"instead of the inner `for` loop:\r\n\r\n    permission_name = permission.rsplit('.', 1)[1]\r\n    if permission_name not in ANDROID_NORMAL_PERMISSIONS:\r\n        self.device.execute(\"pm grant {} {}\".format(self.package, permission))","created_at":"2016-02-15T11:32:37Z","updated_at":"2016-02-15T11:32:37Z","html_url":"https://github.com/ARM-software/workload-automation/pull/103#discussion_r52888409","pull_request_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments/52888409"},"html":{"href":"https://github.com/ARM-software/workload-automation/pull/103#discussion_r52888409"},"pull_request":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103","id":59351369,"html_url":"https://github.com/ARM-software/workload-automation/pull/103","diff_url":"https://github.com/ARM-software/workload-automation/pull/103.diff","patch_url":"https://github.com/ARM-software/workload-automation/pull/103.patch","issue_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/103","number":103,"state":"open","locked":false,"title":"ApkWorkload: Fixed runtime permission granting","user":{"login":"ep1cman","id":5303409,"avatar_url":"https://avatars.githubusercontent.com/u/5303409?v=3","gravatar_id":"","url":"https://api.github.com/users/ep1cman","html_url":"https://github.com/ep1cman","followers_url":"https://api.github.com/users/ep1cman/followers","following_url":"https://api.github.com/users/ep1cman/following{/other_user}","gists_url":"https://api.github.com/users/ep1cman/gists{/gist_id}","starred_url":"https://api.github.com/users/ep1cman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ep1cman/subscriptions","organizations_url":"https://api.github.com/users/ep1cman/orgs","repos_url":"https://api.github.com/users/ep1cman/repos","events_url":"https://api.github.com/users/ep1cman/events{/privacy}","received_events_url":"https://api.github.com/users/ep1cman/received_events","type":"User","site_admin":false},"body":"\"Normal\" android permissions are automatically granted and cannot\r\nbe changed. Trying to \"pm grant\" these caused an error, this should\r\nno longer occur.","created_at":"2016-02-15T11:26:53Z","updated_at":"2016-02-15T11:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0406fba0a92798045aec74aeb876e29ffe045c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103/commits","review_comments_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103/comments","review_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/103/comments","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/69b1abbee04141b1aac8c0b2b3c92b5e1dd37f14","head":{"label":"ep1cman:fixes","ref":"fixes","sha":"69b1abbee04141b1aac8c0b2b3c92b5e1dd37f14","user":{"login":"ep1cman","id":5303409,"avatar_url":"https://avatars.githubusercontent.com/u/5303409?v=3","gravatar_id":"","url":"https://api.github.com/users/ep1cman","html_url":"https://github.com/ep1cman","followers_url":"https://api.github.com/users/ep1cman/followers","following_url":"https://api.github.com/users/ep1cman/following{/other_user}","gists_url":"https://api.github.com/users/ep1cman/gists{/gist_id}","starred_url":"https://api.github.com/users/ep1cman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ep1cman/subscriptions","organizations_url":"https://api.github.com/users/ep1cman/orgs","repos_url":"https://api.github.com/users/ep1cman/repos","events_url":"https://api.github.com/users/ep1cman/events{/privacy}","received_events_url":"https://api.github.com/users/ep1cman/received_events","type":"User","site_admin":false},"repo":{"id":44668301,"name":"workload-automation","full_name":"ep1cman/workload-automation","owner":{"login":"ep1cman","id":5303409,"avatar_url":"https://avatars.githubusercontent.com/u/5303409?v=3","gravatar_id":"","url":"https://api.github.com/users/ep1cman","html_url":"https://github.com/ep1cman","followers_url":"https://api.github.com/users/ep1cman/followers","following_url":"https://api.github.com/users/ep1cman/following{/other_user}","gists_url":"https://api.github.com/users/ep1cman/gists{/gist_id}","starred_url":"https://api.github.com/users/ep1cman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ep1cman/subscriptions","organizations_url":"https://api.github.com/users/ep1cman/orgs","repos_url":"https://api.github.com/users/ep1cman/repos","events_url":"https://api.github.com/users/ep1cman/events{/privacy}","received_events_url":"https://api.github.com/users/ep1cman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ep1cman/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":true,"url":"https://api.github.com/repos/ep1cman/workload-automation","forks_url":"https://api.github.com/repos/ep1cman/workload-automation/forks","keys_url":"https://api.github.com/repos/ep1cman/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ep1cman/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ep1cman/workload-automation/teams","hooks_url":"https://api.github.com/repos/ep1cman/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/ep1cman/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/ep1cman/workload-automation/events","assignees_url":"https://api.github.com/repos/ep1cman/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/ep1cman/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/ep1cman/workload-automation/tags","blobs_url":"https://api.github.com/repos/ep1cman/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ep1cman/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ep1cman/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ep1cman/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ep1cman/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/ep1cman/workload-automation/languages","stargazers_url":"https://api.github.com/repos/ep1cman/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/ep1cman/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/ep1cman/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/ep1cman/workload-automation/subscription","commits_url":"https://api.github.com/repos/ep1cman/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ep1cman/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ep1cman/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ep1cman/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ep1cman/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/ep1cman/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ep1cman/workload-automation/merges","archive_url":"https://api.github.com/repos/ep1cman/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ep1cman/workload-automation/downloads","issues_url":"https://api.github.com/repos/ep1cman/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/ep1cman/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/ep1cman/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/ep1cman/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ep1cman/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/ep1cman/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/ep1cman/workload-automation/deployments","created_at":"2015-10-21T10:15:43Z","updated_at":"2016-01-12T10:59:09Z","pushed_at":"2016-02-15T11:26:15Z","git_url":"git://github.com/ep1cman/workload-automation.git","ssh_url":"git@github.com:ep1cman/workload-automation.git","clone_url":"https://github.com/ep1cman/workload-automation.git","svn_url":"https://github.com/ep1cman/workload-automation","homepage":null,"size":28933,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"ARM-software:master","ref":"master","sha":"693afa35282f688b1cf34f4ad5010bb5c3e8d532","user":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"repo":{"id":31957801,"name":"workload-automation","full_name":"ARM-software/workload-automation","owner":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-software/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":false,"url":"https://api.github.com/repos/ARM-software/workload-automation","forks_url":"https://api.github.com/repos/ARM-software/workload-automation/forks","keys_url":"https://api.github.com/repos/ARM-software/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-software/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-software/workload-automation/teams","hooks_url":"https://api.github.com/repos/ARM-software/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-software/workload-automation/events","assignees_url":"https://api.github.com/repos/ARM-software/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-software/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-software/workload-automation/tags","blobs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-software/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-software/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-software/workload-automation/languages","stargazers_url":"https://api.github.com/repos/ARM-software/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/ARM-software/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/ARM-software/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/ARM-software/workload-automation/subscription","commits_url":"https://api.github.com/repos/ARM-software/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-software/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-software/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-software/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-software/workload-automation/merges","archive_url":"https://api.github.com/repos/ARM-software/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-software/workload-automation/downloads","issues_url":"https://api.github.com/repos/ARM-software/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-software/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-software/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-software/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/ARM-software/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/ARM-software/workload-automation/deployments","created_at":"2015-03-10T13:05:03Z","updated_at":"2016-02-07T15:13:55Z","pushed_at":"2016-02-15T11:26:53Z","git_url":"git://github.com/ARM-software/workload-automation.git","ssh_url":"git@github.com:ARM-software/workload-automation.git","clone_url":"https://github.com/ARM-software/workload-automation.git","svn_url":"https://github.com/ARM-software/workload-automation","homepage":null,"size":29009,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":5,"forks":22,"open_issues":5,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103"},"html":{"href":"https://github.com/ARM-software/workload-automation/pull/103"},"issue":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/103"},"comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-software/workload-automation/statuses/69b1abbee04141b1aac8c0b2b3c92b5e1dd37f14"}}}}