From 0ad178fddb9f05a12ea2085023e900c941eb25a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 15 Jul 2023 13:59:58 +0200 Subject: [PATCH] Rename JSON import constants to better reflect contents --- .../simplemobiletools/smsmessenger/activities/MainActivity.kt | 4 ++-- .../com/simplemobiletools/smsmessenger/helpers/Constants.kt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index 4298014e..6b87f3f9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -626,8 +626,8 @@ class MainActivity : SimpleActivity() { if (isQPlus()) { Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) - type = EXPORT_MIME_TYPE - putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(EXPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) + type = JSON_IMPORT_MIME_TYPE + putExtra(Intent.EXTRA_MIME_TYPES, arrayOf(JSON_IMPORT_MIME_TYPE, XML_IMPORT_MIME_TYPE)) try { startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt index 73f3d271..3f9cdf93 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -30,6 +30,7 @@ const val EXPORT_SMS = "export_sms" const val EXPORT_MMS = "export_mms" const val EXPORT_MIME_TYPE = "application/json" const val EXPORT_FILE_EXT = ".json" +const val JSON_IMPORT_MIME_TYPE = "application/json" const val XML_IMPORT_MIME_TYPE = "text/xml" const val IMPORT_SMS = "import_sms" const val IMPORT_MMS = "import_mms"