{"action":"created","comment":{"url":"https://api.github.com/repos/novoda/notils/pulls/comments/57599988","id":57599988,"diff_hunk":"@@ -0,0 +1,44 @@\n+package com.novoda.notils.orientation;\n+\n+import android.content.res.Resources;\n+\n+import com.novoda.android.BuildConfig;\n+import com.novoda.android.R;\n+\n+/**\n+ * This factory can be used to instantiate a {@link ScreenOrientationLocker}\n+ * alternatively the {@link OrientationLockedActivity} can be extended for the same behaviour\n+ */\n+public class ScreenOrientationLockerFactory {\n+\n+    private final boolean isDebug;\n+    private final boolean isTablet;\n+\n+    public static ScreenOrientationLockerFactory newInstance(Resources resources) {\n+        boolean isDebug = BuildConfig.DEBUG;","path":"android/src/main/java/com/novoda/notils/orientation/ScreenOrientationLockerFactory.java","position":18,"original_position":18,"commit_id":"7c3669193b53d3ba5f91d1ece36ce6f39c215cec","original_commit_id":"7c3669193b53d3ba5f91d1ece36ce6f39c215cec","user":{"login":"blundell","id":655860,"avatar_url":"https://avatars.githubusercontent.com/u/655860?v=3","gravatar_id":"","url":"https://api.github.com/users/blundell","html_url":"https://github.com/blundell","followers_url":"https://api.github.com/users/blundell/followers","following_url":"https://api.github.com/users/blundell/following{/other_user}","gists_url":"https://api.github.com/users/blundell/gists{/gist_id}","starred_url":"https://api.github.com/users/blundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blundell/subscriptions","organizations_url":"https://api.github.com/users/blundell/orgs","repos_url":"https://api.github.com/users/blundell/repos","events_url":"https://api.github.com/users/blundell/events{/privacy}","received_events_url":"https://api.github.com/users/blundell/received_events","type":"User","site_admin":false},"body":"ah dahm it. Yeah the flavors on libraries is not a good idea","created_at":"2016-03-28T17:24:47Z","updated_at":"2016-03-28T17:24:47Z","html_url":"https://github.com/novoda/notils/pull/70#discussion_r57599988","pull_request_url":"https://api.github.com/repos/novoda/notils/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/novoda/notils/pulls/comments/57599988"},"html":{"href":"https://github.com/novoda/notils/pull/70#discussion_r57599988"},"pull_request":{"href":"https://api.github.com/repos/novoda/notils/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/novoda/notils/pulls/70","id":64340325,"html_url":"https://github.com/novoda/notils/pull/70","diff_url":"https://github.com/novoda/notils/pull/70.diff","patch_url":"https://github.com/novoda/notils/pull/70.patch","issue_url":"https://api.github.com/repos/novoda/notils/issues/70","number":70,"state":"open","locked":false,"title":"Programmatic locking of orientation only when not debugging","user":{"login":"blundell","id":655860,"avatar_url":"https://avatars.githubusercontent.com/u/655860?v=3","gravatar_id":"","url":"https://api.github.com/users/blundell","html_url":"https://github.com/blundell","followers_url":"https://api.github.com/users/blundell/followers","following_url":"https://api.github.com/users/blundell/following{/other_user}","gists_url":"https://api.github.com/users/blundell/gists{/gist_id}","starred_url":"https://api.github.com/users/blundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blundell/subscriptions","organizations_url":"https://api.github.com/users/blundell/orgs","repos_url":"https://api.github.com/users/blundell/repos","events_url":"https://api.github.com/users/blundell/events{/privacy}","received_events_url":"https://api.github.com/users/blundell/received_events","type":"User","site_admin":false},"body":"Allows some to use the `ScreenOrientationLockerFactory` to create a screen orientation locker, or `extend OrientationLockedActivity`.\r\n\r\nhttps://www.novoda.com/blog/portrait-only-apps/\r\n\r\nThis assumes you want Phones locked to portrait and tablets locked to landscape. Future changes could make this configurable I guess.\r\n\r\nSidenote:\r\n   Yes there are other ways to do this with resource buckets and we could _also_ add that method for orientation locking. Doing it programmatically I feel makes it more explicit but that doesn't matter anyway for this PR, as in the end NoTils could have both choices until one id decided better.","created_at":"2016-03-28T16:29:47Z","updated_at":"2016-03-28T17:24:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f14d2365bd0ffb9372ab6d12fc9060e061aa820d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/novoda/notils/pulls/70/commits","review_comments_url":"https://api.github.com/repos/novoda/notils/pulls/70/comments","review_comment_url":"https://api.github.com/repos/novoda/notils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/novoda/notils/issues/70/comments","statuses_url":"https://api.github.com/repos/novoda/notils/statuses/7c3669193b53d3ba5f91d1ece36ce6f39c215cec","head":{"label":"novoda:add_orientation_locker","ref":"add_orientation_locker","sha":"7c3669193b53d3ba5f91d1ece36ce6f39c215cec","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":11662606,"name":"notils","full_name":"novoda/notils","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/notils","description":"Never again need a .utils. package yur scurvy sea dogs!","fork":false,"url":"https://api.github.com/repos/novoda/notils","forks_url":"https://api.github.com/repos/novoda/notils/forks","keys_url":"https://api.github.com/repos/novoda/notils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/notils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/notils/teams","hooks_url":"https://api.github.com/repos/novoda/notils/hooks","issue_events_url":"https://api.github.com/repos/novoda/notils/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/notils/events","assignees_url":"https://api.github.com/repos/novoda/notils/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/notils/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/notils/tags","blobs_url":"https://api.github.com/repos/novoda/notils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/notils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/notils/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/notils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/notils/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/notils/languages","stargazers_url":"https://api.github.com/repos/novoda/notils/stargazers","contributors_url":"https://api.github.com/repos/novoda/notils/contributors","subscribers_url":"https://api.github.com/repos/novoda/notils/subscribers","subscription_url":"https://api.github.com/repos/novoda/notils/subscription","commits_url":"https://api.github.com/repos/novoda/notils/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/notils/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/notils/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/notils/issues/comments{/number}","contents_url":"https://api.github.com/repos/novoda/notils/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/notils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/notils/merges","archive_url":"https://api.github.com/repos/novoda/notils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/notils/downloads","issues_url":"https://api.github.com/repos/novoda/notils/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/notils/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/notils/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/notils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/notils/labels{/name}","releases_url":"https://api.github.com/repos/novoda/notils/releases{/id}","deployments_url":"https://api.github.com/repos/novoda/notils/deployments","created_at":"2013-07-25T14:29:58Z","updated_at":"2016-03-24T05:25:04Z","pushed_at":"2016-03-28T16:52:59Z","git_url":"git://github.com/novoda/notils.git","ssh_url":"git@github.com:novoda/notils.git","clone_url":"https://github.com/novoda/notils.git","svn_url":"https://github.com/novoda/notils","homepage":null,"size":421,"stargazers_count":109,"watchers_count":109,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":19,"forks":15,"open_issues":19,"watchers":109,"default_branch":"master"}},"base":{"label":"novoda:master","ref":"master","sha":"ff4197df102876d6de863d030bde0ecfe2854c77","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":11662606,"name":"notils","full_name":"novoda/notils","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/notils","description":"Never again need a .utils. package yur scurvy sea dogs!","fork":false,"url":"https://api.github.com/repos/novoda/notils","forks_url":"https://api.github.com/repos/novoda/notils/forks","keys_url":"https://api.github.com/repos/novoda/notils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/notils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/notils/teams","hooks_url":"https://api.github.com/repos/novoda/notils/hooks","issue_events_url":"https://api.github.com/repos/novoda/notils/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/notils/events","assignees_url":"https://api.github.com/repos/novoda/notils/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/notils/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/notils/tags","blobs_url":"https://api.github.com/repos/novoda/notils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/notils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/notils/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/notils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/notils/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/notils/languages","stargazers_url":"https://api.github.com/repos/novoda/notils/stargazers","contributors_url":"https://api.github.com/repos/novoda/notils/contributors","subscribers_url":"https://api.github.com/repos/novoda/notils/subscribers","subscription_url":"https://api.github.com/repos/novoda/notils/subscription","commits_url":"https://api.github.com/repos/novoda/notils/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/notils/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/notils/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/notils/issues/comments{/number}","contents_url":"https://api.github.com/repos/novoda/notils/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/notils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/notils/merges","archive_url":"https://api.github.com/repos/novoda/notils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/notils/downloads","issues_url":"https://api.github.com/repos/novoda/notils/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/notils/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/notils/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/notils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/notils/labels{/name}","releases_url":"https://api.github.com/repos/novoda/notils/releases{/id}","deployments_url":"https://api.github.com/repos/novoda/notils/deployments","created_at":"2013-07-25T14:29:58Z","updated_at":"2016-03-24T05:25:04Z","pushed_at":"2016-03-28T16:52:59Z","git_url":"git://github.com/novoda/notils.git","ssh_url":"git@github.com:novoda/notils.git","clone_url":"https://github.com/novoda/notils.git","svn_url":"https://github.com/novoda/notils","homepage":null,"size":421,"stargazers_count":109,"watchers_count":109,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":19,"forks":15,"open_issues":19,"watchers":109,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/novoda/notils/pulls/70"},"html":{"href":"https://github.com/novoda/notils/pull/70"},"issue":{"href":"https://api.github.com/repos/novoda/notils/issues/70"},"comments":{"href":"https://api.github.com/repos/novoda/notils/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/novoda/notils/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/novoda/notils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/novoda/notils/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/novoda/notils/statuses/7c3669193b53d3ba5f91d1ece36ce6f39c215cec"}}}}