Aperture: De-hardcode text/plain mime type
Change-Id: Ic0f018cf0961037ffa2b7c6697c828ba583674a8
diff --git a/app/src/main/java/org/lineageos/aperture/QrImageAnalyzer.kt b/app/src/main/java/org/lineageos/aperture/QrImageAnalyzer.kt
index 0bc4e10..9c02537 100644
--- a/app/src/main/java/org/lineageos/aperture/QrImageAnalyzer.kt
+++ b/app/src/main/java/org/lineageos/aperture/QrImageAnalyzer.kt
@@ -9,6 +9,7 @@
import android.app.Activity
import android.app.KeyguardManager
import android.content.ClipData
+import android.content.ClipDescription
import android.content.ClipboardManager
import android.content.Intent
import android.text.SpannableString
@@ -170,7 +171,7 @@
Intent.createChooser(
Intent().apply {
action = Intent.ACTION_SEND
- type = "text/plain"
+ type = ClipDescription.MIMETYPE_TEXT_PLAIN
putExtra(
Intent.EXTRA_TEXT, when (this@QrImageAnalyzer.type) {
Type.TEXT -> result.text