{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/45878779","id":45878779,"diff_hunk":"@@ -699,31 +597,34 @@ public boolean showErrorMessage(String header, String message) {\n     }\n \n     public boolean showErrorMessage(String header, String message, boolean isPersistent) {\n-        try {\n-            LinearLayout error_layout = (LinearLayout) findViewById(R.id.error_layout);\n-            if(error_layout!=null){\n-                TextView errorHeader = (TextView) findViewById(R.id.error_header);\n-                TextView errorMessageView = (TextView) findViewById(R.id.error_message);\n-                if(header==null || header.isEmpty()){\n-                    errorHeader.setVisibility(View.GONE);\n-                }else{\n-                    errorHeader.setVisibility(View.VISIBLE);\n-                    errorHeader.setText(header);\n-                }\n-                if (message != null) {\n-                    errorMessageView.setText(message);\n-                }\n-                ViewAnimationUtil.showMessageBar(error_layout, isPersistent);\n-                return true;\n-            }else{\n-                logger.warn(\"Error Layout not available, so couldn't show flying message\");\n-                return false;\n-            }\n-        }catch(Exception e){\n-            logger.error(e);\n+        LinearLayout error_layout = (LinearLayout) findViewById(R.id.error_layout);\n+        if (error_layout == null) {\n+            logger.warn(\"Error Layout not available, so couldn't show flying message\");\n+            return false;\n+        }\n+        TextView errorHeader = (TextView) findViewById(R.id.error_header);\n+        TextView errorMessageView = (TextView) findViewById(R.id.error_message);\n+        if (header == null || header.isEmpty()) {\n+            errorHeader.setVisibility(View.GONE);\n+        } else {\n+            errorHeader.setVisibility(View.VISIBLE);\n+            errorHeader.setText(header);\n         }\n-        logger.warn(\"Error Layout not available, so couldn't show flying message\");\n-        return false;\n+        if (message != null) {\n+            errorMessageView.setText(message);\n+        }\n+        ViewAnimationUtil.showMessageBar(error_layout, isPersistent);\n+        return true;\n+    }\n+\n+    public boolean hideErrorMessage() {\n+        LinearLayout error_layout = (LinearLayout) findViewById(R.id.error_layout);","path":"VideoLocker/src/main/java/org/edx/mobile/base/BaseFragmentActivity.java","position":316,"original_position":316,"commit_id":"921b7b4116f43d0ae31a226b4a13687cd50ac0b4","original_commit_id":"921b7b4116f43d0ae31a226b4a13687cd50ac0b4","user":{"login":"miankhalid","id":1710804,"avatar_url":"https://avatars.githubusercontent.com/u/1710804?v=3","gravatar_id":"","url":"https://api.github.com/users/miankhalid","html_url":"https://github.com/miankhalid","followers_url":"https://api.github.com/users/miankhalid/followers","following_url":"https://api.github.com/users/miankhalid/following{/other_user}","gists_url":"https://api.github.com/users/miankhalid/gists{/gist_id}","starred_url":"https://api.github.com/users/miankhalid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miankhalid/subscriptions","organizations_url":"https://api.github.com/users/miankhalid/orgs","repos_url":"https://api.github.com/users/miankhalid/repos","events_url":"https://api.github.com/users/miankhalid/events{/privacy}","received_events_url":"https://api.github.com/users/miankhalid/received_events","type":"User","site_admin":false},"body":"xml style name again.","created_at":"2015-11-25T15:23:53Z","updated_at":"2015-11-25T15:23:53Z","html_url":"https://github.com/edx/edx-app-android/pull/446#discussion_r45878779","pull_request_url":"https://api.github.com/repos/edx/edx-app-android/pulls/446","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/45878779"},"html":{"href":"https://github.com/edx/edx-app-android/pull/446#discussion_r45878779"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/446","id":51603431,"html_url":"https://github.com/edx/edx-app-android/pull/446","diff_url":"https://github.com/edx/edx-app-android/pull/446.diff","patch_url":"https://github.com/edx/edx-app-android/pull/446.patch","issue_url":"https://api.github.com/repos/edx/edx-app-android/issues/446","number":446,"state":"open","locked":false,"title":"Restrict download menu item to relevant screens","user":{"login":"1zaman","id":4244109,"avatar_url":"https://avatars.githubusercontent.com/u/4244109?v=3","gravatar_id":"","url":"https://api.github.com/users/1zaman","html_url":"https://github.com/1zaman","followers_url":"https://api.github.com/users/1zaman/followers","following_url":"https://api.github.com/users/1zaman/following{/other_user}","gists_url":"https://api.github.com/users/1zaman/gists{/gist_id}","starred_url":"https://api.github.com/users/1zaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1zaman/subscriptions","organizations_url":"https://api.github.com/users/1zaman/orgs","repos_url":"https://api.github.com/users/1zaman/repos","events_url":"https://api.github.com/users/1zaman/events{/privacy}","received_events_url":"https://api.github.com/users/1zaman/received_events","type":"User","site_admin":false},"body":"All the various menu items were being defined in `BaseFragmentActivity`, and set invisible by default unless needed by some particular child. This commit unbundles the menus to their appropriate activities, and in the process restricts the download progress wheel menu item to it's appropriate scope. `BaseTabActivity` has been deleted because it caused inconvenience for the new inheritance scheme, and because it was an unneeded abstraction layer that didn't provide much benefit. The test suite hierarchy has been updated to reflect these changes. The base classes are also defined as abstract now.\r\n\r\nPreviously, the offline menu item display handling was left to each subclass implementation of `BaseFragmentActivity`. This repetitive logic has now been moved inside the base class. It also fixes an issue with the state not being updated on `Activity` resumption, by having `NetworkConnectivityReceiver` post sticky events. Also, the unsafe global static flag for indicating offline state is now removed, and references are replaced with queries to the `NetworkUtil#isConnected()` utility method.  The test suites are also updated to reflect this.\r\n\r\nhttps://openedx.atlassian.net/browse/MA-1665","created_at":"2015-11-24T00:56:13Z","updated_at":"2015-11-25T15:23:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69fc30c96670592329d99fb2740da1ce875bec1a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-app-android/pulls/446/commits","review_comments_url":"https://api.github.com/repos/edx/edx-app-android/pulls/446/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/446/comments","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/921b7b4116f43d0ae31a226b4a13687cd50ac0b4","head":{"label":"edx:restrict-download-menu","ref":"restrict-download-menu","sha":"921b7b4116f43d0ae31a226b4a13687cd50ac0b4","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-11-25T14:31:15Z","pushed_at":"2015-11-25T07:13:29Z","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":17248,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":3,"forks":61,"open_issues":3,"watchers":47,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"1d99b3af51daea39440b3357a14cd1a904b1998e","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-11-25T14:31:15Z","pushed_at":"2015-11-25T07:13:29Z","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":17248,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":3,"forks":61,"open_issues":3,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/446"},"html":{"href":"https://github.com/edx/edx-app-android/pull/446"},"issue":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/446"},"comments":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/446/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/446/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-app-android/statuses/921b7b4116f43d0ae31a226b4a13687cd50ac0b4"}}}}