From f7c11d07a89ed92c3d67e5213b1318f6dd2ac52d Mon Sep 17 00:00:00 2001 From: Benjamin Halko Date: Wed, 4 Oct 2023 11:33:13 -0700 Subject: [PATCH] fix(export-settings): export patches as json object --- .../app/revanced/manager/flutter/ExportSettingsActivity.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt index 8a397f8c..f5c7ad69 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt @@ -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) } @@ -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