{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments/58632121","id":58632121,"diff_hunk":"@@ -147,8 +151,8 @@ public static String getBundleUrl(String assetsBundleFileName) {\n \n         return currentInstance.getBundleUrlInternal(assetsBundleFileName);\n     }\n-\n-    public String getBundleUrlInternal(String assetsBundleFileName) {\n+    \n+    private String getBundleUrlInternal(String assetsBundleFileName) {","path":"android/app/src/main/java/com/microsoft/codepush/react/CodePush.java","position":33,"original_position":33,"commit_id":"a1d8e7e513e92f1e980e0046b2bc9383aabc26ee","original_commit_id":"a1d8e7e513e92f1e980e0046b2bc9383aabc26ee","user":{"login":"lostintangent","id":116461,"avatar_url":"https://avatars.githubusercontent.com/u/116461?v=3","gravatar_id":"","url":"https://api.github.com/users/lostintangent","html_url":"https://github.com/lostintangent","followers_url":"https://api.github.com/users/lostintangent/followers","following_url":"https://api.github.com/users/lostintangent/following{/other_user}","gists_url":"https://api.github.com/users/lostintangent/gists{/gist_id}","starred_url":"https://api.github.com/users/lostintangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostintangent/subscriptions","organizations_url":"https://api.github.com/users/lostintangent/orgs","repos_url":"https://api.github.com/users/lostintangent/repos","events_url":"https://api.github.com/users/lostintangent/events{/privacy}","received_events_url":"https://api.github.com/users/lostintangent/received_events","type":"User","site_admin":false},"body":"Good call, I'll fix this.","created_at":"2016-04-05T23:38:39Z","updated_at":"2016-04-05T23:38:39Z","html_url":"https://github.com/Microsoft/react-native-code-push/pull/275#discussion_r58632121","pull_request_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments/58632121"},"html":{"href":"https://github.com/Microsoft/react-native-code-push/pull/275#discussion_r58632121"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275","id":65249576,"html_url":"https://github.com/Microsoft/react-native-code-push/pull/275","diff_url":"https://github.com/Microsoft/react-native-code-push/pull/275.diff","patch_url":"https://github.com/Microsoft/react-native-code-push/pull/275.patch","issue_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/275","number":275,"state":"open","locked":false,"title":"Android reload refactor","user":{"login":"lostintangent","id":116461,"avatar_url":"https://avatars.githubusercontent.com/u/116461?v=3","gravatar_id":"","url":"https://api.github.com/users/lostintangent","html_url":"https://github.com/lostintangent","followers_url":"https://api.github.com/users/lostintangent/followers","following_url":"https://api.github.com/users/lostintangent/following{/other_user}","gists_url":"https://api.github.com/users/lostintangent/gists{/gist_id}","starred_url":"https://api.github.com/users/lostintangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostintangent/subscriptions","organizations_url":"https://api.github.com/users/lostintangent/orgs","repos_url":"https://api.github.com/users/lostintangent/repos","events_url":"https://api.github.com/users/lostintangent/events{/privacy}","received_events_url":"https://api.github.com/users/lostintangent/received_events","type":"User","site_admin":false},"body":"This PR implements a new app reloading solution on Android that doesn't require restarting the `Activity`, and therefore, is less obtrusive to the user-experience. It works based on private reflection, and therefore, in order to be resilient to breaking changes, it will fall back to the old `Activity` restart logic if it fails for any reason.\r\n\r\nAfter making this change, the `initializeUpdateAfterRestart` method needs to be called whenever the module is initialized, not when the `CodePush` class is constructed, since the `CodePush` class would only be constructed on the app load. Therefore, I moved the call to this method to the module's `initialize` method, which will be appropriately triggered on app start as well as after a programmatic restart. This change ends up mirroring the way that iOS already works.\r\n\r\nFinally, I re-organized the methods a little bit in the module, which is why there is some churn on unrelated methods (e.g. `getConstants`, `getName`).","created_at":"2016-04-05T04:26:32Z","updated_at":"2016-04-05T23:38:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bfe543bb6454d80c54cce6f50a56ae147bccf0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275/commits","review_comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275/comments","review_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/275/comments","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/a1d8e7e513e92f1e980e0046b2bc9383aabc26ee","head":{"label":"Microsoft:reload","ref":"reload","sha":"a1d8e7e513e92f1e980e0046b2bc9383aabc26ee","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":36749153,"name":"react-native-code-push","full_name":"Microsoft/react-native-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/react-native-code-push","description":"React Native plugin for the CodePush service.","fork":false,"url":"https://api.github.com/repos/Microsoft/react-native-code-push","forks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/react-native-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/react-native-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/react-native-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/react-native-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/react-native-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/react-native-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/react-native-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/react-native-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/react-native-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/react-native-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/react-native-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/react-native-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/react-native-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/deployments","created_at":"2015-06-02T17:19:20Z","updated_at":"2016-04-05T18:32:37Z","pushed_at":"2016-04-05T15:39:02Z","git_url":"git://github.com/Microsoft/react-native-code-push.git","ssh_url":"git@github.com:Microsoft/react-native-code-push.git","clone_url":"https://github.com/Microsoft/react-native-code-push.git","svn_url":"https://github.com/Microsoft/react-native-code-push","homepage":"http://codepush.tools","size":3581,"stargazers_count":868,"watchers_count":868,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":3,"forks":95,"open_issues":3,"watchers":868,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"4fd36e88e4d22ff9ece190849e6f14044047a671","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":36749153,"name":"react-native-code-push","full_name":"Microsoft/react-native-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/react-native-code-push","description":"React Native plugin for the CodePush service.","fork":false,"url":"https://api.github.com/repos/Microsoft/react-native-code-push","forks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/react-native-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/react-native-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/react-native-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/react-native-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/react-native-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/react-native-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/react-native-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/react-native-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/react-native-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/react-native-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/react-native-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/react-native-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/react-native-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/deployments","created_at":"2015-06-02T17:19:20Z","updated_at":"2016-04-05T18:32:37Z","pushed_at":"2016-04-05T15:39:02Z","git_url":"git://github.com/Microsoft/react-native-code-push.git","ssh_url":"git@github.com:Microsoft/react-native-code-push.git","clone_url":"https://github.com/Microsoft/react-native-code-push.git","svn_url":"https://github.com/Microsoft/react-native-code-push","homepage":"http://codepush.tools","size":3581,"stargazers_count":868,"watchers_count":868,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":3,"forks":95,"open_issues":3,"watchers":868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275"},"html":{"href":"https://github.com/Microsoft/react-native-code-push/pull/275"},"issue":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/275"},"comments":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/275/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/275/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/a1d8e7e513e92f1e980e0046b2bc9383aabc26ee"}}}}