Add app source for F-Droid release (v1.0.6)

Adds the full Android source tree, Gradle wrapper, fastlane store
metadata and the fdroiddata build recipe so F-Droid can build from
source. README gains build instructions and an updated structure tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015g6ECVSKcBG8CJPrqC3G5o
This commit is contained in:
Claude
2026-10-06 18:23:12 +00:00
parent 7cd9875c87
commit 4c22ade5cd
89 changed files with 4816 additions and 1 deletions
@@ -0,0 +1,44 @@
package cc.skysparkle.sparkledns
import android.app.Application
import android.content.Context
import android.os.Build
import java.io.File
import java.io.PrintWriter
import java.io.StringWriter
class SparkleApp : Application() {
override fun onCreate() {
super.onCreate()
CrashLog.install(this)
Thread({ runCatching { Blocklist.reload(this) } }, "blocklist-load").start()
}
}
// Saves the last crash so it can be shown and copied on the next launch
object CrashLog {
private const val FILE_NAME = "last_crash.txt"
fun install(context: Context) {
val file = File(context.filesDir, FILE_NAME)
val previous = Thread.getDefaultUncaughtExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler { thread, error ->
runCatching {
val trace = StringWriter().also { error.printStackTrace(PrintWriter(it)) }.toString()
file.writeText(
"Thread: ${thread.name}\n" +
"Android ${Build.VERSION.RELEASE} (API ${Build.VERSION.SDK_INT}), " +
"${Build.MANUFACTURER} ${Build.MODEL}\n\n$trace"
)
}
previous?.uncaughtException(thread, error)
}
}
fun read(context: Context): String? =
File(context.filesDir, FILE_NAME).takeIf { it.exists() }?.readText()
fun clear(context: Context) {
File(context.filesDir, FILE_NAME).delete()
}
}