{"action":"created","comment":{"url":"https://api.github.com/repos/Neamar/KISS/pulls/comments/41866618","id":41866618,"diff_hunk":"@@ -0,0 +1,71 @@\n+package fr.neamar.kiss.broadcast;\n+\n+import android.content.BroadcastReceiver;\n+import android.content.Context;\n+import android.content.Intent;\n+import android.content.Intent.ShortcutIconResource;\n+import android.graphics.Bitmap;\n+import android.util.Log;\n+import fr.neamar.kiss.DataHandler;\n+import fr.neamar.kiss.KissApplication;\n+import fr.neamar.kiss.dataprovider.ShortcutProvider;\n+import fr.neamar.kiss.pojo.ShortcutPojo;\n+\n+public class InstallShortcutHandler extends BroadcastReceiver {\n+\n+    @Override\n+    public void onReceive(Context context, Intent data) {\n+\n+        DataHandler dh = KissApplication.getDataHandler(context);\n+        ShortcutProvider sp = dh.getShortcutProvider();\n+\n+        if (sp == null)","path":"app/src/main/java/fr/neamar/kiss/broadcast/InstallShortcutHandler.java","position":22,"original_position":22,"commit_id":"342d7170f457784ed6b36f14e5e6e5787b619a53","original_commit_id":"342d7170f457784ed6b36f14e5e6e5787b619a53","user":{"login":"Neamar","id":536844,"avatar_url":"https://avatars.githubusercontent.com/u/536844?v=3","gravatar_id":"","url":"https://api.github.com/users/Neamar","html_url":"https://github.com/Neamar","followers_url":"https://api.github.com/users/Neamar/followers","following_url":"https://api.github.com/users/Neamar/following{/other_user}","gists_url":"https://api.github.com/users/Neamar/gists{/gist_id}","starred_url":"https://api.github.com/users/Neamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neamar/subscriptions","organizations_url":"https://api.github.com/users/Neamar/orgs","repos_url":"https://api.github.com/users/Neamar/repos","events_url":"https://api.github.com/users/Neamar/events{/privacy}","received_events_url":"https://api.github.com/users/Neamar/received_events","type":"User","site_admin":false},"body":"oh. So turns out you're handling the null case.\r\n\r\nTherefore, maybe we should initialize the shortcuthandler only if `prefs.getBoolean(\"enable-shortcuts\", true)`.\r\n\r\nSince we're storing image in DB, i think that some app could add shorcuts too fast and we may want to givve the option to the user to \"drop\" all queries to add shortcuts.\r\n\r\nI seem to remember we spoke on this earlier in the opposite sense, saying that we want the shortcuts to be added even if they are not displayed. I'm not so sure on that anymore, what's your opinion?","created_at":"2015-10-13T13:45:23Z","updated_at":"2015-10-13T13:45:23Z","html_url":"https://github.com/Neamar/KISS/pull/293#discussion_r41866618","pull_request_url":"https://api.github.com/repos/Neamar/KISS/pulls/293","_links":{"self":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/comments/41866618"},"html":{"href":"https://github.com/Neamar/KISS/pull/293#discussion_r41866618"},"pull_request":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/293"}}},"pull_request":{"url":"https://api.github.com/repos/Neamar/KISS/pulls/293","id":47458405,"html_url":"https://github.com/Neamar/KISS/pull/293","diff_url":"https://github.com/Neamar/KISS/pull/293.diff","patch_url":"https://github.com/Neamar/KISS/pull/293.patch","issue_url":"https://api.github.com/repos/Neamar/KISS/issues/293","number":293,"state":"open","locked":false,"title":"Added shortcuts, implements #217","user":{"login":"ilmich","id":148796,"avatar_url":"https://avatars.githubusercontent.com/u/148796?v=3","gravatar_id":"","url":"https://api.github.com/users/ilmich","html_url":"https://github.com/ilmich","followers_url":"https://api.github.com/users/ilmich/followers","following_url":"https://api.github.com/users/ilmich/following{/other_user}","gists_url":"https://api.github.com/users/ilmich/gists{/gist_id}","starred_url":"https://api.github.com/users/ilmich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilmich/subscriptions","organizations_url":"https://api.github.com/users/ilmich/orgs","repos_url":"https://api.github.com/users/ilmich/repos","events_url":"https://api.github.com/users/ilmich/events{/privacy}","received_events_url":"https://api.github.com/users/ilmich/received_events","type":"User","site_admin":false},"body":"This is my final implementation.\r\nI've upgraded database version according to latest released version of Kiss Launcher.\r\n\r\nCheers\r\nMichele","created_at":"2015-10-12T20:00:47Z","updated_at":"2015-10-13T13:45:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3442e1eb044cc45b58c2f6ba8fe5720f4ac87d3e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Neamar/KISS/pulls/293/commits","review_comments_url":"https://api.github.com/repos/Neamar/KISS/pulls/293/comments","review_comment_url":"https://api.github.com/repos/Neamar/KISS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Neamar/KISS/issues/293/comments","statuses_url":"https://api.github.com/repos/Neamar/KISS/statuses/342d7170f457784ed6b36f14e5e6e5787b619a53","head":{"label":"ilmich:shortcuts","ref":"shortcuts","sha":"342d7170f457784ed6b36f14e5e6e5787b619a53","user":{"login":"ilmich","id":148796,"avatar_url":"https://avatars.githubusercontent.com/u/148796?v=3","gravatar_id":"","url":"https://api.github.com/users/ilmich","html_url":"https://github.com/ilmich","followers_url":"https://api.github.com/users/ilmich/followers","following_url":"https://api.github.com/users/ilmich/following{/other_user}","gists_url":"https://api.github.com/users/ilmich/gists{/gist_id}","starred_url":"https://api.github.com/users/ilmich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilmich/subscriptions","organizations_url":"https://api.github.com/users/ilmich/orgs","repos_url":"https://api.github.com/users/ilmich/repos","events_url":"https://api.github.com/users/ilmich/events{/privacy}","received_events_url":"https://api.github.com/users/ilmich/received_events","type":"User","site_admin":false},"repo":{"id":40930830,"name":"KISS","full_name":"ilmich/KISS","owner":{"login":"ilmich","id":148796,"avatar_url":"https://avatars.githubusercontent.com/u/148796?v=3","gravatar_id":"","url":"https://api.github.com/users/ilmich","html_url":"https://github.com/ilmich","followers_url":"https://api.github.com/users/ilmich/followers","following_url":"https://api.github.com/users/ilmich/following{/other_user}","gists_url":"https://api.github.com/users/ilmich/gists{/gist_id}","starred_url":"https://api.github.com/users/ilmich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilmich/subscriptions","organizations_url":"https://api.github.com/users/ilmich/orgs","repos_url":"https://api.github.com/users/ilmich/repos","events_url":"https://api.github.com/users/ilmich/events{/privacy}","received_events_url":"https://api.github.com/users/ilmich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ilmich/KISS","description":"Lightning fast Android launcher","fork":true,"url":"https://api.github.com/repos/ilmich/KISS","forks_url":"https://api.github.com/repos/ilmich/KISS/forks","keys_url":"https://api.github.com/repos/ilmich/KISS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilmich/KISS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilmich/KISS/teams","hooks_url":"https://api.github.com/repos/ilmich/KISS/hooks","issue_events_url":"https://api.github.com/repos/ilmich/KISS/issues/events{/number}","events_url":"https://api.github.com/repos/ilmich/KISS/events","assignees_url":"https://api.github.com/repos/ilmich/KISS/assignees{/user}","branches_url":"https://api.github.com/repos/ilmich/KISS/branches{/branch}","tags_url":"https://api.github.com/repos/ilmich/KISS/tags","blobs_url":"https://api.github.com/repos/ilmich/KISS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilmich/KISS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilmich/KISS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilmich/KISS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilmich/KISS/statuses/{sha}","languages_url":"https://api.github.com/repos/ilmich/KISS/languages","stargazers_url":"https://api.github.com/repos/ilmich/KISS/stargazers","contributors_url":"https://api.github.com/repos/ilmich/KISS/contributors","subscribers_url":"https://api.github.com/repos/ilmich/KISS/subscribers","subscription_url":"https://api.github.com/repos/ilmich/KISS/subscription","commits_url":"https://api.github.com/repos/ilmich/KISS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilmich/KISS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilmich/KISS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilmich/KISS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilmich/KISS/contents/{+path}","compare_url":"https://api.github.com/repos/ilmich/KISS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilmich/KISS/merges","archive_url":"https://api.github.com/repos/ilmich/KISS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilmich/KISS/downloads","issues_url":"https://api.github.com/repos/ilmich/KISS/issues{/number}","pulls_url":"https://api.github.com/repos/ilmich/KISS/pulls{/number}","milestones_url":"https://api.github.com/repos/ilmich/KISS/milestones{/number}","notifications_url":"https://api.github.com/repos/ilmich/KISS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilmich/KISS/labels{/name}","releases_url":"https://api.github.com/repos/ilmich/KISS/releases{/id}","created_at":"2015-08-17T21:39:29Z","updated_at":"2015-08-17T21:39:30Z","pushed_at":"2015-10-12T19:56:51Z","git_url":"git://github.com/ilmich/KISS.git","ssh_url":"git@github.com:ilmich/KISS.git","clone_url":"https://github.com/ilmich/KISS.git","svn_url":"https://github.com/ilmich/KISS","homepage":"https://play.google.com/store/apps/details?id=fr.neamar.kiss","size":3358,"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":"master"}},"base":{"label":"Neamar:master","ref":"master","sha":"7504e866703d04246c7e87506dfdd377088c1b1f","user":{"login":"Neamar","id":536844,"avatar_url":"https://avatars.githubusercontent.com/u/536844?v=3","gravatar_id":"","url":"https://api.github.com/users/Neamar","html_url":"https://github.com/Neamar","followers_url":"https://api.github.com/users/Neamar/followers","following_url":"https://api.github.com/users/Neamar/following{/other_user}","gists_url":"https://api.github.com/users/Neamar/gists{/gist_id}","starred_url":"https://api.github.com/users/Neamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neamar/subscriptions","organizations_url":"https://api.github.com/users/Neamar/orgs","repos_url":"https://api.github.com/users/Neamar/repos","events_url":"https://api.github.com/users/Neamar/events{/privacy}","received_events_url":"https://api.github.com/users/Neamar/received_events","type":"User","site_admin":false},"repo":{"id":6047468,"name":"KISS","full_name":"Neamar/KISS","owner":{"login":"Neamar","id":536844,"avatar_url":"https://avatars.githubusercontent.com/u/536844?v=3","gravatar_id":"","url":"https://api.github.com/users/Neamar","html_url":"https://github.com/Neamar","followers_url":"https://api.github.com/users/Neamar/followers","following_url":"https://api.github.com/users/Neamar/following{/other_user}","gists_url":"https://api.github.com/users/Neamar/gists{/gist_id}","starred_url":"https://api.github.com/users/Neamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neamar/subscriptions","organizations_url":"https://api.github.com/users/Neamar/orgs","repos_url":"https://api.github.com/users/Neamar/repos","events_url":"https://api.github.com/users/Neamar/events{/privacy}","received_events_url":"https://api.github.com/users/Neamar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Neamar/KISS","description":"Lightning fast Android launcher","fork":false,"url":"https://api.github.com/repos/Neamar/KISS","forks_url":"https://api.github.com/repos/Neamar/KISS/forks","keys_url":"https://api.github.com/repos/Neamar/KISS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Neamar/KISS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Neamar/KISS/teams","hooks_url":"https://api.github.com/repos/Neamar/KISS/hooks","issue_events_url":"https://api.github.com/repos/Neamar/KISS/issues/events{/number}","events_url":"https://api.github.com/repos/Neamar/KISS/events","assignees_url":"https://api.github.com/repos/Neamar/KISS/assignees{/user}","branches_url":"https://api.github.com/repos/Neamar/KISS/branches{/branch}","tags_url":"https://api.github.com/repos/Neamar/KISS/tags","blobs_url":"https://api.github.com/repos/Neamar/KISS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Neamar/KISS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Neamar/KISS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Neamar/KISS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Neamar/KISS/statuses/{sha}","languages_url":"https://api.github.com/repos/Neamar/KISS/languages","stargazers_url":"https://api.github.com/repos/Neamar/KISS/stargazers","contributors_url":"https://api.github.com/repos/Neamar/KISS/contributors","subscribers_url":"https://api.github.com/repos/Neamar/KISS/subscribers","subscription_url":"https://api.github.com/repos/Neamar/KISS/subscription","commits_url":"https://api.github.com/repos/Neamar/KISS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Neamar/KISS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Neamar/KISS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Neamar/KISS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Neamar/KISS/contents/{+path}","compare_url":"https://api.github.com/repos/Neamar/KISS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Neamar/KISS/merges","archive_url":"https://api.github.com/repos/Neamar/KISS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Neamar/KISS/downloads","issues_url":"https://api.github.com/repos/Neamar/KISS/issues{/number}","pulls_url":"https://api.github.com/repos/Neamar/KISS/pulls{/number}","milestones_url":"https://api.github.com/repos/Neamar/KISS/milestones{/number}","notifications_url":"https://api.github.com/repos/Neamar/KISS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Neamar/KISS/labels{/name}","releases_url":"https://api.github.com/repos/Neamar/KISS/releases{/id}","created_at":"2012-10-02T16:03:43Z","updated_at":"2015-10-12T09:50:47Z","pushed_at":"2015-10-12T20:00:48Z","git_url":"git://github.com/Neamar/KISS.git","ssh_url":"git@github.com:Neamar/KISS.git","clone_url":"https://github.com/Neamar/KISS.git","svn_url":"https://github.com/Neamar/KISS","homepage":"https://play.google.com/store/apps/details?id=fr.neamar.kiss","size":64626,"stargazers_count":89,"watchers_count":89,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":33,"forks":31,"open_issues":33,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/293"},"html":{"href":"https://github.com/Neamar/KISS/pull/293"},"issue":{"href":"https://api.github.com/repos/Neamar/KISS/issues/293"},"comments":{"href":"https://api.github.com/repos/Neamar/KISS/issues/293/comments"},"review_comments":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/293/comments"},"review_comment":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Neamar/KISS/pulls/293/commits"},"statuses":{"href":"https://api.github.com/repos/Neamar/KISS/statuses/342d7170f457784ed6b36f14e5e6e5787b619a53"}}}}