log: re-add copyleft notice

This commit is contained in:
Alexander Capehart 2024-10-18 08:39:31 -06:00
parent f7488f7b0d
commit c1514d6029
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 26 additions and 1 deletions

View file

@ -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())
}

View file

@ -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)
}
}