{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/42658490","id":42658490,"diff_hunk":"@@ -168,26 +171,25 @@ private void setAccount(@Nullable final Account account) {\n                 viewHolder.locationContainer.setVisibility(View.GONE);\n             } else {\n                 viewHolder.limitedView.setVisibility(View.GONE);\n-                if (account.getLanguageProficiencies().isEmpty()) {\n-                    viewHolder.languageContainer.setVisibility(View.GONE);\n-                } else {\n-                    viewHolder.languageContainer.setVisibility(View.VISIBLE);\n-                    viewHolder.languageText.setText(\n-                            new Locale.Builder()\n-                                    .setLanguage(account.getLanguageProficiencies().get(0).getCode())\n-                                    .build()\n-                                    .getDisplayName());\n+                viewHolder.languageContainer.setVisibility(View.GONE);\n+                if (!account.getLanguageProficiencies().isEmpty()) {\n+                    try {\n+                        viewHolder.languageText.setText(\n+                                LocaleUtils.getLanguageNameFromCode(account.getLanguageProficiencies().get(0).getCode()));\n+                        viewHolder.languageContainer.setVisibility(View.VISIBLE);\n+                    } catch (InvalidLocaleException e) {\n+                        logger.error(e, true);","path":"VideoLocker/src/main/java/org/edx/mobile/view/UserProfileFragment.java","position":49,"original_position":49,"commit_id":"87bc3c26b6507cda5ac1bef1d120ed545c8e5958","original_commit_id":"87bc3c26b6507cda5ac1bef1d120ed545c8e5958","user":{"login":"bguertin","id":1685613,"avatar_url":"https://avatars.githubusercontent.com/u/1685613?v=3","gravatar_id":"","url":"https://api.github.com/users/bguertin","html_url":"https://github.com/bguertin","followers_url":"https://api.github.com/users/bguertin/followers","following_url":"https://api.github.com/users/bguertin/following{/other_user}","gists_url":"https://api.github.com/users/bguertin/gists{/gist_id}","starred_url":"https://api.github.com/users/bguertin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bguertin/subscriptions","organizations_url":"https://api.github.com/users/bguertin/orgs","repos_url":"https://api.github.com/users/bguertin/repos","events_url":"https://api.github.com/users/bguertin/events{/privacy}","received_events_url":"https://api.github.com/users/bguertin/received_events","type":"User","site_admin":false},"body":"@1zaman Yup, that's exactly what happens. The view is set to GONE by default (line 174) and only set to VISIBLE if we successfully parse the language / country.","created_at":"2015-10-21T17:56:07Z","updated_at":"2015-10-21T17:56:07Z","html_url":"https://github.com/edx/edx-app-android/pull/395#discussion_r42658490","pull_request_url":"https://api.github.com/repos/edx/edx-app-android/pulls/395","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/42658490"},"html":{"href":"https://github.com/edx/edx-app-android/pull/395#discussion_r42658490"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/395"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/395","id":47938388,"html_url":"https://github.com/edx/edx-app-android/pull/395","diff_url":"https://github.com/edx/edx-app-android/pull/395.diff","patch_url":"https://github.com/edx/edx-app-android/pull/395.patch","issue_url":"https://api.github.com/repos/edx/edx-app-android/issues/395","number":395,"state":"closed","locked":false,"title":"Use `new Locale` directly instead of Locale.Builder","user":{"login":"bguertin","id":1685613,"avatar_url":"https://avatars.githubusercontent.com/u/1685613?v=3","gravatar_id":"","url":"https://api.github.com/users/bguertin","html_url":"https://github.com/bguertin","followers_url":"https://api.github.com/users/bguertin/followers","following_url":"https://api.github.com/users/bguertin/following{/other_user}","gists_url":"https://api.github.com/users/bguertin/gists{/gist_id}","starred_url":"https://api.github.com/users/bguertin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bguertin/subscriptions","organizations_url":"https://api.github.com/users/bguertin/orgs","repos_url":"https://api.github.com/users/bguertin/repos","events_url":"https://api.github.com/users/bguertin/events{/privacy}","received_events_url":"https://api.github.com/users/bguertin/received_events","type":"User","site_admin":false},"body":"Fixes force close on API < 21","created_at":"2015-10-16T17:35:32Z","updated_at":"2015-10-21T17:56:07Z","closed_at":"2015-10-19T16:41:44Z","merged_at":"2015-10-19T16:41:44Z","merge_commit_sha":"7056ad5453979295efe4e8492c87754bf867042a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-app-android/pulls/395/commits","review_comments_url":"https://api.github.com/repos/edx/edx-app-android/pulls/395/comments","review_comment_url":"https://api.github.com/repos/edx/edx-app-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-app-android/issues/395/comments","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/87bc3c26b6507cda5ac1bef1d120ed545c8e5958","head":{"label":"edx:remove_locale_builder","ref":"remove_locale_builder","sha":"87bc3c26b6507cda5ac1bef1d120ed545c8e5958","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251742,"name":"edx-app-android","full_name":"edx/edx-app-android","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-android","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-android","forks_url":"https://api.github.com/repos/edx/edx-app-android/forks","keys_url":"https://api.github.com/repos/edx/edx-app-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-android/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-android/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-android/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-android/events","assignees_url":"https://api.github.com/repos/edx/edx-app-android/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-android/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-android/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-android/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-android/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-android/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-android/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-android/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-android/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-android/merges","archive_url":"https://api.github.com/repos/edx/edx-app-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-android/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-android/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-android/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-android/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-android/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-android/releases{/id}","created_at":"2015-01-14T15:49:47Z","updated_at":"2015-10-14T11:38:41Z","pushed_at":"2015-10-21T17:50:57Z","git_url":"git://github.com/edx/edx-app-android.git","ssh_url":"git@github.com:edx/edx-app-android.git","clone_url":"https://github.com/edx/edx-app-android.git","svn_url":"https://github.com/edx/edx-app-android","homepage":null,"size":36859,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":10,"forks":52,"open_issues":10,"watchers":40,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"8329129beb98a309eea67d067d5f07e88b0291d1","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251742,"name":"edx-app-android","full_name":"edx/edx-app-android","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-android","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-android","forks_url":"https://api.github.com/repos/edx/edx-app-android/forks","keys_url":"https://api.github.com/repos/edx/edx-app-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-android/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-android/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-android/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-android/events","assignees_url":"https://api.github.com/repos/edx/edx-app-android/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-android/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-android/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-android/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-android/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-android/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-android/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-android/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-android/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-android/merges","archive_url":"https://api.github.com/repos/edx/edx-app-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-android/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-android/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-android/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-android/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-android/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-android/releases{/id}","created_at":"2015-01-14T15:49:47Z","updated_at":"2015-10-14T11:38:41Z","pushed_at":"2015-10-21T17:50:57Z","git_url":"git://github.com/edx/edx-app-android.git","ssh_url":"git@github.com:edx/edx-app-android.git","clone_url":"https://github.com/edx/edx-app-android.git","svn_url":"https://github.com/edx/edx-app-android","homepage":null,"size":36859,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":10,"forks":52,"open_issues":10,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/395"},"html":{"href":"https://github.com/edx/edx-app-android/pull/395"},"issue":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/395"},"comments":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/395/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/395/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/395/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-app-android/statuses/87bc3c26b6507cda5ac1bef1d120ed545c8e5958"}}}}