diff options
6 files changed, 8 insertions, 61 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle index 0f7dbac..f9397ba 100644 --- a/wallet/build.gradle +++ b/wallet/build.gradle @@ -109,11 +109,9 @@ android { lint { abortOnError true - ignore 'WrongConstant' ignoreWarnings false } namespace 'net.taler.wallet' - } dependencies { @@ -198,4 +196,4 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions { freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } -}
\ No newline at end of file +} diff --git a/wallet/lint.xml b/wallet/lint.xml index 9cf5309..d0c6806 100644 --- a/wallet/lint.xml +++ b/wallet/lint.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="MissingTranslation" severity="ignore" /> + <issue id="ExtraTranslation" severity="ignore" /> <issue id="all"> <ignore path="fastlane" /> </issue> diff --git a/wallet/src/androidTest/java/net/taler/wallet/ExampleInstrumentedTest.kt b/wallet/src/androidTest/java/net/taler/wallet/ExampleInstrumentedTest.kt deleted file mode 100644 index 5f0c423..0000000 --- a/wallet/src/androidTest/java/net/taler/wallet/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of GNU Taler - * (C) 2020 Taler Systems S.A. - * - * GNU Taler is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 3, or (at your option) any later version. - * - * GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -package net.taler.wallet - -import androidx.test.InstrumentationRegistry -import androidx.test.runner.AndroidJUnit4 -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getTargetContext() - assertEquals("net.taler.wallet", appContext.packageName) - } -} diff --git a/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt b/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt index 1a17d78..0435985 100644 --- a/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt @@ -19,7 +19,6 @@ package net.taler.wallet.settings import android.os.Bundle import android.view.View import android.widget.Toast -import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AlertDialog import androidx.fragment.app.activityViewModels import androidx.preference.Preference @@ -65,11 +64,6 @@ class SettingsFragment : PreferenceFragmentCompat() { ) } - val createDocumentActivity = - registerForActivityResult(ActivityResultContracts.CreateDocument()) { uri -> - - } - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.settings_main, rootKey) prefBackup = findPreference("pref_backup")!! @@ -123,7 +117,9 @@ class SettingsFragment : PreferenceFragmentCompat() { prefLogcat.setOnPreferenceClickListener { val toast = - Toast.makeText(requireActivity(), "Log export currently unavailable", Toast.LENGTH_LONG) + Toast.makeText(requireActivity(), + "Log export currently unavailable", + Toast.LENGTH_LONG) toast.show() // val myPid = android.os.Process.myPid() diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/manual/ManualWithdrawFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/manual/ManualWithdrawFragment.kt index fbdd828..eb1f133 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/manual/ManualWithdrawFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/manual/ManualWithdrawFragment.kt @@ -1,6 +1,6 @@ /* * This file is part of GNU Taler - * (C) 2020 Taler Systems S.A. + * (C) 2022 Taler Systems S.A. * * GNU Taler is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software diff --git a/wallet/src/test/java/net/taler/wallet/tip/TipResponsesTest.kt b/wallet/src/test/java/net/taler/wallet/tip/TipResponsesTest.kt index 9267f11..0300933 100644 --- a/wallet/src/test/java/net/taler/wallet/tip/TipResponsesTest.kt +++ b/wallet/src/test/java/net/taler/wallet/tip/TipResponsesTest.kt @@ -14,12 +14,10 @@ * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -package net.taler.wallet.payment +package net.taler.wallet.tip import kotlinx.serialization.json.Json import net.taler.common.Amount -import net.taler.wallet.tip.ConfirmTipResult -import net.taler.wallet.tip.PrepareTipResponse import org.junit.Test class TipResponsesTest { @@ -38,16 +36,9 @@ class TipResponsesTest { "result": {} } """.trimIndent() - val response = json.decodeFromString(ConfirmTipResult.serializer(), jsonStr) - response as ConfirmTipResult - assert(response != null) + json.decodeFromString(ConfirmTipResult.serializer(), jsonStr) } -/* - -*/ - - @Test fun testTipPossibleSerializer() { val jsonStr = """ @@ -69,7 +60,6 @@ class TipResponsesTest { assert(response.tipAmountEffective == Amount(currency = "ARS", fraction = 40000000, value = 1)) } - @Test fun testTipAcceptedSerializer() { val jsonStr = """ |