6961 Commits

Author SHA1 Message Date
Kelson
0891512be7
Merge pull request #3433 from kiwix/Issue#3431
Fixes of KiwixWifiP2pBroadcastReceiver using some deprecated methods
2023-06-30 17:00:05 +02:00
MohitMaliFtechiz
ded00766ba Fixes of KiwixWifiP2pBroadcastReceiver using some deprecated methods 2023-06-30 16:59:42 +02:00
Kelson
99f6fdf474
Merge pull request #3420 from kiwix/Issue#3419
Fixes of PreferenceManager.getDefaultSharedPreferences() is deprecated
2023-06-30 16:59:06 +02:00
MohitMaliFtechiz
7d3756af4e Fixes of PreferenceManager.getDefaultSharedPreferences() is deprecated 2023-06-30 16:58:52 +02:00
Kelson
1fd71b51c9
Merge pull request #3436 from kiwix/Issue#3430
Fixed `Toast.getView()` and `Html.fromHtml()` is deprecated
2023-06-28 18:29:26 +02:00
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
Kelson
4723d869d2
Merge pull request #3437 from kiwix/Issue#3429
Fixed Auth.kt file using some deprecated method
2023-06-28 18:27:58 +02:00
MohitMaliFtechiz
aa86a88acb Fixed Auth.kt file using some deprecated method 2023-06-28 18:27:50 +02:00
Kelson
8c20953b5d
Merge pull request #3432 from kiwix/Issue#3428
Fixes of Fragment's onActivityCreated is deprecated
2023-06-27 17:24:26 +02:00
MohitMaliFtechiz
8791a824b6 Fixes of Fragment's onActivityCreated is deprecated 2023-06-27 17:23:57 +02:00
Kelson
a32eac811d
Merge pull request #3411 from kiwix/Issue#3351
Fixed some `lintOptions` are deprecated
2023-06-27 17:23:08 +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
Kelson
3049494e3d
Merge pull request #3416 from kiwix/Issue#3415
Fixes of `isDrawingCacheEnabled` and `drawingCache` of View class is deprecated
2023-06-27 17:22:19 +02:00
MohitMaliFtechiz
a3de2a25c7 Fixed extra space on the webview top if the webview is not atteched to any view 2023-06-27 17:22:10 +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
03ee22eb8a Removing the bitmap dependency to show the preview image 2023-06-27 17:22:10 +02:00
MohitMaliFtechiz
790de4e98e Fixes of if we open tab in background then a blank preview is showing 2023-06-27 17:22:10 +02:00
MohitMaliFtechiz
802f130bb8 Fixes of isDrawingCacheEnabled and drawingCache of View class is deprecated 2023-06-27 17:22:10 +02:00
Kelson
949fefdad9
Merge pull request #3423 from kiwix/Issue#3421
Fixes of windowManager.defaultDisplay.getMetrics(this) is deprecated
2023-06-27 17:21:15 +02:00
MohitMaliFtechiz
663afd3eeb Fixes of windowManager.defaultDisplay.getMetrics(this) is deprecated 2023-06-27 17:20:54 +02:00
Kelson
7c6f236f29
Merge pull request #3425 from kiwix/Issue#3424
Fixes of `KiwixWebView` using some deprecated methods
2023-06-27 17:19:56 +02:00
MohitMaliFtechiz
d2662c1aa4 Removed the deprecated FLAG_FULLSCREEN, FLAG_FORCE_NOT_FULLSCREEN.
We have removed the usage of deprecated flags FLAG_FULLSCREEN and FLAG_FORCE_NOT_FULLSCREEN. Instead, we are now using the updated API `WindowCompat.setDecorFitsSystemWindows` to handle fullscreen mode. This API automatically takes care of handling fullscreen behavior for both older and newer API levels.
2023-06-27 13:00:33 +05:30
MohitMaliFtechiz
35ff151e9b Updated SaveHandler to use Bundle.get() instead of deprecated msg.data['url']` 2023-06-27 13:00:33 +05:30
MohitMaliFtechiz
97a17eac3a Fixes of shouldOverrideUrlLoading and onReceivedError deprecated method of WebViewClient 2023-06-27 13:00:33 +05:30
MohitMaliFtechiz
bb0a49902e Fixed supportInvalidateOptionsMenu() deprecated method used in KiwixWebChromeClient 2023-06-27 13:00:33 +05:30
MohitMaliFtechiz
2ff07a7606 Fixes of WebView.HitTestResult.IMAGE_ANCHOR_TYPE is deprecated 2023-06-27 13:00:33 +05:30
Kelson
b00c3ecc9e
Merge pull request #3417 from kiwix/Issue#3336
Fixes of ProgressDialog is deprecated
2023-06-23 07:03:38 +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
543d336d4c Changes after review 2023-06-23 07:02:17 +02:00
MohitMaliFtechiz
e081c856cd Fixes of ProgressDialog is deprecated 2023-06-23 07:02:17 +02:00
Kelson
b2f97c2f6f
Merge pull request #3435 from CYBWEBALI/Issue#3434
Fixes of Snackbar buttons
2023-06-22 15:30:10 +02:00
CYBWEBALI
6f825f6277 Fixes of Snackbar buttons 2023-06-22 14:10:00 +05:30
Kelson
c29f40e128
Merge pull request #3427 from kiwix/Issue#3408
Fixes of Text to Speech init failed
2023-06-20 08:37:45 +02:00
MohitMaliFtechiz
8408cbc0e9 Enhanced the TTS feature.
Now, during the screen launch, we only set up the TTS service with the WebView. This is necessary to configure the JavaScript interface when the WebView is created. Otherwise, the JavaScript interface is not recognized. We initialize the TTS feature when the user tries to use it for better optimization.
2023-06-20 11:20:23 +05:30
MohitMaliFtechiz
3d837f1430 Fixes of Text to Speech init failed on android 13 2023-06-20 11:14:27 +05:30
Kelson
3420c0ea86
Merge pull request #3392 from kiwix/Issue#3349
Fixes of toggleSoftInput(Int, Int) method of InputMethodManager is deprecated
2023-06-20 05:47:12 +02:00
MohitMaliFtechiz
75c4e9278d Clearing focus from the Notes EditText to improve UI performance 2023-06-20 05:46:47 +02:00
MohitMaliFtechiz
f5ba5f4cf0 Fixes of toggleSoftInput(Int, Int) method of InputMethodManager is deprecated 2023-06-20 05:46:47 +02:00
Kelson
66a535111c
Merge pull request #3402 from kiwix/Issue#3400
Refactored onBackPressed method with updated API
2023-06-20 05:46:18 +02:00
MohitMaliFtechiz
a4625d0a23 Fixed test failure 2023-06-20 05:46:01 +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
Kelson
7c1978a4f6
Merge pull request #3404 from kiwix/Issue#3332
Fixes of requestPermission is deprecated
2023-06-20 05:45:17 +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
Kelson
63c3c2cd3e
Merge pull request #3403 from kiwix/Issue#3339
Fixes of deprecated methods of ConnectivityManager class
2023-06-19 08:51:21 +02:00
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
Kelson
715eff4cf1
Merge pull request #3354 from kiwix/Issue#3338
Fixed NotificationCompat.Builder(context) is deprecated
2023-06-16 21:43:03 +02:00
MohitMaliFtechiz
d68365b14f Fixed NotificationCompat.Builder(context) is deprecated 2023-06-16 21:42:48 +02:00
Kelson
26aa255f10
Merge pull request #3418 from kiwix/Issue#3405
Fixes of KiwixTextToSpeech uses some deprecated methods
2023-06-16 15:25:56 +02:00