* In this updated test case, we have addressed scenarios involving fast typing/deleting for search queries. Additionally, we implemented a test case where the user types with both short and long delays to ensure the following:
1. Short delay: Properly tests the cancellation of the previously searching task.
2. Long delay: Properly executes the search query letter by letter and ensures that there is no crash during the search.
* We are downloading the "stack exchange" ZIM file in our test case because this ZIM file yields many search results. Therefore, we download and perform all search operations on this file to simulate a real-world scenario, as our test ZIM file only contains three search results.
* The temporary ZIM file is deleted after performing the test to free up device storage.
* We implemented the `registerForActivityResult` method to handle notification permission, ensuring the hotspot starts seamlessly upon permission grant.
* Improved the permission-asking scenario. Before it ask once for notification permission and at the second time it shows the custom dialog that shows why we need this permission. But we can ask permission twice in our application so we have improved the asking of permission. If the user denies this permission then we show the custom dialog with message why we need this permission.
* Fixed the scenario where "Search kiwix" on any text does not show the expected result. Because we were passing the activity's intent instead of the actual intent we are getting to open the search, which leads to unexpected results. So now we are passing the actual intent to process the request that fixes this issue.
* Fixed one more scenario that occurred after placing this fix, where one more instance is created of the search screen because the activity has the intent with this type, and we are processing this intent in our `onViewCreated` for the scenario where our application launched(it is not running in the background). So when we close the search screen for then our `onViewCreated` method is called, and the activity has the intent so it creates one more search instance. So to fix this issue we are setting both intents as null after using them.
* Implemented `DocumentResolverWrapper` to facilitate mocking of values for `DocumentsContract` and `ContentResolver` methods, considering the inability to directly mock these methods in our test class.
* Included test cases covering various types of download URIs utilized in our `documentProviderContentQuery` method.
* Removed `getAssetFileDescriptorFromUri` method from FileUtils class as now it is unused.
* Removed the `getAssetFileDescriptorFromUri` method from FileUtils class as now it is unused.
* This test ensure that every uri will return the expected filePath. e.g. for download uri, older device compatibility, internal/external/USB-STICK uri, and if a invalid uri is given then it will return the null.
* On older devices, the download URI contains the full file path, causing the `documentProviderContentQuery` to fail in retrieving the path, leading to unexpected behavior (failure to open the ZIM file). The code has been improved to handle this scenario.
* In certain devices, the content URI prefix may differ, and using only `public_downloads` to obtain the actual path from the URI might not work if the device has a different URI prefix. The code has been enhanced to consider every possible content prefix when retrieving the actual path.
* Although the ZIM file is loaded, it does not appear in the reader because the "Open Library" button is already visible, and the content view is hidden at this point. To address this, we utilized our `reopenBook()` method when loading the ZIM file in reader, which manages the visibility of these views.
* Removed the `ACCESS_COARSE_LOCATION` from the application as it is unnecessary in project. Since this permission was used in the ZimHostFragment to host the ZIM files on server, but this permission is not required for this feature. Hence, we have removed this permission from project.
* Removed this permission from test cases.
* Removed the unused code from project related to this permission.
* Initially `ActionMode` is null when we are selecting ZIM files that's why it is not showing the selected book count in the ActionMode title. So to fix this we are setting the value when the actionMode is created.
* The encountered issue stemmed from setting the title directly on the toolbar. When navigating from the widget, the sequence involved opening the CoreReaderFragment followed by the immediate launch of the bookmark screen. During this rapid transition, the toolbar was continuously receiving updates, but these updates were not occurring in a synchronized manner. As a consequence, the title set on the toolbar was not being reflected accurately. To address this timing inconsistency, we opted to set the title on the actionBar instead of directly on the toolbar. By doing so, we are leveraging the actionBar as a higher-level component, which internally manages the presentation of the title on the toolbar. This approach ensures a more synchronized update of the title, particularly crucial in scenarios involving swift fragment transitions, such as opening the bookmark screen from the widget. Consequently, the change to actionBar.title provides a more reliable and synchronized mechanism for managing the title, resolving the issue encountered during rapid navigation.
* Removed the unnecessary `UnspecifiedImmutableFlag` lint suppression from CoreSearchWidget.
* Created an extension function to set up the SearchView. It now configures the toolTipText and width for the close icon of the SearchView.
* With this extension function, we have applied these properties to every SearchView used in the application, such as in LanguageFragment, SearchFragment, (History/Bookmark/Notes), and OnlineLibraryFragment.
* Increased the height and width of the views to align with Play Store policies, while ensuring no impact on the UI (as illustrated in the images below).
* Enhanced the contrast of the `mine_shaft_gray600` color to comply with Play Store's recommendation of `4.50.1`. This color is utilized in the book's itemView.
* Implemented the updated color in `IntroScreens` subHeading to resolve the low contrast issue.
* To rectify the contrast issue in the `LanguageFragment`, we increased the opacity of views to align with the recommended contrast.
* Added content descriptions for all views reported by the Play Store, including RecyclerView, dialog's itemView, pause/resume/stop buttons, and many more.
* Created an extension function to handle both setting the content description to address Play Store accessibility issues and displaying hints to the user using ToolTipText. This function consolidates these tasks in one place, eliminating code duplication.
* If the search/enter button is pressed and an article is found with the same query, it will directly open that article. Otherwise, it will proceed with the regular search operation as before.
* The crashes occurred in the Play Store version due to insufficient permissions for opening a file via `fileDescriptor`. To address this issue, we have modified the implementation to use the `file` instead of `fileDescriptor`. This adjustment ensures smooth operation in the non-Play Store version where we have permission to open a file via its path. In the Play Store version, it will display a proper error message to the user, preventing errors thrown by libkiwix.