From 8f45bf5bf15c81137a2fd88a1b2f66c839908f54 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 30 Jun 2022 23:29:09 +0200 Subject: [PATCH] adding a prepaid app variant --- app/build.gradle | 3 ++- .../keyboard/activities/MainActivity.kt | 9 +++++---- app/src/prepaid/res/values/bools.xml | 7 +++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 app/src/prepaid/res/values/bools.xml diff --git a/app/build.gradle b/app/build.gradle index a280f46..ed0055f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,6 +51,7 @@ android { productFlavors { core {} fdroid {} + prepaid {} } sourceSets { @@ -64,7 +65,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:faa6a972c2' + implementation 'com.github.SimpleMobileTools:Simple-Commons:7df0d79980' kapt 'androidx.room:room-compiler:2.4.2' implementation 'androidx.room:room-runtime:2.4.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt index a325ae8..dcaee84 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt @@ -69,10 +69,11 @@ class MainActivity : SimpleActivity() { private fun launchAbout() { val licenses = LICENSE_GSON - val faqItems = arrayListOf( - FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), - FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons), - ) + val faqItems = ArrayList() + if (!resources.getBoolean(R.bool.hide_google_relations)) { + faqItems.add(FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons)) + faqItems.add(FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons)) + } startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true) } diff --git a/app/src/prepaid/res/values/bools.xml b/app/src/prepaid/res/values/bools.xml new file mode 100644 index 0000000..88ed415 --- /dev/null +++ b/app/src/prepaid/res/values/bools.xml @@ -0,0 +1,7 @@ + + + false + true + true + true +