* The error is not reproducible on my device and emulators too. But playStore reported this error so somehow this error is occurring. So to fix this issue we are now only performing the click action when the item is available in the DocumentSectionsList. This will avoid this type of error.
* This issue occurred because when the Close all tabs button was first clicked, it closed all tabs and stored them into the temp list, emptying the main list. However, if the button was immediately clicked again, it would attempt to copy the main list to the temp list, which was already empty. To address this issue, we have disabled the button after the first click to prevent such situations, as they can occur due to accidental clicks.
* Enhanced the behavior of the "Tabs closed" snackBar. Now, when the user clicks the "UNDO" button to restore a tab, we disable the snackBar's "UNDO" button to prevent subsequent clicks. This prevents the addition of multiple tabs if the "UNDO" button is clicked multiple times, as such restored tabs can lead to unexpected behavior.
* This error was occurring due to the user frequently clicking the close icon of the same tab, in this situation first click closes the tab, and the second immediate click again triggers the `closeTab` function but recyclerView does not have the valid view for this position because it is in removing process so this makes this view invalid and recyclerView returns the `-1` index for invalid views. So this was the reason for this issue, to address this issue we have added a check in our `closeTab` method if the incoming index is `-1` then it will not execute the further code.
* The error was occurring when launching the `KiwixMainActivity`. At this moment, `coreComponent` was in creation process so it is not initialized at this moment, and we are passing this component in our `KiwixMainActivity` through interface for injection of this activity. But we are not using `coreComponent` object in our `KiwixMainActivity` so passing it to the activity is unused because we are injecting this activity through `cachedComponent`, and this unused object causing the error. So we have removed this interface from our `BaseActivity` and directly injecting `KiwixMainActivity` in via `cachedComponent`.
* Changed the runner of CI to `ubuntu-latest` to boost the performance.
* Enabled the `fail-fast` option in CI, if any of jobs fail on any emulator then it will cancel the all jobs running on other emulators in the current process so that other PRs do not need to wait to finish this job. Also, this will reduce the running timing on CI since if a job fails on any emulator we need to fix that so running others jobs does not make sense. So we are canceling those jobs if any fail.
* Introducing caching for AVD to run test cases faster. It will reduce emulator boot time.
* Changed emulator configurations for the 'ubuntu-latest' runner. Removed the 'disk-size' option since it was throwing an error, causing the emulator not to boot. Also, reduced the SD card size to 2GB from 4GB.
* Reduced the SD card size to 2GB from 4GB.
* The allocated buffer size exceeded due to the retry policy of our test cases. When we retry a test, more objects are allocated to memory, causing this issue.
* When retrying a test case that failed initially, the "MANAGE_EXTERNAL_STORAGE" permission dialog appears on the window due to clearing the preferences in our test case. Therefore, we have removed that code from our test cases.
* Enhanced the test code to detect the views inside the dialogs since our test cases fail due to these dialog's views, which take a moment to appear on the window, making our test cases flaky on CI. This is also the reason for allocating more objects in memory when we retry the test case.
* Improved the `LocalFileTransferTest` as it sometimes fails on API level 33 due to the unavailability of WIFI. When WIFI is not available, the "Enable WIFI P2P" dialog appears on the window, causing our test case to fail. Subsequently, our RetryRule attempts to run this test case again, leading to the allocation of more objects in memory.
* Created a `testFlakyView` function this function is helpful in testing the flakyViews.
* Improved the `LanguageFragmentTest` slightly to wait for the searched language to appear at the top of the list.
* Running the CI on `aosp_atd` instead of `google_apis`.
* Closing the tabs if visible in `NavigationHistoryTest`, since sometimes tabs are visible in this test case, and the test case does not find the views and fails.
* Added wait before deleting the ZIM files in the local library screen since it takes a few seconds to load the ZIM files that are available in storage.
* We are clearing the data of application on 2nd and 3rd run, and the test cases are running normally so now we are clearing the application data on first run as well.
* Additionally, we've implemented drawer closure in `LanguageFragmentTest`, `LocalFileTransferTest`, and `NoteFragmentTest`. These tests sometimes encountered an open navigation drawer due to test failures or process crashes.
* Enhancements have been made to the `testShowCaseFeatureShowOnce` test case. It's now independent of other test cases, ensuring it remains unaffected in the event of a test process crash or failure.
* Refactored the error message to show the correct information to the developers, since our projects needs JDK11 to run so we have added this JDK version in error message. Also, corrected the gradle wrapper version in this message.
* Fixed a static toast which is showing when there is an error in restoring the tabs. We have moved this static error message to our string file so that it will be translated in every language and user will see the error message in their own language.
* Our project requires `Java 11` to run. Therefore, developers should set the `Gradle JDK` to `Java 11`. We have included this information in the `Build Instructions` section of the `README` file.
* The error toast message is no longer displayed if a URL fails to load. Instead, a debug error message is logged.
* Restricting the loading of external resources when rendering the pages.
* Removing the URL decoding to verify whether the query string is present in the URL or not. This is because we only need to append the query string for URLs that contain "?", not for those containing "%3F" (indicating direct paths to ZIM entries). We decoded the URL to evaluate this condition, which inadvertently added "?" at the end of the URL unnecessarily. This is redundant as we extract the query string only after "?", and encoded URLs do not include "?".
* Added more test cases for all the scenarios.