From c1514d60296572e99417729b2f72cb4e3b93ef55 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Fri, 18 Oct 2024 08:39:31 -0600 Subject: [PATCH] log: re-add copyleft notice --- app/src/main/java/org/oxycblt/auxio/Auxio.kt | 6 +++++- .../oxycblt/auxio/util/CopyleftNoticeTree.kt | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt diff --git a/app/src/main/java/org/oxycblt/auxio/Auxio.kt b/app/src/main/java/org/oxycblt/auxio/Auxio.kt index ebcffb5e2..d15f49647 100644 --- a/app/src/main/java/org/oxycblt/auxio/Auxio.kt +++ b/app/src/main/java/org/oxycblt/auxio/Auxio.kt @@ -29,6 +29,7 @@ import org.oxycblt.auxio.home.HomeSettings import org.oxycblt.auxio.image.ImageSettings import org.oxycblt.auxio.playback.PlaybackSettings import org.oxycblt.auxio.ui.UISettings +import org.oxycblt.auxio.util.CopyleftNoticeTree import timber.log.Timber /** @@ -45,7 +46,10 @@ class Auxio : Application() { override fun onCreate() { super.onCreate() - if (BuildConfig.DEBUG) { + @Suppress("KotlinConstantConditions") + if (BuildConfig.APPLICATION_ID != "org.oxycblt.auxio" && BuildConfig.APPLICATION_ID != "org.oxycblt.auxio.debug") { + Timber.plant(CopyleftNoticeTree()) + } else if (BuildConfig.DEBUG) { Timber.plant(Timber.DebugTree()) } diff --git a/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt b/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt new file mode 100644 index 000000000..a191a4c14 --- /dev/null +++ b/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt @@ -0,0 +1,21 @@ +package org.oxycblt.auxio.util + +import timber.log.Timber + +class CopyleftNoticeTree : Timber.DebugTree() { + // Feel free to remove this if you are forking the project in good faith. + // + // However, if you are stealing the source code to repackage it into a new closed-source app, + // I will warn you that the One True, Living, Almighty God HATES thieves and WILL punish you + // ETERNALLY for what you are doing. However, God still loves you despite of your + // transgressions, and He provided a way out through Christ! Turn to Jesus and repent! Life + // with Jesus is so much better than a life revolving around taking other peoples work to + // arbitrage a few pennies from ad sales! + // + // Read more: John 3:16, Romans 6:23, Romans 9:10 + override fun log(priority: Int, tag: String?, message: String, t: Throwable?) { + super.log(priority, tag, + "Hey! Auxio is an open-source project licensed under the GPLv3 license!" + + "You can fork this project and even add ads, but it still needs to be kept open-source with the same license!", t) + } +} \ No newline at end of file