2715 Commits

Author SHA1 Message Date
MohitMaliFtechiz
36803af9e2 Fixed Toast.getView() and Html.fromHtml() is deprecated
* We already handled the deprecation of `fromHtml`, we have a string's extension function to handle the this so we are now using that function.
* Since `Toast.getView()` is no longer supported after Android 11 (it always returns null on Android 11 and above devices), we no longer need to show the toast on the ZIM file that is clicked by the user for UI enhancement. Therefore, we have removed this function and are now using the context class extension function to display the toast message.
2023-06-28 18:29:02 +02:00
MohitMaliFtechiz
c18c9d7bba Fixes for some Lint options have been deprecated in newer Gradle versions.
We have introduced a new method, configureCommonExtension, in the AllProjectConfigurer.kt file since Lint is only available in CommonExtension. This allows us to configure Lint in one place for every module. Previously, we couldn't directly use Lint in the android-library project, but with this approach, we can now configure Lint for the android-library project as well.
2023-06-27 17:22:59 +02:00
MohitMaliFtechiz
17cbcf082d Refactor tab preview to use WebView instead of creating a bitmap
This commit introduces changes to the tab preview functionality in order to improve performance and memory usage. The previous approach of creating and storing bitmaps for tab previews has been replaced with a more efficient method utilizing WebView.

Changes Made:
- Modified the onBindViewHolder method in TabsAdapter to utilize WebView for tab previews.
- Removed the ImageUtils.kt class as it is no longer needed for bitmap storage.

Impact:
- Improved performance and reduced memory usage by directly displaying the WebView for tab previews.
- Eliminated the need for bitmap creation and storage, resulting in a more efficient implementation.
2023-06-27 17:22:10 +02:00
MohitMaliFtechiz
5256af49cd The item_progressbar.xml file has been renamed to item_custom_spinner.xml for better readability of the file 2023-06-23 07:02:17 +02:00
MohitMaliFtechiz
e081c856cd Fixes of ProgressDialog is deprecated 2023-06-23 07:02:17 +02:00
MohitMaliFtechiz
529bd1bde1 Refactored onBackPressed method with updated API
This commit introduces changes to refactor the usage of the deprecated `onBackPressed` method. The `onBackPressedDispatcher` API is now used instead.

Here's a summary of the changes made:
- Updated `AddNoteDialog.kt` and `NavigationHistoryDialog.kt` to handle the back button press on the navigation bar using the `onBackPressedDispatcher`.
- Modified `CoreMainActivity.kt` to handle all back button press operations in the application using the `onBackPressedDispatcher`.
- Updated `HelpFragment.kt` and `PageFragment.kt` to handle the back button press when the user clicks on the back arrow button in the toolbar.
- Refactored the `onBackPressed` method in `SaveLanguagesAndFinish.kt` to use the updated API, and updated the corresponding test cases accordingly.

These changes ensure that the `onBackPressed` functionality is updated to use the latest API, improving the readability and maintainability of the codebase.
2023-06-20 05:46:01 +02:00
MohitMaliFtechiz
7a5ff07180 Changed the requestPermission method of the fragment to utilize the new permission API registerForActivityResult.
* Updated the permission request for write storage permission, which is required for saving notes.
* Updated the permission request for read/write storage, necessary for scanning the file system in the LocalLibraryFragment.
* Fixed an issue where the permission layout would be displayed alongside the library list if the user swiped down to refresh.
* Suppress the deprecation warning for as `onRequestPermissionsResult` method is deprecated and we are using this for posting the result in all child fragments.
2023-06-20 01:38:45 +05:30
MohitMaliFtechiz
d8a323ddb1 Fixed ZimManageViewModelTest failure 2023-06-19 11:53:25 +05:30
MohitMaliFtechiz
9b1186d555 Refactored deprecated methods of ConnectivityManager class.
This commit refactors the deprecated methods of the ConnectivityManager class to ensure compatibility with different Android versions. The changes include:
* Introducing a new CompatV23 class to handle the deprecation of NetworkInfo and utilize the new NetworkCapabilities APIs available from Android 23 onwards.
* Retaining the existing methods for Android versions below 23 to maintain backward compatibility.
* Updating the test cases to cover both the new and old APIs.

