{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/comments/166357038","pull_request_review_id":94406934,"id":166357038,"diff_hunk":"@@ -49,9 +54,37 @@ protected View onCreateView(ViewGroup parent) {\n         searchQueryEditText.addTextChangedListener(buildTextWatcherForErrorLayout(searchQueryErrorLayout));\n \n         progressView = view.findViewById(R.id.progress);\n+\n+        updateState();\n         return view;\n     }\n \n+    @Override\n+    protected void onRestoreInstanceState(Parcelable state) {\n+        SavedState savedState = (SavedState) state;\n+        super.onRestoreInstanceState(savedState.getSuperState());\n+        savedSearchEngineName = savedState.searchEngineName;\n+        savedSearchQuery = savedState.searchQuery;\n+    }\n+\n+    @Override\n+    protected Parcelable onSaveInstanceState() {\n+        Parcelable superState = super.onSaveInstanceState();\n+        SavedState savedState = new SavedState(superState);\n+        savedState.searchEngineName = engineNameEditText.getText().toString();\n+        savedState.searchQuery = searchQueryEditText.getText().toString();\n+        return savedState;\n+    }\n+\n+    private void updateState() {\n+        if (savedSearchEngineName != null) {","path":"app/src/main/java/org/mozilla/focus/search/ManualAddSearchEnginePreference.java","position":46,"original_position":46,"commit_id":"69d74437597ee3d1c8b934f02ff35055d30d8ec2","original_commit_id":"69d74437597ee3d1c8b934f02ff35055d30d8ec2","user":{"login":"noloman","id":183264,"avatar_url":"https://avatars2.githubusercontent.com/u/183264?v=4","gravatar_id":"","url":"https://api.github.com/users/noloman","html_url":"https://github.com/noloman","followers_url":"https://api.github.com/users/noloman/followers","following_url":"https://api.github.com/users/noloman/following{/other_user}","gists_url":"https://api.github.com/users/noloman/gists{/gist_id}","starred_url":"https://api.github.com/users/noloman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noloman/subscriptions","organizations_url":"https://api.github.com/users/noloman/orgs","repos_url":"https://api.github.com/users/noloman/repos","events_url":"https://api.github.com/users/noloman/events{/privacy}","received_events_url":"https://api.github.com/users/noloman/received_events","type":"User","site_admin":false},"body":"I think it would be better to null-check on the `engineNameEditText` and the `searchQueryEditText` themselves, as if you do not and the `EditText` is null, you'll crash the app; while if you simply set a `null` `String` on an existing `EditText` you'll see an empty text in the worst case scenario","created_at":"2018-02-06T16:20:27Z","updated_at":"2018-02-06T16:21:01Z","html_url":"https://github.com/mozilla-mobile/focus-android/pull/2064#discussion_r166357038","pull_request_url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/comments/166357038"},"html":{"href":"https://github.com/mozilla-mobile/focus-android/pull/2064#discussion_r166357038"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064","id":164285325,"html_url":"https://github.com/mozilla-mobile/focus-android/pull/2064","diff_url":"https://github.com/mozilla-mobile/focus-android/pull/2064.diff","patch_url":"https://github.com/mozilla-mobile/focus-android/pull/2064.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/2064","number":2064,"state":"open","locked":false,"title":"Closes #1974 Changing orientation while entering search engine details wipes entered data","user":{"login":"siddware","id":34205549,"avatar_url":"https://avatars3.githubusercontent.com/u/34205549?v=4","gravatar_id":"","url":"https://api.github.com/users/siddware","html_url":"https://github.com/siddware","followers_url":"https://api.github.com/users/siddware/followers","following_url":"https://api.github.com/users/siddware/following{/other_user}","gists_url":"https://api.github.com/users/siddware/gists{/gist_id}","starred_url":"https://api.github.com/users/siddware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddware/subscriptions","organizations_url":"https://api.github.com/users/siddware/orgs","repos_url":"https://api.github.com/users/siddware/repos","events_url":"https://api.github.com/users/siddware/events{/privacy}","received_events_url":"https://api.github.com/users/siddware/received_events","type":"User","site_admin":false},"body":"Implemented saving and restoring of view state during configuration changes. Closes #1974 ","created_at":"2018-01-22T11:43:38Z","updated_at":"2018-02-06T16:21:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5530ab6c1bcd8a918cb8e8bc5c1d4998e8bd9351","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/2064/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/focus-android/statuses/69d74437597ee3d1c8b934f02ff35055d30d8ec2","head":{"label":"siddware:1974-lost-search-engine-details","ref":"1974-lost-search-engine-details","sha":"69d74437597ee3d1c8b934f02ff35055d30d8ec2","user":{"login":"siddware","id":34205549,"avatar_url":"https://avatars3.githubusercontent.com/u/34205549?v=4","gravatar_id":"","url":"https://api.github.com/users/siddware","html_url":"https://github.com/siddware","followers_url":"https://api.github.com/users/siddware/followers","following_url":"https://api.github.com/users/siddware/following{/other_user}","gists_url":"https://api.github.com/users/siddware/gists{/gist_id}","starred_url":"https://api.github.com/users/siddware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddware/subscriptions","organizations_url":"https://api.github.com/users/siddware/orgs","repos_url":"https://api.github.com/users/siddware/repos","events_url":"https://api.github.com/users/siddware/events{/privacy}","received_events_url":"https://api.github.com/users/siddware/received_events","type":"User","site_admin":false},"repo":{"id":113309706,"name":"focus-android","full_name":"siddware/focus-android","owner":{"login":"siddware","id":34205549,"avatar_url":"https://avatars3.githubusercontent.com/u/34205549?v=4","gravatar_id":"","url":"https://api.github.com/users/siddware","html_url":"https://github.com/siddware","followers_url":"https://api.github.com/users/siddware/followers","following_url":"https://api.github.com/users/siddware/following{/other_user}","gists_url":"https://api.github.com/users/siddware/gists{/gist_id}","starred_url":"https://api.github.com/users/siddware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddware/subscriptions","organizations_url":"https://api.github.com/users/siddware/orgs","repos_url":"https://api.github.com/users/siddware/repos","events_url":"https://api.github.com/users/siddware/events{/privacy}","received_events_url":"https://api.github.com/users/siddware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/siddware/focus-android","description":"Firefox Focus: The privacy browser - Browse like no one’s watching.","fork":true,"url":"https://api.github.com/repos/siddware/focus-android","forks_url":"https://api.github.com/repos/siddware/focus-android/forks","keys_url":"https://api.github.com/repos/siddware/focus-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/siddware/focus-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/siddware/focus-android/teams","hooks_url":"https://api.github.com/repos/siddware/focus-android/hooks","issue_events_url":"https://api.github.com/repos/siddware/focus-android/issues/events{/number}","events_url":"https://api.github.com/repos/siddware/focus-android/events","assignees_url":"https://api.github.com/repos/siddware/focus-android/assignees{/user}","branches_url":"https://api.github.com/repos/siddware/focus-android/branches{/branch}","tags_url":"https://api.github.com/repos/siddware/focus-android/tags","blobs_url":"https://api.github.com/repos/siddware/focus-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/siddware/focus-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/siddware/focus-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/siddware/focus-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/siddware/focus-android/statuses/{sha}","languages_url":"https://api.github.com/repos/siddware/focus-android/languages","stargazers_url":"https://api.github.com/repos/siddware/focus-android/stargazers","contributors_url":"https://api.github.com/repos/siddware/focus-android/contributors","subscribers_url":"https://api.github.com/repos/siddware/focus-android/subscribers","subscription_url":"https://api.github.com/repos/siddware/focus-android/subscription","commits_url":"https://api.github.com/repos/siddware/focus-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/siddware/focus-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/siddware/focus-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/siddware/focus-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/siddware/focus-android/contents/{+path}","compare_url":"https://api.github.com/repos/siddware/focus-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/siddware/focus-android/merges","archive_url":"https://api.github.com/repos/siddware/focus-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/siddware/focus-android/downloads","issues_url":"https://api.github.com/repos/siddware/focus-android/issues{/number}","pulls_url":"https://api.github.com/repos/siddware/focus-android/pulls{/number}","milestones_url":"https://api.github.com/repos/siddware/focus-android/milestones{/number}","notifications_url":"https://api.github.com/repos/siddware/focus-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/siddware/focus-android/labels{/name}","releases_url":"https://api.github.com/repos/siddware/focus-android/releases{/id}","deployments_url":"https://api.github.com/repos/siddware/focus-android/deployments","created_at":"2017-12-06T11:49:21Z","updated_at":"2017-12-06T11:49:24Z","pushed_at":"2018-02-04T19:54:34Z","git_url":"git://github.com/siddware/focus-android.git","ssh_url":"git@github.com:siddware/focus-android.git","clone_url":"https://github.com/siddware/focus-android.git","svn_url":"https://github.com/siddware/focus-android","homepage":"","size":94952,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-mobile:master","ref":"master","sha":"3940af76dc6565ce680cae83c89d745598350024","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":75990052,"name":"focus-android","full_name":"mozilla-mobile/focus-android","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/focus-android","description":"Firefox Focus: The privacy browser - Browse like no one’s watching.","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/focus-android","forks_url":"https://api.github.com/repos/mozilla-mobile/focus-android/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/focus-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/focus-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/focus-android/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/focus-android/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/focus-android/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/focus-android/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/focus-android/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/focus-android/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/focus-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/focus-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/focus-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/focus-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/focus-android/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/focus-android/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/focus-android/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/focus-android/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/focus-android/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/focus-android/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/focus-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/focus-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/focus-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/focus-android/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/focus-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/focus-android/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/focus-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/focus-android/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/focus-android/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/focus-android/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/focus-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/focus-android/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/focus-android/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/focus-android/deployments","created_at":"2016-12-09T01:31:11Z","updated_at":"2018-02-06T10:13:02Z","pushed_at":"2018-02-06T15:28:12Z","git_url":"git://github.com/mozilla-mobile/focus-android.git","ssh_url":"git@github.com:mozilla-mobile/focus-android.git","clone_url":"https://github.com/mozilla-mobile/focus-android.git","svn_url":"https://github.com/mozilla-mobile/focus-android","homepage":"","size":122689,"stargazers_count":619,"watchers_count":619,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":219,"mirror_url":null,"archived":false,"open_issues_count":402,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":219,"open_issues":402,"watchers":619,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064"},"html":{"href":"https://github.com/mozilla-mobile/focus-android/pull/2064"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/2064"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/issues/2064/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/pulls/2064/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/focus-android/statuses/69d74437597ee3d1c8b934f02ff35055d30d8ec2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"noloman"}}