Skip to content

Commit

Permalink
fix(export-settings): export patches as json object
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHalko committed Oct 4, 2023
1 parent 4de274b commit f7c11d0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ class ExportSettingsActivity : Activity() {
val keystoreFile = File(getExternalFilesDir(null), "/revanced-manager.keystore")
if (keystoreFile.exists()) {
val keystoreBytes = keystoreFile.readBytes()
val keystoreBase64 =
Base64.encodeToString(keystoreBytes, Base64.DEFAULT).replace("\n", "")
val keystoreBase64 = Base64.encodeToString(keystoreBytes, Base64.DEFAULT)
json.put("keystore", keystoreBase64)
}

Expand All @@ -50,7 +49,7 @@ class ExportSettingsActivity : Activity() {
if (storedPatchesFile.exists()) {
val patchesBytes = storedPatchesFile.readBytes()
val patches = String(patchesBytes, Charsets.UTF_8)
json.put("patches", patches)
json.put("patches", JSONObject(patches))
}

// Send data back
Expand Down

0 comments on commit f7c11d0

Please sign in to comment.