Skip to content

Commit

Permalink
GrindrPlus: Dump hooks status
Browse files Browse the repository at this point in the history
Change-Id: Ib5cc3453fd4083fb7b101d660ba6c6c3bc9d8725
  • Loading branch information
R0rt1z2 committed Jan 2, 2025
1 parent b8e2c67 commit f1a3392
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ class SettingsFragment : Fragment() {

val info = getSystemInfo(context)
val logContent = logFile.readText()
val activeHooks = buildString {
Config.getHooksSettings().forEach { (hookName, pair) ->
appendLine("$hookName: ${if (pair.second) "Enabled" else "Disabled"}")
}
appendLine("========================================")
}

try {
val childUri = DocumentsContract.buildDocumentUriUsingTree(
Expand All @@ -289,6 +295,7 @@ class SettingsFragment : Fragment() {
if (newFileUri != null) {
context.contentResolver.openOutputStream(newFileUri)?.use { outputStream ->
outputStream.write(info.toByteArray())
outputStream.write(activeHooks.toByteArray())
outputStream.write(logContent.toByteArray())
outputStream.flush()
}
Expand Down

0 comments on commit f1a3392

Please sign in to comment.