diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1415a4e61f..993f5b4784 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,6 +8,7 @@ commonsIo = "2.22.0" compose = "1.11.0" coreKtx = "1.18.0" desugar_jdk_libs = "2.1.5" +freeDroidWarn = "V1.11" gson = "2.13.2" guava = "33.6.0-android" handoff = "0.30.1" @@ -66,6 +67,7 @@ androidx-work-runtime = { module = "androidx.work:work-runtime", version.ref = " assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertjCore" } commons-io = { module = "commons-io:commons-io", version.ref = "commonsIo" } desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" } +freedroidwarn = { module = "com.github.woheller69:FreeDroidWarn", version.ref = "freeDroidWarn" } gson = { module = "com.google.code.gson:gson", version.ref = "gson" } guava = { module = "com.google.guava:guava", version.ref = "guava" } handoff = { module = "com.namehillsoftware:handoff", version.ref = "handoff" } diff --git a/projectBlueWater/build.gradle b/projectBlueWater/build.gradle index eb23a80e84..083bdbee20 100644 --- a/projectBlueWater/build.gradle +++ b/projectBlueWater/build.gradle @@ -203,6 +203,7 @@ dependencies { implementation libs.markdown.renderer implementation libs.markdown.renderer.m2 implementation libs.material + implementation libs.freedroidwarn implementation libs.guava implementation libs.joda.time implementation libs.commons.io diff --git a/projectBlueWater/src/main/java/com/lasthopesoftware/bluewater/client/EntryActivity.kt b/projectBlueWater/src/main/java/com/lasthopesoftware/bluewater/client/EntryActivity.kt index ef765a6a38..0006ab20a4 100644 --- a/projectBlueWater/src/main/java/com/lasthopesoftware/bluewater/client/EntryActivity.kt +++ b/projectBlueWater/src/main/java/com/lasthopesoftware/bluewater/client/EntryActivity.kt @@ -13,6 +13,7 @@ import androidx.core.app.ActivityCompat import androidx.core.view.WindowCompat import com.lasthopesoftware.bluewater.ActivityDependencies import com.lasthopesoftware.bluewater.ApplicationDependenciesContainer.applicationDependencies +import com.lasthopesoftware.bluewater.BuildConfig import com.lasthopesoftware.bluewater.TvApplicationDependencies import com.lasthopesoftware.bluewater.android.intents.safelyGetParcelableExtra import com.lasthopesoftware.bluewater.android.ui.ProjectBlueComposableApplication @@ -32,6 +33,7 @@ import com.lasthopesoftware.observables.subscribeAsState import com.lasthopesoftware.promises.extensions.registerResultActivityLauncher import com.namehillsoftware.handoff.Messenger import com.namehillsoftware.handoff.promises.Promise +import org.woheller69.freeDroidWarn.FreeDroidWarn import java.util.concurrent.ConcurrentHashMap private val logger by lazyLogger() @@ -92,6 +94,8 @@ class EntryActivity : isInLeanbackMode = intent.hasCategory(Intent.CATEGORY_LEANBACK_LAUNCHER) } + FreeDroidWarn.showWarningOnUpgrade(this, BuildConfig.VERSION_CODE) + applicationPermissions.promiseApplicationPermissionsRequest() WindowCompat.setDecorFitsSystemWindows(window, false)