{"action":"created","comment":{"url":"https://api.github.com/repos/philburk/android-midisuite/pulls/comments/69822508","id":69822508,"diff_hunk":"@@ -40,18 +44,20 @@ public void run() {\n         }\n     };\n \n+    public static FakeKeyGenerator getInstance() {\n+        if (mInstance == null) {\n+            mInstance = new FakeKeyGenerator();\n+        }\n+        return mInstance;\n+    }","path":"MidiSynthExample/src/com/mobileer/midisynthexample/FakeKeyGenerator.java","position":31,"original_position":31,"commit_id":"027d985c291cec7a8abe7f84eb71aedcea26e332","original_commit_id":"027d985c291cec7a8abe7f84eb71aedcea26e332","user":{"login":"BenjaminFair","id":5839232,"avatar_url":"https://avatars.githubusercontent.com/u/5839232?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminFair","html_url":"https://github.com/BenjaminFair","followers_url":"https://api.github.com/users/BenjaminFair/followers","following_url":"https://api.github.com/users/BenjaminFair/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminFair/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminFair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminFair/subscriptions","organizations_url":"https://api.github.com/users/BenjaminFair/orgs","repos_url":"https://api.github.com/users/BenjaminFair/repos","events_url":"https://api.github.com/users/BenjaminFair/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminFair/received_events","type":"User","site_admin":false},"body":"It may be a good idea to wrap this method in a mutex just in case it's called from two different threads.\r\n\r\nSee [here](https://github.com/google/walt/blob/master/android/WALT/app/src/main/java/org/chromium/latency/walt/SimpleLogger.java#L40) for how I did it.","created_at":"2016-07-06T22:23:24Z","updated_at":"2016-07-06T22:23:24Z","html_url":"https://github.com/philburk/android-midisuite/pull/19#discussion_r69822508","pull_request_url":"https://api.github.com/repos/philburk/android-midisuite/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/comments/69822508"},"html":{"href":"https://github.com/philburk/android-midisuite/pull/19#discussion_r69822508"},"pull_request":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/philburk/android-midisuite/pulls/19","id":76507334,"html_url":"https://github.com/philburk/android-midisuite/pull/19","diff_url":"https://github.com/philburk/android-midisuite/pull/19.diff","patch_url":"https://github.com/philburk/android-midisuite/pull/19.patch","issue_url":"https://api.github.com/repos/philburk/android-midisuite/issues/19","number":19,"state":"open","locked":false,"title":"Unregister device callbacks when screen rotated.","user":{"login":"philburk","id":5175913,"avatar_url":"https://avatars.githubusercontent.com/u/5175913?v=3","gravatar_id":"","url":"https://api.github.com/users/philburk","html_url":"https://github.com/philburk","followers_url":"https://api.github.com/users/philburk/followers","following_url":"https://api.github.com/users/philburk/following{/other_user}","gists_url":"https://api.github.com/users/philburk/gists{/gist_id}","starred_url":"https://api.github.com/users/philburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philburk/subscriptions","organizations_url":"https://api.github.com/users/philburk/orgs","repos_url":"https://api.github.com/users/philburk/repos","events_url":"https://api.github.com/users/philburk/events{/privacy}","received_events_url":"https://api.github.com/users/philburk/received_events","type":"User","site_admin":false},"body":"In M the MidiManager.unregisterDeviceCallback() method does nothing.\r\nAs a workaround this code manages a local list of callbacks.\r\nAlso fixes a problem with creating multiple FakeKeyGenerators, which was causing SecurityException spew.\r\n","created_at":"2016-07-06T21:44:33Z","updated_at":"2016-07-06T22:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c07999c415033001b475e30c6e822218b3c56a45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/philburk/android-midisuite/pulls/19/commits","review_comments_url":"https://api.github.com/repos/philburk/android-midisuite/pulls/19/comments","review_comment_url":"https://api.github.com/repos/philburk/android-midisuite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/philburk/android-midisuite/issues/19/comments","statuses_url":"https://api.github.com/repos/philburk/android-midisuite/statuses/027d985c291cec7a8abe7f84eb71aedcea26e332","head":{"label":"philburk:unregister","ref":"unregister","sha":"027d985c291cec7a8abe7f84eb71aedcea26e332","user":{"login":"philburk","id":5175913,"avatar_url":"https://avatars.githubusercontent.com/u/5175913?v=3","gravatar_id":"","url":"https://api.github.com/users/philburk","html_url":"https://github.com/philburk","followers_url":"https://api.github.com/users/philburk/followers","following_url":"https://api.github.com/users/philburk/following{/other_user}","gists_url":"https://api.github.com/users/philburk/gists{/gist_id}","starred_url":"https://api.github.com/users/philburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philburk/subscriptions","organizations_url":"https://api.github.com/users/philburk/orgs","repos_url":"https://api.github.com/users/philburk/repos","events_url":"https://api.github.com/users/philburk/events{/privacy}","received_events_url":"https://api.github.com/users/philburk/received_events","type":"User","site_admin":false},"repo":{"id":44210114,"name":"android-midisuite","full_name":"philburk/android-midisuite","owner":{"login":"philburk","id":5175913,"avatar_url":"https://avatars.githubusercontent.com/u/5175913?v=3","gravatar_id":"","url":"https://api.github.com/users/philburk","html_url":"https://github.com/philburk","followers_url":"https://api.github.com/users/philburk/followers","following_url":"https://api.github.com/users/philburk/following{/other_user}","gists_url":"https://api.github.com/users/philburk/gists{/gist_id}","starred_url":"https://api.github.com/users/philburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philburk/subscriptions","organizations_url":"https://api.github.com/users/philburk/orgs","repos_url":"https://api.github.com/users/philburk/repos","events_url":"https://api.github.com/users/philburk/events{/privacy}","received_events_url":"https://api.github.com/users/philburk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philburk/android-midisuite","description":"Android MIDI test programs and examples.","fork":false,"url":"https://api.github.com/repos/philburk/android-midisuite","forks_url":"https://api.github.com/repos/philburk/android-midisuite/forks","keys_url":"https://api.github.com/repos/philburk/android-midisuite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philburk/android-midisuite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philburk/android-midisuite/teams","hooks_url":"https://api.github.com/repos/philburk/android-midisuite/hooks","issue_events_url":"https://api.github.com/repos/philburk/android-midisuite/issues/events{/number}","events_url":"https://api.github.com/repos/philburk/android-midisuite/events","assignees_url":"https://api.github.com/repos/philburk/android-midisuite/assignees{/user}","branches_url":"https://api.github.com/repos/philburk/android-midisuite/branches{/branch}","tags_url":"https://api.github.com/repos/philburk/android-midisuite/tags","blobs_url":"https://api.github.com/repos/philburk/android-midisuite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philburk/android-midisuite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philburk/android-midisuite/git/refs{/sha}","trees_url":"https://api.github.com/repos/philburk/android-midisuite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philburk/android-midisuite/statuses/{sha}","languages_url":"https://api.github.com/repos/philburk/android-midisuite/languages","stargazers_url":"https://api.github.com/repos/philburk/android-midisuite/stargazers","contributors_url":"https://api.github.com/repos/philburk/android-midisuite/contributors","subscribers_url":"https://api.github.com/repos/philburk/android-midisuite/subscribers","subscription_url":"https://api.github.com/repos/philburk/android-midisuite/subscription","commits_url":"https://api.github.com/repos/philburk/android-midisuite/commits{/sha}","git_commits_url":"https://api.github.com/repos/philburk/android-midisuite/git/commits{/sha}","comments_url":"https://api.github.com/repos/philburk/android-midisuite/comments{/number}","issue_comment_url":"https://api.github.com/repos/philburk/android-midisuite/issues/comments{/number}","contents_url":"https://api.github.com/repos/philburk/android-midisuite/contents/{+path}","compare_url":"https://api.github.com/repos/philburk/android-midisuite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philburk/android-midisuite/merges","archive_url":"https://api.github.com/repos/philburk/android-midisuite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philburk/android-midisuite/downloads","issues_url":"https://api.github.com/repos/philburk/android-midisuite/issues{/number}","pulls_url":"https://api.github.com/repos/philburk/android-midisuite/pulls{/number}","milestones_url":"https://api.github.com/repos/philburk/android-midisuite/milestones{/number}","notifications_url":"https://api.github.com/repos/philburk/android-midisuite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philburk/android-midisuite/labels{/name}","releases_url":"https://api.github.com/repos/philburk/android-midisuite/releases{/id}","deployments_url":"https://api.github.com/repos/philburk/android-midisuite/deployments","created_at":"2015-10-13T22:51:38Z","updated_at":"2016-05-26T17:52:17Z","pushed_at":"2016-07-06T22:11:38Z","git_url":"git://github.com/philburk/android-midisuite.git","ssh_url":"git@github.com:philburk/android-midisuite.git","clone_url":"https://github.com/philburk/android-midisuite.git","svn_url":"https://github.com/philburk/android-midisuite","homepage":null,"size":333,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":15,"default_branch":"master"}},"base":{"label":"philburk:master","ref":"master","sha":"751e4aee4fee87196adc677c3cdd1214682fb7df","user":{"login":"philburk","id":5175913,"avatar_url":"https://avatars.githubusercontent.com/u/5175913?v=3","gravatar_id":"","url":"https://api.github.com/users/philburk","html_url":"https://github.com/philburk","followers_url":"https://api.github.com/users/philburk/followers","following_url":"https://api.github.com/users/philburk/following{/other_user}","gists_url":"https://api.github.com/users/philburk/gists{/gist_id}","starred_url":"https://api.github.com/users/philburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philburk/subscriptions","organizations_url":"https://api.github.com/users/philburk/orgs","repos_url":"https://api.github.com/users/philburk/repos","events_url":"https://api.github.com/users/philburk/events{/privacy}","received_events_url":"https://api.github.com/users/philburk/received_events","type":"User","site_admin":false},"repo":{"id":44210114,"name":"android-midisuite","full_name":"philburk/android-midisuite","owner":{"login":"philburk","id":5175913,"avatar_url":"https://avatars.githubusercontent.com/u/5175913?v=3","gravatar_id":"","url":"https://api.github.com/users/philburk","html_url":"https://github.com/philburk","followers_url":"https://api.github.com/users/philburk/followers","following_url":"https://api.github.com/users/philburk/following{/other_user}","gists_url":"https://api.github.com/users/philburk/gists{/gist_id}","starred_url":"https://api.github.com/users/philburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philburk/subscriptions","organizations_url":"https://api.github.com/users/philburk/orgs","repos_url":"https://api.github.com/users/philburk/repos","events_url":"https://api.github.com/users/philburk/events{/privacy}","received_events_url":"https://api.github.com/users/philburk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philburk/android-midisuite","description":"Android MIDI test programs and examples.","fork":false,"url":"https://api.github.com/repos/philburk/android-midisuite","forks_url":"https://api.github.com/repos/philburk/android-midisuite/forks","keys_url":"https://api.github.com/repos/philburk/android-midisuite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philburk/android-midisuite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philburk/android-midisuite/teams","hooks_url":"https://api.github.com/repos/philburk/android-midisuite/hooks","issue_events_url":"https://api.github.com/repos/philburk/android-midisuite/issues/events{/number}","events_url":"https://api.github.com/repos/philburk/android-midisuite/events","assignees_url":"https://api.github.com/repos/philburk/android-midisuite/assignees{/user}","branches_url":"https://api.github.com/repos/philburk/android-midisuite/branches{/branch}","tags_url":"https://api.github.com/repos/philburk/android-midisuite/tags","blobs_url":"https://api.github.com/repos/philburk/android-midisuite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philburk/android-midisuite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philburk/android-midisuite/git/refs{/sha}","trees_url":"https://api.github.com/repos/philburk/android-midisuite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philburk/android-midisuite/statuses/{sha}","languages_url":"https://api.github.com/repos/philburk/android-midisuite/languages","stargazers_url":"https://api.github.com/repos/philburk/android-midisuite/stargazers","contributors_url":"https://api.github.com/repos/philburk/android-midisuite/contributors","subscribers_url":"https://api.github.com/repos/philburk/android-midisuite/subscribers","subscription_url":"https://api.github.com/repos/philburk/android-midisuite/subscription","commits_url":"https://api.github.com/repos/philburk/android-midisuite/commits{/sha}","git_commits_url":"https://api.github.com/repos/philburk/android-midisuite/git/commits{/sha}","comments_url":"https://api.github.com/repos/philburk/android-midisuite/comments{/number}","issue_comment_url":"https://api.github.com/repos/philburk/android-midisuite/issues/comments{/number}","contents_url":"https://api.github.com/repos/philburk/android-midisuite/contents/{+path}","compare_url":"https://api.github.com/repos/philburk/android-midisuite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philburk/android-midisuite/merges","archive_url":"https://api.github.com/repos/philburk/android-midisuite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philburk/android-midisuite/downloads","issues_url":"https://api.github.com/repos/philburk/android-midisuite/issues{/number}","pulls_url":"https://api.github.com/repos/philburk/android-midisuite/pulls{/number}","milestones_url":"https://api.github.com/repos/philburk/android-midisuite/milestones{/number}","notifications_url":"https://api.github.com/repos/philburk/android-midisuite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philburk/android-midisuite/labels{/name}","releases_url":"https://api.github.com/repos/philburk/android-midisuite/releases{/id}","deployments_url":"https://api.github.com/repos/philburk/android-midisuite/deployments","created_at":"2015-10-13T22:51:38Z","updated_at":"2016-05-26T17:52:17Z","pushed_at":"2016-07-06T22:11:38Z","git_url":"git://github.com/philburk/android-midisuite.git","ssh_url":"git@github.com:philburk/android-midisuite.git","clone_url":"https://github.com/philburk/android-midisuite.git","svn_url":"https://github.com/philburk/android-midisuite","homepage":null,"size":333,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/19"},"html":{"href":"https://github.com/philburk/android-midisuite/pull/19"},"issue":{"href":"https://api.github.com/repos/philburk/android-midisuite/issues/19"},"comments":{"href":"https://api.github.com/repos/philburk/android-midisuite/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/philburk/android-midisuite/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/philburk/android-midisuite/statuses/027d985c291cec7a8abe7f84eb71aedcea26e332"}}}}
{"actor":{"display_login":"BenjaminFair"}}