New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Landscape support initial fixes #1106
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1106 +/- ##
============================================
- Coverage 14.86% 14.81% -0.06%
- Complexity 938 939 +1
============================================
Files 489 489
Lines 20121 20208 +87
Branches 2269 2283 +14
============================================
+ Hits 2991 2993 +2
- Misses 16786 16872 +86
+ Partials 344 343 -1
Continue to review full report at Codecov.
|
cc8c82f
to
180bf81
Compare
Initial observations:
|
Got this exception once while I had stopped bulk download on subsection level in landscape mode and tried to switch to portrait mode:
|
Bulk Download case: App gets stuck on Large Download dialog i.e. dialog shown while downloading greater than 1 GB videos. Refer to the video: |
Bulk Download case: Switch's state isn't maintained after orientation change happens. Refer to the video: |
The following exception is reported in the logcat when the share dialog on course outline is open and orientation is changed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 1st pass.
@@ -49,6 +49,7 @@ | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/courses_profile_icon_left_margin" | |||
android:layout_marginStart="@dimen/courses_profile_icon_left_margin" | |||
android:imeOptions="flagNoFullscreen" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work properly, there are 2 cases when it doesn't:
1 - Whenever search icon is tapped while in landscape mode.
2 - Whenever the tab is switched to Discovery tab the 2nd time and thereafter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Case # 2 can be solved by adding this flagNoExtractUi
attribute along with flagNoFullscreen
.
@@ -42,11 +42,18 @@ | |||
<!-- | |||
When SearchView is added through menu.xml file and it expands upon tapping the icon, | |||
the toolbar's overall layout gets messed up. | |||
|
|||
Collapsible action items have a max width that they can occupy (something like 400dp). | |||
It will not always fill the entire width of the toolbar so to expand it to the full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not always fill the entire width of the toolbar, so, to expand it to the full available width we are giving it a really high maxWidth.
OpenEdXMobile/res/values/dimens.xml
Outdated
@@ -1,6 +1,10 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
|
|||
<!-- A really high maxWidth to expand views to full available width, it will usually required | |||
where we need to override the default hard coded maxWidth of the views. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!-- A really high maxWidth to expand views to full available width, it will usually be required
where we need to override the default hardcoded maxWidth of the views. -->
|
||
|
||
public ChapterAdapter(Context context, String courseId, IEdxEnvironment environment) { | ||
super(context, R.layout.row_chapter_list, environment); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused resources in this class need to be deleted too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the deletion commit, it requires to clean all the chapter related code in a separate story because there are handsome database calls related to it and there is a column in DB table as well with name "chatper_name".
bbb3a8d
to
a43819e
Compare
It has been done to avoid possible issues for example: #1106 (comment)
This doesn't specifically come in the scope of landscape support story, so i have created the following story for that |
This issue is very well explained on this post: It happens because on orientation change, activity instantly destroyed while popmenu takes time to dismiss because of exit animation. There is no quik fix of that neither we can override the exit transition of popup menus. Relevant story: https://openedx.atlassian.net/browse/LEARNER-4203 |
@miankhalid its ready for second pass, just a following issue fix is pending (have to figure out in pair programming, why the mentioned solution is not working now).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with the 2nd pass.
This is still pending:
This doesn't work properly, there are 2 cases when it doesn't:
1 - Whenever search icon is tapped while in landscape mode.
2 - Whenever the tab is switched to Discovery tab the 2nd time and thereafter.
@@ -56,6 +56,12 @@ public void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setHasOptionsMenu(true); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line.
remainingVideos.clear(); | ||
updateUI(); | ||
} | ||
|
||
private class CourseVideosStatus { | ||
private boolean allVideosDownloading(@NonNull CourseVideosStatus videosStatus) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this function moved out of the CourseVideosStatus
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the inner class implementing Parcelable must be static and this function was the hinderence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should've been refactored/fixed instead of moving it out of the class which doesn't make any sense.
Here's how it can still be in the CourseVideosStatus
class and work as expected:
boolean allVideosDownloading(SwitchState switchState) {
return (total == downloaded + downloading) || (switchState != null && switchState == SwitchState.USER_TURNED_ON);
}
@@ -43,6 +42,7 @@ | |||
public static final String EXTRA_COURSE_ID = "course_id"; | |||
public static final String EXTRA_COURSE_DETAIL = "course_detail"; | |||
public static final String EXTRA_COURSE_DATA = "course_data"; | |||
public static final String EXTRA_COURSE_VIDEOS_STATUS = "extra_course_videos_status"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should be made into a class level constant in BulkDownloadFragment
since its being used only there.
@miankhalid PR addressed, please review it. Regarding following comment, marco has approved the optimal changes i have within this PR for now.
Regarding opening of keyboard in full screen mode, i have asked the question on stackoverflow over there: https://stackoverflow.com/questions/51270244/disabling-the-fullscreen-editing-view-on-pressing-searchview-icon-in-landscape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following things are pending:
allVideosDownloading
function needs to be refactored inside CourseVideosState class.- Keyboard popping up in the landscape mode issue should be converted to a ticket.
- Keyboard popping up in the portrait mode decision is pending on Marco's approval.
@miankhalid done with the change requests.
Story created: https://openedx.atlassian.net/browse/LEARNER-5781
addressed. |
> LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: #1106 (comment)
a85b8d5
to
0a76f51
Compare
> LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: #1106 (comment)
> LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: openedx#1106 (comment)
> LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: openedx#1106 (comment)
* Upgrade Crashlytics * Apply activity visiblity check before showing dialog - LEARNER-1988 * Improvements to delete videos by long press - LEARNER-1288 - SnackBar's visibility time increased to 5000 milliseconds - Allow whole row long tap if its downloaded i.e. make downloaded state icon non-clickable - Fix crash where SnackBar's dismiss callback gets called twice when it is about to dismiss and the activity finishes * Change Content-Type of create comment/response API - LEARNER-2734 - Changes done to support the Content-Type: application/json instead of the previously used application/x-www-form-urlencoded type * keep some files common for iOS and android on transifex - Files are profiles.json, languages.json and countries.json - Removed whats_new.json from transifex * Add support of Spanish language - LEARNER-2360 * Show correct error message while adding something on closed posts * Show due date in course subsection - LEARNER-301 * Push files to transifex only from master * Push files to transifex only from master * Revert changes of PR openedx#998 which was just for testing purpose * Fix transcript's first line skipping - LEARNER-242 We are using subtitleConvert library's FormatSRT class to parse our transcript files which by default expects the index of captions within the file to be starting from 1. Our transcript files start their captions' index from 0, so, the library has been modified and the jar updated to support our captions properly. Previously due to the index issue, we were skipping the first caption in our transcript files. Library's GitHub link: https://github.com/JDaren/subtitleConverter * Apply correct attribute for missing translations - LEARNER-2492 The attribute tools:ignore="MissingTranslation" should be used for any new string that we add in our project from now on. * Change videos download icon - LEARNER-2524 - Download icon change from fa_arrow_down to fa_download. * Fixed time zone calculation and ui ripples produced in due date story - LEARNER-301 - Revert the 2 character format time zone calculation (which are actually the country codes), we are only using android api time zone functions for now. - Fixed course outline list items varied height issue. - Fixed wrong boldness on video duration text issue. * Analytics for Course Videos feature - LEARNER-2156 * Combine 'My Courses' and 'Find Courses' experiences - LEARNER-2036 * Introduce Account area in app - LEARNER-2037 - Account button introduced on the Navigation drawer. - My Settings, Submit Feedback and Logout buttons removed from Navigation drawer and moved to Account screen. - App version text also move to Account screen. - User email removed from drawer. * Fix issue of wrong full screen spinner appear on video downloading - LEARNER-2636 * Show video size and duration on a video component. - LEARNER-2417 * Update README of project - Changed format from .rst to .md - Add FAQ item to help the community about issues faced while upgrading to Android Studio v2.3.x - Add Flavors section - Add Build Variants section - Add FAQ item for Firebase related issue - Formatting changes * Show proper error messages in Find Courses - LEARNER-2578 - Modern design for showing error text with image on top. - Different logic for showing error on pre-Marshmallow devices by first hitting the url before loading it in WebView. - Errors are now shown based on the scenario when and where the issue occurs. - Standardize loading of find courses links on all platforms whether it be all courses, course search or a course's detail. - Refactored WebView URL loading into WebViewUtil class. * Consistent design on web-based Find Courses detail screen * Makes a single What's New messages file for both platforms - LEARNER-2526 * Release 2.11.0 - Add WhatsNew assets - Add WhatsNew json files (English and Spanish) - Spanish strings for initial Spanish support in app * Discussion Threads screen fixes - LEARNER-1446 - Fix crash in case of offline inline discussion view - New error design with text and icon * Branch Integration - LEARNER-2627 - Feature flag for Branch integration is placed under Fabric -> Kits in the Config.java file - Deep links work even when Branch is disabled in config (the only catch is that the hits are never reported on the dashboard) - Course Dashboard Test fix * Remove duration from downloading screen if have zero value - LEARNER-2767 - Rewrite xml of row_download_list for code optimization. - Add ripple on on cancel download button and increase its touch area. * Implement Answers and add Enrollment & Registration success events - LEARNER-2629 - Also implement Enrollment and Registration success events for Firebase and Segement * Remove My Videos feature code - LEARNER-2740 - Delete related unused resources - Remove MY_VIDEOS feature flag - Remove restore-cache task related to My Videos feature - Remove MyVideos test suite * Enable Course Videos feature by-default * Ignore NewApi lint check (temporarily) due to Travis issue More details about the Travis issue can be found here: travis-ci/travis-ci#8676 * Update course dates web fragment link. - LEARNER-2923 - Refactor some code * Implement Tab Layout for Course Dashboard - LEARNER-2938 * Course Card and Last Accesed bar on Outline view - LEARNER-2939 - Move all course outline logic from activities to fragment. Logic from CourseBaseActivity and CourseVideoListActivity has been refactored to the new fragment - The fragment is now responsible for making the the required server calls, handle offline and other errors and manage downloads - Course card and Last accessed view now appear within the listView - Last accessed view is added to the listView asynchronously when the server call finishes fetching the last accessed course item - Last accessed view has been modified to meet the new design's style - Course item's left padding matched with that of Last accessed item - Hide listview initially. It'll become visible once server call is done and we have course data ready to populate it - Add NewCourseOutlineFragment for Course and Videos under their tabs * Block drawer from opening on tabs dashboard screen * Change a11y content for Search edit field in Discover Courses screen - LEARNER-2917 * Remove autofocus from email field on Registration screen - LEARNER-2913 - Also includes a workaround to fix auto announcement of Spinner's accessibility text * Fix hang issue - LEARNER-3176 - SplashActivity wasn't getting finished when branch was disabled causing this issue. * Fix the typo exist in signing method names. - LEARNER-3396 * Customize a11y behavior for registration screen fields. - LEARNER-2916 - Fix number of issue to make a rational a11y behavior. * LEARNER-3077 - Support HLS videos to stream with .m3u8 extension. - Introduced the supported video formats. Only supported video formats will be stream in app media player now. * Offline Mode for Tabs based Course Dashboard - LEARNER-3060 - Ensure no 2 error types appear on screen at a time - SnackBar showing/hiding will be controlled by the activity now, since, its the activity's layout that contains the CoordinatorLayout in which the SnackBar will appear. - Fragments inside ViewPager will tell the Activity about showing/hiding SnackBar based on the visibility of FullScreenError within them. - Whenever Reload button will be pressed (whether its pressed on SnackBar or FullScreenError) it'll fire a RefreshEvent on EventBus, so that every fragment can update/reload itself. - Offline Mode for AdditionalResources and CourseDates Fragment - On AdditionalResourcesFragment we only need to show SnackBar in case of no connectivity. - Hide Snackbar on tab switch when network is available * Rename ‘Additional Resources’ title to ‘Resources’ - LEARNER-3580 - Also refactored class names and xml file. * Fix wrong a11y focus issue existed on registration screen. - LEARNER-3656 * Dont consider cancelling of a server call as error - LEARNER-3657 - Upon cancelling a server call, our error handling callback's onError function was getting called, which shouldn't be considered as error. - Also hiding the error explicitly when data is loaded on screen. * Release 2.12 - Update whatsnew.json - Update whatsnew screens - Update strings * Show Done button when only 1 whats new item is available - LEARNER-3620 * Update ‘Important Dates’ tab title to ‘Dates’ - LEARNER-3333 * Add certificate in Course Outline tab of Course tabs dashboard. (openedx#1046) * Add certificate in Course Outline tab of Course tabs dashboard. - LEARNER-3104 * Implement a new design of a toolbar having profile icon as home button. - LEARNER-3582 - Put hamburger menu desing behind TAB_LAYOUTS_ENABLED feature flag. - Implement the custom toolbar layout to show profile icon as a home button. * Revert "Update ‘Important Dates’ tab title to ‘Dates’" This reverts commit d7b7f9f. * Tabs based design for app's main dashboard - LEARNER-3251 - Fragment based implementation for Course Discovery - Offline support for Courses and Discover fragments - Base Fragment defined for Tabs based implmentations to extend. Giving the inheriting classes easy to use APIs for making use of Tabs with ViewPager - Move offline support logic to base activity/fragment * Fix for ViewPager's onPageSelected not getting called for its 1st item ViewPager doesn't call the onPageSelected for its first item, so we have to explicitly call it ourselves. Solution Inspiration: https://stackoverflow.com/a/16074152/1402616 * Connect implementation of LEARNER-3582 with LEARNER-3251 JIRA link of both tickets: - https://openedx.atlassian.net/browse/LEARNER-3582 - https://openedx.atlassian.net/browse/LEARNER-3251 * Removed some un-necessary checks. - LEARNER-3251 * Fix buildSrc issue whose link is given below - openedx#1047 * Fix 'onRevisit' callback calls wrongly issue. - LEARNER-3953 * Migrate to ToolBar in whole app - LEARNER-3750 - Remove usages of ActionBar throughout the app - AppBarLayout made parent of the toolbar layouts in app - Themes and layouts updated for all the legacy activities that were using ActionBar Note: activity_login.xml is still a mess and needs some major cleanup, some of the bigger issues have been resolved but total overhaul is out of scope for this commit. * Migrate ActionBar styles to ToolBar * Set proper font of all TextViews on ToolBar Calligraphy currently doesn't support setting of font through styles for ToolBar due to which this hack is necessary. Link to the relevant issue on the Calligraphy's GitHub page: chrisjenx/Calligraphy#295 * Apply ToolBar properly in BaseSingleFragmentActivity - Instead of placing the toolbar instead a FrameLayout ToolBar needs to replace the placeholder view, so that the AppBarLayout can show the bottom shadow properly. - Bonus: File Autoformatted * New color scheme for ToolBar and all the related elements on it * Move Tabs to ToolBar from Fragment's layout * Fix ToolBar shadow appearing after a delay This fix is for a known issue in the support library due to which the shadow beneath the AppBarLayout appears after a noticeable delay. Link to issue: https://issuetracker.google.com/issues/37106543 Fix inspiration: https://stackoverflow.com/a/41137710/1402616 * Toolbar shadow for pre-lollipop devices AppBarLayout on pre-lollipop devices doesn't add a shadow at its bottom. To work around it, a shadow view explicitly needs to be added. * Simplify and improve course outline data caching - LEARNER-3841 - Here are the details of new caching mechanism: Whenever course outline screen is loaded: 1) Firstly check if course data is available in app session cache (Lru Cache), if its available just load the data. 2) If course data is not available in app session check if its available in retrofit cache, if its available load the data. Moreover if course outline is loading first time in the app session then send the server call in background for updated data. Course outline will be refreshed on server response. 3) In step 2 if course data is not available in retrofit cache then send the server call to get the course data first time in app. 4) In new tabs dashboard, 1 hour retrofit caching time should be removed, so that retrofit bring the latest response from server whenever required. * Ensure proper look and feel on all screens - New design for User Profile screen - Remove extra LinearLayout from all CoordinatorLayouts - Standardize toolbar colors - Fix hamburger color - Add fitsSystemWindows to CoordinatorLayout - ColorStateList application fix for Tabs - Revert activity_course_base to use LinearLayout as parent under CoordinatorLayout * Added all missing ids of views for logistration screen. * Focus search bar on selection of discovery tab. - LEARNER-4169 * Check validity of context before loading the image via Glide lib. - LEARNER-3186 * Find downloadable url from ‘all_sources’ if video pipeline is disabled. - LEARNER-3743 - In case 'USING_VIDEO_PIPELINE' feature flag is disabled and we have HLS encoding format in a video, we are trying to find some downloadable url from 'all_sources' urls coming from server. * Fixed a bug. Reverting the check to make it working properly. - It was created in following PR openedx@795556b#r27504119 * Move initialization of SearchView from onAttach to onActivityCreated - LEARNER-4206 Having the initialization code in onAttach causes the app to crash whenever the fragment/activity has to be recreated for whatever reason. onActivityCreated is also the logically correct home for this code as activity creating is the prerequisite for the SearchView to be initialized. * Deprecate old dashboards and hamburger menu design related code. - LEARNER-4141 - Deprecate MyCoursesListActivity, CourseDashboardActivity, NavigationFragment and other classes. * Handle the case where server sends non-parsable course content - LEARNER-3785 Previously our app used to crash whenever the server returned a course whose content was invalid and logged an exception on Crashlytics. This commit gracefully handles that exception by wrapping it into CourseContentNotValidException and showing an error on screen while sending the exception to Crashlytics in the background too. CourseContentNotValidException is either thrown when raised during a test's execution or caught and re-thrown again as a RuntimeException as it was being done for some other cases as well. * Change Courses and Course Discovery screen course card layout. - LEARNER-3741 * Fix app crash occurs during navigation in course outline screen. - LEARNER-4629 - This issue was produced in the following PR. Now its not necessary that we always get course data in server call, so its better to set courseComponentId in loadData function. https://github.com/edx/edx-app-android/pull/1055/commits * Add Bulk Videos Download feature - LEARNER-2940 - Add ConstraintLayout and use it for building the bulk videos download view Database is queried for all the data that it has for a course's videos and then they are cross matched with the videos data of the same course that we get from the server call to decide: 1 - How many videos have been downloaded 2 - How many videos can be downloaded 3 - How many videos are currently being downloaded Two lists are kept for the implementation to work. - 1st list keeps all the remaining videos that can be downloaded. - 2nd list keeps all the videos that have been downloaded or the ones that are currently being downloaded. When the switch is ON, all videos in the 1st list are downloaded. When the switch is OFF, all videos in the 2nd list are deleted (if downloaded) and stopped (if downloading) after a delay. When all videos are in progress, tapping the bulk download view takes user to the Download Videos screen. - Helpers for getting progress of downloading videos in a course Functions added in various classes to obtain the videos that are being downloaded by the DownloadManager, filtering them on the basis of Course ID. If Course ID isn't provided, unfiltered videos being downloaded are returned. - Only show download progress menu item on Course Tab - Hide bulk download view if a course has NO downloadable videos - Add accessibility to bulk download view - Put all business logic in AsyncTask for DownloadCompleteReceiver The code inside receiver was previously being run on the main thread and didn't involve any interaction with the UI elements causing lag within the app. Introduce fragment for Bulk Download View - BulkDownloadFragment is responsible for handling all the various states of the bulk download view. - Switch's state is saved in the prefs based on the course that its being set in. - Whenever a video is deleted, the bulk download switch's state for the course whose video is deleted gets reset in the prefs. - Disable BulkDownload while videos are being queued by DownloadManager to download - Update the download state of ListView rows whenever a download is initiated even on a different tab - Hide progress on BulkDownload view whenever a video is deleted or an ongoing video download is stopped - Spinner on Downloads screen before ListView is populated - Update switch's state when it is OFF and all videos are individually enqueued for downloading - Commulative progress instead of the one download manager gives us - Standardize the download limit check to DownloadUtil class's isDownloadSizeWithinLimit function Accessibility Improvements - "Bulk videos download switch" added as a prefix before adding title, subtitle etc to switch's contentDescription. - While the switch is in ON state the whole view is now tappable to during accessibility to open the Downloads screen. Matching string as iOS in this case has also been added. * Travis: Add local androidSDK license files and copy them to Travis Reference: wolkenschieber/License@3d3206c * Release 2.13 - Update whatsnew.json - Update whatsnew screens - Update string resources * Update Spanish version of whats_new file Add missing translations for message keys for all items in v2.13 * LEARNER-4802 - Add debug logs to figure out the crash. * Remove unused code related to Explore Subjects - LEARNER-4469 - Unused code deleted and tests updated * Fix Course Tabs Dashboard reloading on low memory - LEARNER-4807 LruCache is purged when the system is low on memory due to which our NewCourseOutlineFragment was throwing NPEs whenever it queried the LruCache. * Add new app landing screen - Update DiscoveryLaunchActivity and its structure - Add missing IDs - Update screenshots for screenshot test cases - Add analytics * Update HTML Component icon - LEARNER-4789 * Trigger Answer events for Login and Course Share - LEARNER-4262 * Update crashlytics - LEARNER-1305 * Fix course URL being sent to share event Previously we were sending the whole share text in the url param for course share event. * Update share event for Answers * Add LMS user ID to traits sent to Segment.io - LEARNER-4443 * Use HLS video encoding and give it a top priority to stream. - LEARNER-4757 - Add another column of ‘URL_HLS’ in database to persist HLS video encoding in database. - We need to persist 'URL_HLS' in database because in 'CourseUnitVideoFragment' class we use 'DownloadEntry' db model object to choose prefered video at run time, ref: https://github.com/edx/edx-app-android/blob/4e78d15cf31cd85dad2a85d78bd71bb3611ba7d3/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseUnitVideoFragment.java#L273. * Add Bulk Download feature on Subsection view - LEARNER-4160 - BulkDownloadFragment now accepts list of videos that need to be downloaded in bulk and maintains its state accordingly. - Database layer has been updated to give back videos based on video ids provided to it. - Fixed a case when 0.00 B was being shown on Bulk Download view. - Use downloadable VideoInfo whenever a download needs to happen - Handle the case when all the videos have been downloaded or they are currently downloading without the use of Bulk Download switch. * Stop showing download progress while deletion Fixes LEARNER-4840. If the progress isn't stopped while the deletion is happening, we are essentially querying the database for data that might or might not be there causing exceptions to be thrown. * Handle download cancelling from outside the app A download can be cancelled from outside the apps as well using the Downloads app or the cancel button on the download notification. This commit handles the case when download is cancelled from outside the app. * Switch from PULSE animation to SPIN Animation.PULSE causes lag when a spinner stays on screen for a while. Will be fixed in LEARNER-5053. * Make HttpStatusException more meaningful - LEARNER-2489 By the calling the Exception class's constructor requiring a String arg with the response provided to HttpStatusException, we are essentially making the exception object more meaningful with the Http call's response details. * Add new license implementation on Login and Register screen - LEARNER-4959 - Add new license docs in HTML form Parts of the license text have been made clickable by applying UrlSpans on them. The URI attached to each link within the text is a custom made URI that is broadcasted upon a link's click and received by one of our activity (WebViewActivity) using an intent filter defined in AndroidManifest.xml for the said activity. * Remove all the deprecated code of old dashboard and hamburger menu. - LEARNER-4143 - Rename NewCourseOutlineAdapter class to CourseOutlineAdapter. - Rename NewCourseOutlineFragment class to CourseOutlineFragment. - Rename NewCourseOutlineActivity class to CourseOutlineActivity. * Release 2.14 - LEARNER-4781 - Update whats_new json files - Update whats new images - Update english and spanish strings * Testing Transifex update through Travis * Revert "Test Transifex update through Travis" * Remove problematic check which was causing the issues. - LEARNER-4793 - Due to the this check there were possible scenarios in which user tried to start bulk download but it didn’t get actually started due to no internet connectivity or other reason and we were still firing the ‘BulkVideosDownloadStartedEvent’ event. * Update Travis config to only run builds on all Pull Requests - LEARNER-4338 - Reverts: LEARNER-2367 Due to this change Travis will checkout current master and put all of the changes done in a PR on top of it through a commit and run tests on it. This will be valid for all PRs i.e. internal and externals (OSPRs). * Remove the ignoring of NewApi Lint check - LEARNER-3115 Reverts the commit (63d9e07) from PR openedx#1019 Issue's link on Travis Github: travis-ci/travis-ci#8676 * Fix NewApi usage * Improve parsing of Registration form API - LEARNER-5403 - Add PLAINTEXT field type - Remove CHECKBOX field type and all related classes that were being used to make agreement text/checkbox items on the Register screen. * Add TLS 1.2 protocol support for Pre-Lollipop Devices - LEARNER-5406 TLS 1.2 isn't by default enabled on Pre-Lollipop Devices which is the protocol that our backend has updated to. This commit enables it so that server-client communication is seamless. Inspiration for this fix: square/okhttp#2372 (comment) * Force Glide to use our version of OkHttp which now supports TLS 1.2 Without this forcing, Glide isn't able to load images on Pre-Lollipop devices. * Decode HTML entities in Video Transcripts - LEARNER-5190 Handles the case when multiple HTML entities translate to one character e.g. {@literal &#39;} which is essentially an apostrophe that should normally occur as {@literal '}. * Force Glide to use our version of OkHttp only on Pre-lollipop devices * Bump minSdkVersion from 14 to 16 Due to TLS 1.2 implementation on the backend we need to stop supporting Android versions lesser than 16, as the support for TLS 1.1 and 1.2 came in JellyBean i.e. API Level 16. Ref: https://developer.android.com/reference/javax/net/ssl/SSLSocket * Update Enroll Now Button Message for Professional Education Courses - LEARNER-4643 * Server redirection exists in the web page urls will be render within app. - LEARNER-4643 - In some of the cases server redirects the page url to other hosting url, we have screens in our app for e.g. Course Detail, Announcements where we are only allowing initial page urls to render and redirects all other urls to external browser. In these specific cases our intial page url is rendering in external browser due to server side redirection. This issue has been fixed in this commit. If it will be the redirection from serverside within initial page url loading, it will render within app. * Ignore the logging of branch sdk errors occurred due to no internet. - LEARNER-4839 * Add Subjects Discovery on Discovery Screen - LEARNER-4284 - Feature is kept behind the feature flag: SUBJECT_DISOVERY_ENABLED - Browse by subject screen supports both orientations - Refactored onPagePartiallyLoaded() to onPageLoadProgressChanged(WebView view, int progress) which will now allow us to decide based on how much a page has been loaded inside a WebView. * All previous usages of onPagePartiallyLoaded() have been updated. - Standardise URL building and add tests * Add initial support of landscape mode in some screens. > LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: openedx#1106 (comment) * Add Find a Course footer properly - LEARNER-5785 Find a Course is now added even when user doesn't have enrolled in any course. * Add initial support of landscape mode in some screens. > LEARNER-3384 > Enable landscape mode in MainDashboardActivity, CourseTabsDashboardActivity, CourseOutlineActivity, CourseHandoutActivity, CourseAnnouncementActivity and DownloadListActivity screens. > Done following fixes after enabling landscape mode on these screens - Stretch tabs of tabs layout to max of its available width. - Don’t show ‘Find a course’ card on ‘Courses’ fragment until the screen loads. - Fixed spiral progress bar stops redrawing itself issue. The issue occurs in spiral progress bar for video downloading, it works fine when in one orientation (either portrait or landscape) but when you change the orientation it stops redrawing itself. - Update progress wheel library, update is avoiding use of handler. - Avoid the recreation of DownloadSizeExceed Dialog on orientation change. As a quick fix, avoid the recreation of dialog on orientation change to avoid problematic scenarios For e.g. cancel button stops working on orientation change, we have to fix it properly which is explained and planned to implement in story LEARNER-2177. - Removing all downloads from native download manager initially. It has been done to avoid possible issues for example: openedx#1106 (comment) * Update WhatsNew messages and images - LEARNER-5385 - strings.xml updated - WhatsNew images and json updated - Auto-format whats_new json files * Centrally align texts on WhatsNew screen * Add Find a Course footer properly - LEARNER-5785 Find a Course is now added even when user doesn't have enrolled in any course. * Remove unnecessary permission READ_PHONE_STATE - LEARNER-5919 Currently we are only using the TelephonyManager class's `getNetworkOperator` function which doesn't require the android.permission.READ_PHONE_STATE permission. Usage in code: org/edx/mobile/util/NetworkUtil.java:99 * Update gradle and some other libraries mentioned below - Updated gradle version to 4.4 - Updated android gradle pluggin version to 3.1.3 - Updated google services gradle Plugin to 4.0.1 - Shifted to AAPT2 (As android plugin 3.0.0 enables AAPT2 by default) - Updated build tools to 27.0.3 - Updated target sdk version to 27 - Updated compile sdk version to 27 - Updated android support libraries to 27.1.1 - Updated groovy to 2.4.12 - Updated play services to 15.0.1 - Updated firebase-core to 16.0.1 Ref doc: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration - LEARNER-5799 * Fixed errors that occurs due to enabling of AAPT2 tool. - Android plugin 3.0.0 enables AAPT2 by default. - Ref: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration * Fixed lint errors. * Disable RoboBlender to avoid annotation processor issues. * Add the constants.gradle file & move common gradle level constants to it * Fix status bar color issue after updating support library. * Update travis.yml file after updating build tools and target sdk version * [FIXME] Disable test cases run on travis for the time being. After shifting to AAPT2 build system, Robolectric library needs to be updated as well to support AAPT2 changes, which we shall cover in LEARNER-5469 story. So, for the success of travis builds and to make this PR mergeable into master, test cases have been disabled for the time being. This commit must be reverted in LEARNER-5469 story. * UserProfileActivity NullPointerException crash resolved on low memory user profile screen crash when relaunch * Improve Sign in flow, show proper error message in case of error below. - LEARNER-5672 - Proper error message will be shown now in sign in case when user try to login with the new Gmail/FB account which is not linked to any edX account. Server returns 400 error code in this case. * Camera and Read Storage Permissions Added - LEARNER-5917 - Sdk >= 22 andorid needs runtime permissions for using camera and accessing photos from gallery - Camera permission required for capturing image and use as profile picture - Read Storage Permission required for getting image and use as profile picture - Above sdk 24 android dont allow to share file to other apps so provider is required for sharing file uri, which has been added * Update Fabric suite - LEARNER-5682 - Branch version from 1.14.5 to 2.19.2 - Crashlytics version from 2.9.1 to 2.9.5 - Answers integration inside the Branch has also been removed cuz we already have that inside Crashlytics SDK * Delete legacy Branch integration code * Added support for push notifications in the release topic [LEARNER-5811] Adds in support for Push Notifications through FCM using a release topic. This topic will be used to send release updates to the application. * Updates for new version of Firebase and build.gradle upgrade * Write External Storage Permission Added - LEARNER-5920 - SDK >= 22 Andorid needs runtime permissions for downloading videos. - Write Storage Permission required for downloading and saving videos (single and bulk both). - Permission querying mechanism has been generalized and moved to BaseFragment class. - Check and Ask permissions implementation for editProfile Screen also change according to new implementation using BaseFragment - Removed the usage of the deprecated attribute DownloadManager.COLUMN_LOCAL_FILENAME in favor of DownloadManager.COLUMN_LOCAL_URI * Update Facebook SDK to 4.36.0 - LEARNER-5572 * UX improvement on discussion forum buttons This commit improves the buttons "report", "vote" and "like" to assume success and update as soon the user presses them. This is along current android best practices. * Country spinner scroll issue resolved - Issue resolved by removing 'popupTheme' in style.xml * Revert "[FIXME] Disable test cases run on travis for the time being." This reverts commit 86be4b5. * Done with the changes needed to upgrade Robolectric to version 3.8 - LEARNER-5469 * Fix injection issue on pre-lollipop devices * Bump minSdkVersion to KitKat (API Level 19)
Description
LEARNER-3384
Review the PR commit by commit.
Commits messages are self-explanatory.
Please refer to Jira story for more details.
Pending issue to look into again: