aboutsummaryrefslogtreecommitdiff
path: root/taler-kotlin-android/src/main/java/net/taler
diff options
context:
space:
mode:
Diffstat (limited to 'taler-kotlin-android/src/main/java/net/taler')
-rw-r--r--taler-kotlin-android/src/main/java/net/taler/common/ContractTerms.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/ContractTerms.kt b/taler-kotlin-android/src/main/java/net/taler/common/ContractTerms.kt
index d22eaa0..fb30692 100644
--- a/taler-kotlin-android/src/main/java/net/taler/common/ContractTerms.kt
+++ b/taler-kotlin-android/src/main/java/net/taler/common/ContractTerms.kt
@@ -16,7 +16,7 @@
package net.taler.common
-import androidx.annotation.RequiresApi
+import android.os.Build
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import net.taler.common.TalerUtils.getLocalizedString
@@ -48,8 +48,11 @@ abstract class Product {
abstract val location: String?
abstract val image: String?
val localizedDescription: String
- @RequiresApi(26)
- get() = getLocalizedString(descriptionI18n, description)
+ get() = if (Build.VERSION.SDK_INT >= 26) {
+ getLocalizedString(descriptionI18n, description)
+ } else {
+ description
+ }
}
@Serializable