{"action":"created","comment":{"url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/comments/43586534","id":43586534,"diff_hunk":"@@ -102,11 +105,15 @@\n \n     @Override\n     public void onCreate(@Nullable Bundle savedInstanceState) {\n-        if (DEBUG_LIFECYCLE) logger.debug(\"onCreate({})\", savedInstanceState);\n-        super.onCreate(savedInstanceState);\n+        logger.debug(\"onCreate({})\", savedInstanceState);\n+\n+        // after OOM kill and not going to restore anything? remove all fragments & open buffers\n+        if (!P.isServiceAlive() && !BufferList.hasData()) {","path":"weechat-android/src/main/java/com/ubergeek42/WeechatAndroid/WeechatActivity.java","position":97,"original_position":97,"commit_id":"582695bc60eb1ec01a8763fb0f7d771e427c846f","original_commit_id":"582695bc60eb1ec01a8763fb0f7d771e427c846f","user":{"login":"mhoran","id":5330,"avatar_url":"https://avatars.githubusercontent.com/u/5330?v=3","gravatar_id":"","url":"https://api.github.com/users/mhoran","html_url":"https://github.com/mhoran","followers_url":"https://api.github.com/users/mhoran/followers","following_url":"https://api.github.com/users/mhoran/following{/other_user}","gists_url":"https://api.github.com/users/mhoran/gists{/gist_id}","starred_url":"https://api.github.com/users/mhoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhoran/subscriptions","organizations_url":"https://api.github.com/users/mhoran/orgs","repos_url":"https://api.github.com/users/mhoran/repos","events_url":"https://api.github.com/users/mhoran/events{/privacy}","received_events_url":"https://api.github.com/users/mhoran/received_events","type":"User","site_admin":false},"body":"I feel like SharedPreferences is not the correct place to store service state. While it works, we've now got global state stored in Android's preference database, and have introduced global state which should instead be extracted from components via interfaces.","created_at":"2015-11-01T19:32:20Z","updated_at":"2015-11-01T19:32:20Z","html_url":"https://github.com/ubergeek42/weechat-android/pull/233#discussion_r43586534","pull_request_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233","_links":{"self":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/comments/43586534"},"html":{"href":"https://github.com/ubergeek42/weechat-android/pull/233#discussion_r43586534"},"pull_request":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233"}}},"pull_request":{"url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233","id":49376062,"html_url":"https://github.com/ubergeek42/weechat-android/pull/233","diff_url":"https://github.com/ubergeek42/weechat-android/pull/233.diff","patch_url":"https://github.com/ubergeek42/weechat-android/pull/233.patch","issue_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/233","number":233,"state":"open","locked":false,"title":"Woah","user":{"login":"oakkitten","id":1710718,"avatar_url":"https://avatars.githubusercontent.com/u/1710718?v=3","gravatar_id":"","url":"https://api.github.com/users/oakkitten","html_url":"https://github.com/oakkitten","followers_url":"https://api.github.com/users/oakkitten/followers","following_url":"https://api.github.com/users/oakkitten/following{/other_user}","gists_url":"https://api.github.com/users/oakkitten/gists{/gist_id}","starred_url":"https://api.github.com/users/oakkitten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oakkitten/subscriptions","organizations_url":"https://api.github.com/users/oakkitten/orgs","repos_url":"https://api.github.com/users/oakkitten/repos","events_url":"https://api.github.com/users/oakkitten/events{/privacy}","received_events_url":"https://api.github.com/users/oakkitten/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-01T17:17:02Z","updated_at":"2015-11-01T19:32:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ac2c709a2f792c7c1277fe47e9a03eeb9b69346","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233/commits","review_comments_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233/comments","review_comment_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/233/comments","statuses_url":"https://api.github.com/repos/ubergeek42/weechat-android/statuses/582695bc60eb1ec01a8763fb0f7d771e427c846f","head":{"label":"ubergeek42:woah","ref":"woah","sha":"582695bc60eb1ec01a8763fb0f7d771e427c846f","user":{"login":"ubergeek42","id":672279,"avatar_url":"https://avatars.githubusercontent.com/u/672279?v=3","gravatar_id":"","url":"https://api.github.com/users/ubergeek42","html_url":"https://github.com/ubergeek42","followers_url":"https://api.github.com/users/ubergeek42/followers","following_url":"https://api.github.com/users/ubergeek42/following{/other_user}","gists_url":"https://api.github.com/users/ubergeek42/gists{/gist_id}","starred_url":"https://api.github.com/users/ubergeek42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubergeek42/subscriptions","organizations_url":"https://api.github.com/users/ubergeek42/orgs","repos_url":"https://api.github.com/users/ubergeek42/repos","events_url":"https://api.github.com/users/ubergeek42/events{/privacy}","received_events_url":"https://api.github.com/users/ubergeek42/received_events","type":"User","site_admin":false},"repo":{"id":3555504,"name":"weechat-android","full_name":"ubergeek42/weechat-android","owner":{"login":"ubergeek42","id":672279,"avatar_url":"https://avatars.githubusercontent.com/u/672279?v=3","gravatar_id":"","url":"https://api.github.com/users/ubergeek42","html_url":"https://github.com/ubergeek42","followers_url":"https://api.github.com/users/ubergeek42/followers","following_url":"https://api.github.com/users/ubergeek42/following{/other_user}","gists_url":"https://api.github.com/users/ubergeek42/gists{/gist_id}","starred_url":"https://api.github.com/users/ubergeek42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubergeek42/subscriptions","organizations_url":"https://api.github.com/users/ubergeek42/orgs","repos_url":"https://api.github.com/users/ubergeek42/repos","events_url":"https://api.github.com/users/ubergeek42/events{/privacy}","received_events_url":"https://api.github.com/users/ubergeek42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ubergeek42/weechat-android","description":"Simple Weechat-Relay Android Client","fork":false,"url":"https://api.github.com/repos/ubergeek42/weechat-android","forks_url":"https://api.github.com/repos/ubergeek42/weechat-android/forks","keys_url":"https://api.github.com/repos/ubergeek42/weechat-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubergeek42/weechat-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubergeek42/weechat-android/teams","hooks_url":"https://api.github.com/repos/ubergeek42/weechat-android/hooks","issue_events_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/events{/number}","events_url":"https://api.github.com/repos/ubergeek42/weechat-android/events","assignees_url":"https://api.github.com/repos/ubergeek42/weechat-android/assignees{/user}","branches_url":"https://api.github.com/repos/ubergeek42/weechat-android/branches{/branch}","tags_url":"https://api.github.com/repos/ubergeek42/weechat-android/tags","blobs_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubergeek42/weechat-android/statuses/{sha}","languages_url":"https://api.github.com/repos/ubergeek42/weechat-android/languages","stargazers_url":"https://api.github.com/repos/ubergeek42/weechat-android/stargazers","contributors_url":"https://api.github.com/repos/ubergeek42/weechat-android/contributors","subscribers_url":"https://api.github.com/repos/ubergeek42/weechat-android/subscribers","subscription_url":"https://api.github.com/repos/ubergeek42/weechat-android/subscription","commits_url":"https://api.github.com/repos/ubergeek42/weechat-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubergeek42/weechat-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubergeek42/weechat-android/contents/{+path}","compare_url":"https://api.github.com/repos/ubergeek42/weechat-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubergeek42/weechat-android/merges","archive_url":"https://api.github.com/repos/ubergeek42/weechat-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubergeek42/weechat-android/downloads","issues_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues{/number}","pulls_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls{/number}","milestones_url":"https://api.github.com/repos/ubergeek42/weechat-android/milestones{/number}","notifications_url":"https://api.github.com/repos/ubergeek42/weechat-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubergeek42/weechat-android/labels{/name}","releases_url":"https://api.github.com/repos/ubergeek42/weechat-android/releases{/id}","created_at":"2012-02-26T22:50:59Z","updated_at":"2015-10-27T19:46:53Z","pushed_at":"2015-11-01T18:55:16Z","git_url":"git://github.com/ubergeek42/weechat-android.git","ssh_url":"git@github.com:ubergeek42/weechat-android.git","clone_url":"https://github.com/ubergeek42/weechat-android.git","svn_url":"https://github.com/ubergeek42/weechat-android","homepage":"","size":7496,"stargazers_count":186,"watchers_count":186,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"open_issues_count":69,"forks":48,"open_issues":69,"watchers":186,"default_branch":"master"}},"base":{"label":"ubergeek42:master","ref":"master","sha":"71fb7cfe654b0e8ef1085f311717c7c14e4d5367","user":{"login":"ubergeek42","id":672279,"avatar_url":"https://avatars.githubusercontent.com/u/672279?v=3","gravatar_id":"","url":"https://api.github.com/users/ubergeek42","html_url":"https://github.com/ubergeek42","followers_url":"https://api.github.com/users/ubergeek42/followers","following_url":"https://api.github.com/users/ubergeek42/following{/other_user}","gists_url":"https://api.github.com/users/ubergeek42/gists{/gist_id}","starred_url":"https://api.github.com/users/ubergeek42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubergeek42/subscriptions","organizations_url":"https://api.github.com/users/ubergeek42/orgs","repos_url":"https://api.github.com/users/ubergeek42/repos","events_url":"https://api.github.com/users/ubergeek42/events{/privacy}","received_events_url":"https://api.github.com/users/ubergeek42/received_events","type":"User","site_admin":false},"repo":{"id":3555504,"name":"weechat-android","full_name":"ubergeek42/weechat-android","owner":{"login":"ubergeek42","id":672279,"avatar_url":"https://avatars.githubusercontent.com/u/672279?v=3","gravatar_id":"","url":"https://api.github.com/users/ubergeek42","html_url":"https://github.com/ubergeek42","followers_url":"https://api.github.com/users/ubergeek42/followers","following_url":"https://api.github.com/users/ubergeek42/following{/other_user}","gists_url":"https://api.github.com/users/ubergeek42/gists{/gist_id}","starred_url":"https://api.github.com/users/ubergeek42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubergeek42/subscriptions","organizations_url":"https://api.github.com/users/ubergeek42/orgs","repos_url":"https://api.github.com/users/ubergeek42/repos","events_url":"https://api.github.com/users/ubergeek42/events{/privacy}","received_events_url":"https://api.github.com/users/ubergeek42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ubergeek42/weechat-android","description":"Simple Weechat-Relay Android Client","fork":false,"url":"https://api.github.com/repos/ubergeek42/weechat-android","forks_url":"https://api.github.com/repos/ubergeek42/weechat-android/forks","keys_url":"https://api.github.com/repos/ubergeek42/weechat-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubergeek42/weechat-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubergeek42/weechat-android/teams","hooks_url":"https://api.github.com/repos/ubergeek42/weechat-android/hooks","issue_events_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/events{/number}","events_url":"https://api.github.com/repos/ubergeek42/weechat-android/events","assignees_url":"https://api.github.com/repos/ubergeek42/weechat-android/assignees{/user}","branches_url":"https://api.github.com/repos/ubergeek42/weechat-android/branches{/branch}","tags_url":"https://api.github.com/repos/ubergeek42/weechat-android/tags","blobs_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubergeek42/weechat-android/statuses/{sha}","languages_url":"https://api.github.com/repos/ubergeek42/weechat-android/languages","stargazers_url":"https://api.github.com/repos/ubergeek42/weechat-android/stargazers","contributors_url":"https://api.github.com/repos/ubergeek42/weechat-android/contributors","subscribers_url":"https://api.github.com/repos/ubergeek42/weechat-android/subscribers","subscription_url":"https://api.github.com/repos/ubergeek42/weechat-android/subscription","commits_url":"https://api.github.com/repos/ubergeek42/weechat-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubergeek42/weechat-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubergeek42/weechat-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubergeek42/weechat-android/contents/{+path}","compare_url":"https://api.github.com/repos/ubergeek42/weechat-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubergeek42/weechat-android/merges","archive_url":"https://api.github.com/repos/ubergeek42/weechat-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubergeek42/weechat-android/downloads","issues_url":"https://api.github.com/repos/ubergeek42/weechat-android/issues{/number}","pulls_url":"https://api.github.com/repos/ubergeek42/weechat-android/pulls{/number}","milestones_url":"https://api.github.com/repos/ubergeek42/weechat-android/milestones{/number}","notifications_url":"https://api.github.com/repos/ubergeek42/weechat-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubergeek42/weechat-android/labels{/name}","releases_url":"https://api.github.com/repos/ubergeek42/weechat-android/releases{/id}","created_at":"2012-02-26T22:50:59Z","updated_at":"2015-10-27T19:46:53Z","pushed_at":"2015-11-01T18:55:16Z","git_url":"git://github.com/ubergeek42/weechat-android.git","ssh_url":"git@github.com:ubergeek42/weechat-android.git","clone_url":"https://github.com/ubergeek42/weechat-android.git","svn_url":"https://github.com/ubergeek42/weechat-android","homepage":"","size":7496,"stargazers_count":186,"watchers_count":186,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"open_issues_count":69,"forks":48,"open_issues":69,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233"},"html":{"href":"https://github.com/ubergeek42/weechat-android/pull/233"},"issue":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/issues/233"},"comments":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/ubergeek42/weechat-android/statuses/582695bc60eb1ec01a8763fb0f7d771e427c846f"}}}}