From 6ea3e4ebd779594b45ad8f51cc40761bb6d89030 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 5 Aug 2021 22:05:31 -0700 Subject: [PATCH] Convert the views and data classes to Kotlin. https://redmine.stoutner.com/issues/744 --- app/build.gradle | 8 +- app/src/main/assets/de/about_changelog.html | 4 +- app/src/main/assets/en/about_changelog.html | 4 +- app/src/main/assets/es/about_changelog.html | 4 +- app/src/main/assets/fr/about_changelog.html | 42 +- app/src/main/assets/fr/about_licenses.html | 4 +- app/src/main/assets/it/about_changelog.html | 4 +- .../main/assets/pt-rBR/about_changelog.html | 4 +- app/src/main/assets/ru/about_changelog.html | 4 +- app/src/main/assets/tr/about_changelog.html | 4 +- .../activities/MainWebViewActivity.java | 162 ++- .../adapters/HistoryArrayAdapter.java | 4 +- .../adapters/PinnedMismatchPagerAdapter.kt | 4 +- .../asynctasks/GetHostIpAddresses.java | 2 +- .../asynctasks/PrepareSaveDialog.java | 4 +- .../History.java => dataclasses/History.kt} | 18 +- .../PendingDialog.kt} | 18 +- .../dialogs/HttpAuthenticationDialog.kt | 34 +- .../dialogs/PinnedMismatchDialog.kt | 6 +- .../dialogs/UrlHistoryDialog.kt | 4 +- .../dialogs/ViewSslCertificateDialog.kt | 53 +- .../helpers/CheckPinnedMismatchHelper.java | 4 +- ...nearLayout.java => CheckedLinearLayout.kt} | 90 +- .../views/NestedScrollWebView.java | 975 ------------------ .../views/NestedScrollWebView.kt | 536 ++++++++++ ...wipeViewPager.java => NoSwipeViewPager.kt} | 48 +- .../views/WrapVerticalContentViewPager.java | 62 -- .../views/WrapVerticalContentViewPager.kt | 56 + build.gradle | 4 +- .../metadata/android/fr-FR/changelogs/55.txt | 22 +- .../metadata/android/fr-FR/changelogs/56.txt | 10 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 32 files changed, 832 insertions(+), 1368 deletions(-) rename app/src/main/java/com/stoutner/privacybrowser/{definitions/History.java => dataclasses/History.kt} (67%) rename app/src/main/java/com/stoutner/privacybrowser/{definitions/PendingDialog.java => dataclasses/PendingDialog.kt} (63%) rename app/src/main/java/com/stoutner/privacybrowser/views/{CheckedLinearLayout.java => CheckedLinearLayout.kt} (50%) delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java create mode 100644 app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.kt rename app/src/main/java/com/stoutner/privacybrowser/views/{NoSwipeViewPager.java => NoSwipeViewPager.kt} (50%) delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/views/WrapVerticalContentViewPager.java create mode 100644 app/src/main/java/com/stoutner/privacybrowser/views/WrapVerticalContentViewPager.kt diff --git a/app/build.gradle b/app/build.gradle index 035f2fcc..b75f2115 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -72,10 +72,10 @@ dependencies { // Include the following AndroidX libraries. implementation 'androidx.arch.core:core-common:2.1.0' implementation 'androidx.arch.core:core-runtime:2.1.0' - implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' - implementation 'androidx.core:core-ktx:1.5.0' + implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.drawerlayout:drawerlayout:1.1.1' implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' @@ -83,10 +83,10 @@ dependencies { implementation 'androidx.webkit:webkit:1.4.0' // Include the Kotlin standard libraries. This should be the same version number listed in project build.gradle. - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21' // Include the Google material library. - implementation 'com.google.android.material:material:1.3.0' + implementation 'com.google.android.material:material:1.4.0' // Only compile AdMob ads for the free flavor. freeImplementation 'com.google.android.gms:play-services-ads:20.2.0' diff --git a/app/src/main/assets/de/about_changelog.html b/app/src/main/assets/de/about_changelog.html index df9d6a0f..2e0e9983 100644 --- a/app/src/main/assets/de/about_changelog.html +++ b/app/src/main/assets/de/about_changelog.html @@ -33,8 +33,8 @@ -

3.8.1 (version code 56)

-

29. Juni 2021 - Mindest-API 19, Ziel-API 30

+

3.8.1 (version code 56)

+

29. Juni 2021 - Mindest-API 19, Ziel-API 30