{"action":"created","comment":{"url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/comments/57497486","id":57497486,"diff_hunk":"@@ -394,4 +437,15 @@ private void showHideMapProgressBar(boolean pFlag) {\n     public static String getOCDBDownloadDirectoryPath(Context context) {\n         return (context.getExternalFilesDir(null) + File.separator) + \"OpenCellID/\";\n     }\n+\n+    /**\n+     * The interface to be implemented by the caller of RequestTask so it can perform contextual\n+     * actions once the async task is completed.\n+     *\n+     * E.g. rechecking current cell in the newly updated database after OCID download.\n+     */\n+    public interface AsyncTaskCompleteListener {\n+        void onAsyncTaskSucceeded(String result);","path":"AIMSICD/src/main/java/com/secupwn/aimsicd/utils/RequestTask.java","position":112,"original_position":112,"commit_id":"0b316c260cfae99c65e608c65831bcf4ba517000","original_commit_id":"0b316c260cfae99c65e608c65831bcf4ba517000","user":{"login":"generalpf","id":3383566,"avatar_url":"https://avatars.githubusercontent.com/u/3383566?v=3","gravatar_id":"","url":"https://api.github.com/users/generalpf","html_url":"https://github.com/generalpf","followers_url":"https://api.github.com/users/generalpf/followers","following_url":"https://api.github.com/users/generalpf/following{/other_user}","gists_url":"https://api.github.com/users/generalpf/gists{/gist_id}","starred_url":"https://api.github.com/users/generalpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/generalpf/subscriptions","organizations_url":"https://api.github.com/users/generalpf/orgs","repos_url":"https://api.github.com/users/generalpf/repos","events_url":"https://api.github.com/users/generalpf/events{/privacy}","received_events_url":"https://api.github.com/users/generalpf/received_events","type":"User","site_admin":false},"body":"If you would only ever call this when the result is \"Successful\", there's no need for `String result`.","created_at":"2016-03-25T22:18:45Z","updated_at":"2016-03-25T22:18:45Z","html_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823#discussion_r57497486","pull_request_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823","_links":{"self":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/comments/57497486"},"html":{"href":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823#discussion_r57497486"},"pull_request":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823"}}},"pull_request":{"url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823","id":64197935,"html_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823","diff_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823.diff","patch_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823.patch","issue_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/823","number":823,"state":"open","locked":false,"title":"Check current cell against OCID after download","user":{"login":"f3ndot","id":740289,"avatar_url":"https://avatars.githubusercontent.com/u/740289?v=3","gravatar_id":"","url":"https://api.github.com/users/f3ndot","html_url":"https://github.com/f3ndot","followers_url":"https://api.github.com/users/f3ndot/followers","following_url":"https://api.github.com/users/f3ndot/following{/other_user}","gists_url":"https://api.github.com/users/f3ndot/gists{/gist_id}","starred_url":"https://api.github.com/users/f3ndot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f3ndot/subscriptions","organizations_url":"https://api.github.com/users/f3ndot/orgs","repos_url":"https://api.github.com/users/f3ndot/repos","events_url":"https://api.github.com/users/f3ndot/events{/privacy}","received_events_url":"https://api.github.com/users/f3ndot/received_events","type":"User","site_admin":false},"body":"#### Agreements\r\n\r\n- [x] **I have reviewed and accepted the [guidelines for contributing](https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/blob/development/.github/CONTRIBUTING.md) to this project.**\r\n- [x] **I have reviewed and closely followed the [Style Guide](https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/wiki/Style-Guide) for this Android app.**\r\n\r\n---\r\n\r\n#### Overview\r\n\r\nThis should fix #558. I verified the fix in my local area by:\r\n\r\n1. Clearing the OCID database so AIMSICD is in a \"vanilla\" state and going to an area where I'm connected to a cell tower known to OCID.\r\n2. Observing that I'm getting a MEDIUM/yellow since I have no entries in OCID database to compare against\r\n3. Download the BTS data from OCID from the sidebar\r\n4. Observe that the notification has changed from MEDIUM/yellow to OK/green once the successful download toast displays\r\n\r\n##### Specifically resolved issues:\r\n- `CellTracker#setNotification()` now always fires when `CellTracker#compareLac(CellLocation)` is called since recovering from a dangerous state should update the notification. Aka from MEDIUM to OK\r\n- `RequestTask` provides a listener interface for completion callbacks so `Helpers#getOpenCellData(...)` fires OCID check on success\r\n- Timeout for OCID download increased from default 10 seconds to 60 seconds, since the OCID API is slow as hell.\r\n- If OCID API times out, we display that to the user as a special error message.\r\n\r\nThe listener callback interface is a bit crude, but is better than having RequestTask do too much.\r\n\r\n---\r\n\r\n#### Classification\r\n\r\n- [x] Bugfix (non-breaking change which fixes an existing issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Refactor (restructuring of existing code without changing its external functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n---\r\n\r\n#### References\r\n\r\nSee #558 for feature request.\r\nThis PR supersedes #793.\r\n\r\n---\r\n\r\n#### Screenshots\r\n\r\nN/A","created_at":"2016-03-25T19:27:17Z","updated_at":"2016-03-25T22:18:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e58f4cdc50c0e1ec13930a942077debdef2b3b3e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823/commits","review_comments_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823/comments","review_comment_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/823/comments","statuses_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/statuses/0b316c260cfae99c65e608c65831bcf4ba517000","head":{"label":"f3ndot:ocid-download-and-recheck-improvements","ref":"ocid-download-and-recheck-improvements","sha":"0b316c260cfae99c65e608c65831bcf4ba517000","user":{"login":"f3ndot","id":740289,"avatar_url":"https://avatars.githubusercontent.com/u/740289?v=3","gravatar_id":"","url":"https://api.github.com/users/f3ndot","html_url":"https://github.com/f3ndot","followers_url":"https://api.github.com/users/f3ndot/followers","following_url":"https://api.github.com/users/f3ndot/following{/other_user}","gists_url":"https://api.github.com/users/f3ndot/gists{/gist_id}","starred_url":"https://api.github.com/users/f3ndot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f3ndot/subscriptions","organizations_url":"https://api.github.com/users/f3ndot/orgs","repos_url":"https://api.github.com/users/f3ndot/repos","events_url":"https://api.github.com/users/f3ndot/events{/privacy}","received_events_url":"https://api.github.com/users/f3ndot/received_events","type":"User","site_admin":false},"repo":{"id":52577646,"name":"Android-IMSI-Catcher-Detector","full_name":"f3ndot/Android-IMSI-Catcher-Detector","owner":{"login":"f3ndot","id":740289,"avatar_url":"https://avatars.githubusercontent.com/u/740289?v=3","gravatar_id":"","url":"https://api.github.com/users/f3ndot","html_url":"https://github.com/f3ndot","followers_url":"https://api.github.com/users/f3ndot/followers","following_url":"https://api.github.com/users/f3ndot/following{/other_user}","gists_url":"https://api.github.com/users/f3ndot/gists{/gist_id}","starred_url":"https://api.github.com/users/f3ndot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f3ndot/subscriptions","organizations_url":"https://api.github.com/users/f3ndot/orgs","repos_url":"https://api.github.com/users/f3ndot/repos","events_url":"https://api.github.com/users/f3ndot/events{/privacy}","received_events_url":"https://api.github.com/users/f3ndot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/f3ndot/Android-IMSI-Catcher-Detector","description":"AIMSICD • Fight IMSI-Catcher, StingRay and silent SMS!","fork":true,"url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector","forks_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/forks","keys_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/teams","hooks_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/hooks","issue_events_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/issues/events{/number}","events_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/events","assignees_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/assignees{/user}","branches_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/branches{/branch}","tags_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/tags","blobs_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/git/refs{/sha}","trees_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/statuses/{sha}","languages_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/languages","stargazers_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/stargazers","contributors_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/contributors","subscribers_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/subscribers","subscription_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/subscription","commits_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/commits{/sha}","git_commits_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/git/commits{/sha}","comments_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/comments{/number}","issue_comment_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/issues/comments{/number}","contents_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/contents/{+path}","compare_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/merges","archive_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/downloads","issues_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/issues{/number}","pulls_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/pulls{/number}","milestones_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/milestones{/number}","notifications_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/labels{/name}","releases_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/releases{/id}","deployments_url":"https://api.github.com/repos/f3ndot/Android-IMSI-Catcher-Detector/deployments","created_at":"2016-02-26T04:03:26Z","updated_at":"2016-02-26T04:03:28Z","pushed_at":"2016-03-25T21:09:06Z","git_url":"git://github.com/f3ndot/Android-IMSI-Catcher-Detector.git","ssh_url":"git@github.com:f3ndot/Android-IMSI-Catcher-Detector.git","clone_url":"https://github.com/f3ndot/Android-IMSI-Catcher-Detector.git","svn_url":"https://github.com/f3ndot/Android-IMSI-Catcher-Detector","homepage":"https://secupwn.github.io/Android-IMSI-Catcher-Detector/","size":9629,"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":"development"}},"base":{"label":"CellularPrivacy:development","ref":"development","sha":"70111db95f5000e838da7d7cbc9b21bb984b48ac","user":{"login":"CellularPrivacy","id":17889907,"avatar_url":"https://avatars.githubusercontent.com/u/17889907?v=3","gravatar_id":"","url":"https://api.github.com/users/CellularPrivacy","html_url":"https://github.com/CellularPrivacy","followers_url":"https://api.github.com/users/CellularPrivacy/followers","following_url":"https://api.github.com/users/CellularPrivacy/following{/other_user}","gists_url":"https://api.github.com/users/CellularPrivacy/gists{/gist_id}","starred_url":"https://api.github.com/users/CellularPrivacy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CellularPrivacy/subscriptions","organizations_url":"https://api.github.com/users/CellularPrivacy/orgs","repos_url":"https://api.github.com/users/CellularPrivacy/repos","events_url":"https://api.github.com/users/CellularPrivacy/events{/privacy}","received_events_url":"https://api.github.com/users/CellularPrivacy/received_events","type":"Organization","site_admin":false},"repo":{"id":14640193,"name":"Android-IMSI-Catcher-Detector","full_name":"CellularPrivacy/Android-IMSI-Catcher-Detector","owner":{"login":"CellularPrivacy","id":17889907,"avatar_url":"https://avatars.githubusercontent.com/u/17889907?v=3","gravatar_id":"","url":"https://api.github.com/users/CellularPrivacy","html_url":"https://github.com/CellularPrivacy","followers_url":"https://api.github.com/users/CellularPrivacy/followers","following_url":"https://api.github.com/users/CellularPrivacy/following{/other_user}","gists_url":"https://api.github.com/users/CellularPrivacy/gists{/gist_id}","starred_url":"https://api.github.com/users/CellularPrivacy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CellularPrivacy/subscriptions","organizations_url":"https://api.github.com/users/CellularPrivacy/orgs","repos_url":"https://api.github.com/users/CellularPrivacy/repos","events_url":"https://api.github.com/users/CellularPrivacy/events{/privacy}","received_events_url":"https://api.github.com/users/CellularPrivacy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector","description":"AIMSICD • Fight IMSI-Catcher, StingRay and silent SMS!","fork":false,"url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector","forks_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/forks","keys_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/teams","hooks_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/hooks","issue_events_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/events{/number}","events_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/events","assignees_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/assignees{/user}","branches_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/branches{/branch}","tags_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/tags","blobs_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/git/refs{/sha}","trees_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/statuses/{sha}","languages_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/languages","stargazers_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/stargazers","contributors_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/contributors","subscribers_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/subscribers","subscription_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/subscription","commits_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/commits{/sha}","git_commits_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/git/commits{/sha}","comments_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/comments{/number}","issue_comment_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/comments{/number}","contents_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/contents/{+path}","compare_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/merges","archive_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/downloads","issues_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues{/number}","pulls_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls{/number}","milestones_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/milestones{/number}","notifications_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/labels{/name}","releases_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/releases{/id}","deployments_url":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/deployments","created_at":"2013-11-23T10:04:14Z","updated_at":"2016-03-25T21:08:16Z","pushed_at":"2016-03-25T21:09:06Z","git_url":"git://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector.git","ssh_url":"git@github.com:CellularPrivacy/Android-IMSI-Catcher-Detector.git","clone_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector.git","svn_url":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector","homepage":"https://cellularprivacy.github.io/Android-IMSI-Catcher-Detector/","size":242753,"stargazers_count":1897,"watchers_count":1897,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":351,"mirror_url":null,"open_issues_count":107,"forks":351,"open_issues":107,"watchers":1897,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823"},"html":{"href":"https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/pull/823"},"issue":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/823"},"comments":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/823/comments"},"review_comments":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823/comments"},"review_comment":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/pulls/823/commits"},"statuses":{"href":"https://api.github.com/repos/CellularPrivacy/Android-IMSI-Catcher-Detector/statuses/0b316c260cfae99c65e608c65831bcf4ba517000"}}}}