These updates address the deprecation warnings and ensure that the code functions correctly on different Android versions.
2023-06-19 11:53:03 +05:30
MohitMaliFtechiz
9e79f11253 Refactored deprecated ConnectivityManager's method in NetworkUtils class 2023-06-19 11:35:36 +05:30
MohitMaliFtechiz
d68365b14f Fixed NotificationCompat.Builder(context) is deprecated 2023-06-16 21:42:48 +02:00
MohitMaliFtechiz
04dbbfd48e Removed deprecated requireFragmentManager() method 2023-06-16 13:48:19 +02:00
MohitMaliFtechiz
7bf7b2d5a7 Fixed local is deprecated 2023-06-14 13:50:12 +02:00
Shashank
a6d9251c1d minor fixes 2023-06-13 18:58:43 +05:30
Shashank
1163ad0a46 fixed-bottom-view-lost-issue 2023-06-13 18:58:43 +05:30
translatewiki.net
0b944184c7 Localisation updates from https://translatewiki.net. 2023-06-13 15:24:31 +02:00
MohitMaliFtechiz
f45816565e Fixed setting android:extractNativeLibs=false in manifest file is deprecated 2023-06-13 13:11:55 +02:00
MohitMaliFtechiz
cae2c2c5fe Fixed default constructor for Handler is deprecated 2023-06-13 13:10:55 +02:00
MohitMaliFtechiz
75f19cdfca Fixed observe extension method, which is deprecated in newer kotlin version 2023-06-13 01:56:30 +02:00
MohitMaliFtechiz
515f1e9230 Refactored setActivityForResult method for selecting SD card folder
We have used deprecated method for selecting folder for SD card in OnlineLibraryFragment.kt, CorePrefsFragment.kt, now we are using `registerForActivityResult` method instead of deprecated method in both places.
2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
421cc7d22d Fixed deprecated startActivityForResult method in LocalLibraryFragment for selecting zim file from storage 2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
b8dec4932e Fixed deprecated startActivityForResult method for enableLocationServices 2023-06-12 18:08:20 +02:00
MohitMaliFtechiz
554d6ac987 Fixed deprecated screenshot class 2023-06-08 15:47:13 +02:00
MohitMaliFtechiz
dc494f5bd3 Removed deprecated ActivityTestRule and InstrumentationRegistry from NetworkTest class 2023-06-08 12:59:04 +02:00
Emmanuel Engelhart
a2d4b1f55c
Bump-up version to 3.7.1 2023-06-05 21:55:16 +02:00
Gouri Panda
50d0941fc3 Set playstore track from alpha to internal 2023-06-02 13:13:27 +02:00
MohitMaliFtechiz
ff96685f56 Fixed fullscreen feature is broken in custom app 2023-05-31 18:42:37 +03:00
MohitMaliFtechiz
8b629b6b91 Fixed strict mode policy violation while deleting files in library screen 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
3d9bb3b47a Fixed strict mode violation while opening book from library screen 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
17c5d8a3d0 Fixed Strict mode policy on settings fragment 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
0a16f177a2 Fixed strict mode policy while changing tabs (Reader to Library, library to reader by clicking bottom navigation buttons) it also fixed the red effects while clicking on navigation items e.g bookmarks, history, notes, wifi hostspot, help 2023-05-26 17:23:24 +03:00
MohitMaliFtechiz
0ac73a9245 Fixed application crash on android 21
* FileObserver(File(path), Int) constructor is supported starting from Android 24. In versions prior to Android 24, this new constructor is not supported by the Android OS.
2023-05-26 17:20:11 +03:00
MohitMaliFtechiz
662f79b1d6 Fixed deprecated constructor of FileObserver 2023-05-26 17:20:11 +03:00
MohitMaliFtechiz
c2b7076363 Removed QUERY_ALL_PACKAGES permission 2023-05-26 16:25:51 +03:00
MohitMaliFtechiz
d84cf37314 Fixed deprecated resources.getColor(Int) method 2023-05-26 16:25:20 +03:00
MohitMaliFtechiz
16b1ddfbce Fixed online content(Zim files) are removed if there is no internet connection 2023-05-26 10:38:43 +03:00
Gouri Panda
9b1894d825 Removed package permission from core to app package 2023-05-25 23:43:30 +05:30
Shashank
3020ed0008 Fixed CodeFactor Issues 2023-05-24 12:45:41 +05:30
Shashank
bc98a335b6 fixes codefactor issues 2023-05-24 12:45:41 +05:30
translatewiki.net
f542b2bf25 Localisation updates from https://translatewiki.net. 2023-05-19 14:28:42 +02:00
MohitMaliFtechiz
f6c00a8eba Update version number for 3.7.0 release 2023-05-12 12:30:05 +05:30
MohitMaliFtechiz
7e350e0975 Added restoreState in navgraph to restore the previous state 2023-05-08 12:48:39 +05:30
MohitMaliFtechiz
9321a8cb7d Fixes of unable to navigate between the fragments 2023-05-07 14:23:34 +02:00
MohitMaliFtechiz
2e0b314d75 Fixed KiwixSplashActivityTest (Wanted to match 1 intent. Actually matched 0 intents) error. Added some more system dialog messages, if they are visible then it will close those dialogs. Added some delay before opening the navigation drawer. 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
e8b55ce000 Fixed DownloadTest on android 13 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
810df2ba13 Fixed (Method cannot be called on the main application thread) for BaristaSleepInteractions.sleep() method in KiwixSplashActivityTest 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
2338212b2c Closed system ui not responding dialog if visible 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
bcd85d91ba Increased timeout for waiting views for android 13 emulator 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
f5665b6fc6 Fixed (Failed to instantiate test runner class) on android 13 emulator 2023-05-04 12:09:40 +02:00
MohitMaliFtechiz
8ec917a7cd Re-enabled all test cases for android 13 2023-05-04 12:09:40 +02:00