{"action":"created","comment":{"url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/comments/79590260","id":79590260,"diff_hunk":"@@ -41,6 +41,31 @@\n \tprivate SQLiteDatabase database;\n \tprivate Context mContext;\n \n+\t/**\n+\t * Get the folder for storing all databases.  In a separate method so that it can be\n+\t * customized more easily.\n+\t *\n+\t * @param context Application context\n+\t * @return Folder for Aware databases\n+     */\n+\tpublic File getAwareDatabaseDirectory(Context context) {\n+\t\t// sdcard/AWARE/     (shareable)\n+\t\tFile aware_folder = new File(Environment.getExternalStoragePublicDirectory(\"AWARE\").toString());\n+\t\t// sdcard/Android/<app_name>/Documents/Aware    (not shareable)\n+\t\t//File database_file = new File( mContext.getExternalFilesDir(null) + \"/Documents/AWARE/\" , database_name );\n+\t}\n+\n+\t/**\n+\t * Get a certain database directory.  Thin wrapper over getAwareDatabaseDirectory.\n+\t *\n+\t * @param context Application context (for getting files dir)\n+\t * @param database_name Name of database we want\n+     * @return File of database.\n+     */\n+\tpublic File getAwareDatabaseFile(Context context, String database_name) {\n+\t\treturn new File(getAwareDatabaseDirectory(context), database_name);","path":"aware-core/src/main/java/com/aware/utils/DatabaseHelper.java","position":26,"original_position":26,"commit_id":"e2f36067d1c0c21163ef6aba982d576be714ec06","original_commit_id":"e2f36067d1c0c21163ef6aba982d576be714ec06","user":{"login":"denzilferreira","id":8342829,"avatar_url":"https://avatars.githubusercontent.com/u/8342829?v=3","gravatar_id":"","url":"https://api.github.com/users/denzilferreira","html_url":"https://github.com/denzilferreira","followers_url":"https://api.github.com/users/denzilferreira/followers","following_url":"https://api.github.com/users/denzilferreira/following{/other_user}","gists_url":"https://api.github.com/users/denzilferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/denzilferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denzilferreira/subscriptions","organizations_url":"https://api.github.com/users/denzilferreira/orgs","repos_url":"https://api.github.com/users/denzilferreira/repos","events_url":"https://api.github.com/users/denzilferreira/events{/privacy}","received_events_url":"https://api.github.com/users/denzilferreira/received_events","type":"User","site_admin":false},"body":"Have you tested this? getAwareDatabaseDirectory(context) is not returning File?","created_at":"2016-09-20T11:38:03Z","updated_at":"2016-09-20T11:38:03Z","html_url":"https://github.com/denzilferreira/aware-client/pull/50#discussion_r79590260","pull_request_url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/comments/79590260"},"html":{"href":"https://github.com/denzilferreira/aware-client/pull/50#discussion_r79590260"},"pull_request":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50","id":85724172,"html_url":"https://github.com/denzilferreira/aware-client/pull/50","diff_url":"https://github.com/denzilferreira/aware-client/pull/50.diff","patch_url":"https://github.com/denzilferreira/aware-client/pull/50.patch","issue_url":"https://api.github.com/repos/denzilferreira/aware-client/issues/50","number":50,"state":"open","locked":false,"title":"DatabaseHelper: abstract out database locator functions.","user":{"login":"rkdarst","id":6877977,"avatar_url":"https://avatars.githubusercontent.com/u/6877977?v=3","gravatar_id":"","url":"https://api.github.com/users/rkdarst","html_url":"https://github.com/rkdarst","followers_url":"https://api.github.com/users/rkdarst/followers","following_url":"https://api.github.com/users/rkdarst/following{/other_user}","gists_url":"https://api.github.com/users/rkdarst/gists{/gist_id}","starred_url":"https://api.github.com/users/rkdarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkdarst/subscriptions","organizations_url":"https://api.github.com/users/rkdarst/orgs","repos_url":"https://api.github.com/users/rkdarst/repos","events_url":"https://api.github.com/users/rkdarst/events{/privacy}","received_events_url":"https://api.github.com/users/rkdarst/received_events","type":"User","site_admin":false},"body":"In `DatabaseHelper.java`, the database location was duplicated in three places.  This puts it in one place using methods.  This has no effect on upstream AWARE, but make it easier for us to modify it if needed (less divergence from upstream).\r\n\r\n\r\nCommit message:\r\n\r\n- No functionality changes.\r\n- This puts all code which opens databases in two methods.\r\n- This will allow less invasive changes in the future.","created_at":"2016-09-18T21:48:27Z","updated_at":"2016-09-20T11:38:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f14de6d0fec572dc2ece7b88ab40275c3cb3d017","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50/commits","review_comments_url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50/comments","review_comment_url":"https://api.github.com/repos/denzilferreira/aware-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/denzilferreira/aware-client/issues/50/comments","statuses_url":"https://api.github.com/repos/denzilferreira/aware-client/statuses/e2f36067d1c0c21163ef6aba982d576be714ec06","head":{"label":"CxAalto:database_locator","ref":"database_locator","sha":"e2f36067d1c0c21163ef6aba982d576be714ec06","user":{"login":"CxAalto","id":13780151,"avatar_url":"https://avatars.githubusercontent.com/u/13780151?v=3","gravatar_id":"","url":"https://api.github.com/users/CxAalto","html_url":"https://github.com/CxAalto","followers_url":"https://api.github.com/users/CxAalto/followers","following_url":"https://api.github.com/users/CxAalto/following{/other_user}","gists_url":"https://api.github.com/users/CxAalto/gists{/gist_id}","starred_url":"https://api.github.com/users/CxAalto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CxAalto/subscriptions","organizations_url":"https://api.github.com/users/CxAalto/orgs","repos_url":"https://api.github.com/users/CxAalto/repos","events_url":"https://api.github.com/users/CxAalto/events{/privacy}","received_events_url":"https://api.github.com/users/CxAalto/received_events","type":"Organization","site_admin":false},"repo":{"id":61749868,"name":"aware-client","full_name":"CxAalto/aware-client","owner":{"login":"CxAalto","id":13780151,"avatar_url":"https://avatars.githubusercontent.com/u/13780151?v=3","gravatar_id":"","url":"https://api.github.com/users/CxAalto","html_url":"https://github.com/CxAalto","followers_url":"https://api.github.com/users/CxAalto/followers","following_url":"https://api.github.com/users/CxAalto/following{/other_user}","gists_url":"https://api.github.com/users/CxAalto/gists{/gist_id}","starred_url":"https://api.github.com/users/CxAalto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CxAalto/subscriptions","organizations_url":"https://api.github.com/users/CxAalto/orgs","repos_url":"https://api.github.com/users/CxAalto/repos","events_url":"https://api.github.com/users/CxAalto/events{/privacy}","received_events_url":"https://api.github.com/users/CxAalto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CxAalto/aware-client","description":"AWARE Client source code","fork":true,"url":"https://api.github.com/repos/CxAalto/aware-client","forks_url":"https://api.github.com/repos/CxAalto/aware-client/forks","keys_url":"https://api.github.com/repos/CxAalto/aware-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CxAalto/aware-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CxAalto/aware-client/teams","hooks_url":"https://api.github.com/repos/CxAalto/aware-client/hooks","issue_events_url":"https://api.github.com/repos/CxAalto/aware-client/issues/events{/number}","events_url":"https://api.github.com/repos/CxAalto/aware-client/events","assignees_url":"https://api.github.com/repos/CxAalto/aware-client/assignees{/user}","branches_url":"https://api.github.com/repos/CxAalto/aware-client/branches{/branch}","tags_url":"https://api.github.com/repos/CxAalto/aware-client/tags","blobs_url":"https://api.github.com/repos/CxAalto/aware-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CxAalto/aware-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CxAalto/aware-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/CxAalto/aware-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CxAalto/aware-client/statuses/{sha}","languages_url":"https://api.github.com/repos/CxAalto/aware-client/languages","stargazers_url":"https://api.github.com/repos/CxAalto/aware-client/stargazers","contributors_url":"https://api.github.com/repos/CxAalto/aware-client/contributors","subscribers_url":"https://api.github.com/repos/CxAalto/aware-client/subscribers","subscription_url":"https://api.github.com/repos/CxAalto/aware-client/subscription","commits_url":"https://api.github.com/repos/CxAalto/aware-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/CxAalto/aware-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/CxAalto/aware-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/CxAalto/aware-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/CxAalto/aware-client/contents/{+path}","compare_url":"https://api.github.com/repos/CxAalto/aware-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CxAalto/aware-client/merges","archive_url":"https://api.github.com/repos/CxAalto/aware-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CxAalto/aware-client/downloads","issues_url":"https://api.github.com/repos/CxAalto/aware-client/issues{/number}","pulls_url":"https://api.github.com/repos/CxAalto/aware-client/pulls{/number}","milestones_url":"https://api.github.com/repos/CxAalto/aware-client/milestones{/number}","notifications_url":"https://api.github.com/repos/CxAalto/aware-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CxAalto/aware-client/labels{/name}","releases_url":"https://api.github.com/repos/CxAalto/aware-client/releases{/id}","deployments_url":"https://api.github.com/repos/CxAalto/aware-client/deployments","created_at":"2016-06-22T20:37:29Z","updated_at":"2016-06-30T15:45:01Z","pushed_at":"2016-09-20T10:46:00Z","git_url":"git://github.com/CxAalto/aware-client.git","ssh_url":"git@github.com:CxAalto/aware-client.git","clone_url":"https://github.com/CxAalto/aware-client.git","svn_url":"https://github.com/CxAalto/aware-client","homepage":null,"size":70383,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"denzilferreira:master","ref":"master","sha":"537e709dedefba23255700be8af028ea415f3923","user":{"login":"denzilferreira","id":8342829,"avatar_url":"https://avatars.githubusercontent.com/u/8342829?v=3","gravatar_id":"","url":"https://api.github.com/users/denzilferreira","html_url":"https://github.com/denzilferreira","followers_url":"https://api.github.com/users/denzilferreira/followers","following_url":"https://api.github.com/users/denzilferreira/following{/other_user}","gists_url":"https://api.github.com/users/denzilferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/denzilferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denzilferreira/subscriptions","organizations_url":"https://api.github.com/users/denzilferreira/orgs","repos_url":"https://api.github.com/users/denzilferreira/repos","events_url":"https://api.github.com/users/denzilferreira/events{/privacy}","received_events_url":"https://api.github.com/users/denzilferreira/received_events","type":"User","site_admin":false},"repo":{"id":23325575,"name":"aware-client","full_name":"denzilferreira/aware-client","owner":{"login":"denzilferreira","id":8342829,"avatar_url":"https://avatars.githubusercontent.com/u/8342829?v=3","gravatar_id":"","url":"https://api.github.com/users/denzilferreira","html_url":"https://github.com/denzilferreira","followers_url":"https://api.github.com/users/denzilferreira/followers","following_url":"https://api.github.com/users/denzilferreira/following{/other_user}","gists_url":"https://api.github.com/users/denzilferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/denzilferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denzilferreira/subscriptions","organizations_url":"https://api.github.com/users/denzilferreira/orgs","repos_url":"https://api.github.com/users/denzilferreira/repos","events_url":"https://api.github.com/users/denzilferreira/events{/privacy}","received_events_url":"https://api.github.com/users/denzilferreira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/denzilferreira/aware-client","description":"AWARE Client source code","fork":false,"url":"https://api.github.com/repos/denzilferreira/aware-client","forks_url":"https://api.github.com/repos/denzilferreira/aware-client/forks","keys_url":"https://api.github.com/repos/denzilferreira/aware-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denzilferreira/aware-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denzilferreira/aware-client/teams","hooks_url":"https://api.github.com/repos/denzilferreira/aware-client/hooks","issue_events_url":"https://api.github.com/repos/denzilferreira/aware-client/issues/events{/number}","events_url":"https://api.github.com/repos/denzilferreira/aware-client/events","assignees_url":"https://api.github.com/repos/denzilferreira/aware-client/assignees{/user}","branches_url":"https://api.github.com/repos/denzilferreira/aware-client/branches{/branch}","tags_url":"https://api.github.com/repos/denzilferreira/aware-client/tags","blobs_url":"https://api.github.com/repos/denzilferreira/aware-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denzilferreira/aware-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denzilferreira/aware-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/denzilferreira/aware-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denzilferreira/aware-client/statuses/{sha}","languages_url":"https://api.github.com/repos/denzilferreira/aware-client/languages","stargazers_url":"https://api.github.com/repos/denzilferreira/aware-client/stargazers","contributors_url":"https://api.github.com/repos/denzilferreira/aware-client/contributors","subscribers_url":"https://api.github.com/repos/denzilferreira/aware-client/subscribers","subscription_url":"https://api.github.com/repos/denzilferreira/aware-client/subscription","commits_url":"https://api.github.com/repos/denzilferreira/aware-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/denzilferreira/aware-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/denzilferreira/aware-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/denzilferreira/aware-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/denzilferreira/aware-client/contents/{+path}","compare_url":"https://api.github.com/repos/denzilferreira/aware-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denzilferreira/aware-client/merges","archive_url":"https://api.github.com/repos/denzilferreira/aware-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denzilferreira/aware-client/downloads","issues_url":"https://api.github.com/repos/denzilferreira/aware-client/issues{/number}","pulls_url":"https://api.github.com/repos/denzilferreira/aware-client/pulls{/number}","milestones_url":"https://api.github.com/repos/denzilferreira/aware-client/milestones{/number}","notifications_url":"https://api.github.com/repos/denzilferreira/aware-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denzilferreira/aware-client/labels{/name}","releases_url":"https://api.github.com/repos/denzilferreira/aware-client/releases{/id}","deployments_url":"https://api.github.com/repos/denzilferreira/aware-client/deployments","created_at":"2014-08-25T19:18:42Z","updated_at":"2016-09-17T14:40:50Z","pushed_at":"2016-09-20T11:34:38Z","git_url":"git://github.com/denzilferreira/aware-client.git","ssh_url":"git@github.com:denzilferreira/aware-client.git","clone_url":"https://github.com/denzilferreira/aware-client.git","svn_url":"https://github.com/denzilferreira/aware-client","homepage":null,"size":70416,"stargazers_count":25,"watchers_count":25,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":14,"forks":20,"open_issues":14,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50"},"html":{"href":"https://github.com/denzilferreira/aware-client/pull/50"},"issue":{"href":"https://api.github.com/repos/denzilferreira/aware-client/issues/50"},"comments":{"href":"https://api.github.com/repos/denzilferreira/aware-client/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/denzilferreira/aware-client/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/denzilferreira/aware-client/statuses/e2f36067d1c0c21163ef6aba982d576be714ec06"}}}}
{"actor":{"display_login":"denzilferreira"}}