Skip to content

Commit ff8e408

Browse files
lukstbitBrayanDSO
authored andcommitted
Remove IntentHandler.fileIntent
Was returning Activity.intent, the only alternative path was incorrect and would fail every time.
1 parent 86e1569 commit ff8e408

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

AnkiDroid/src/main/java/com/ichi2/anki/IntentHandler.kt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ class IntentHandler : AbstractIntentHandler() {
8888
when (launchType) {
8989
LaunchType.FILE_IMPORT ->
9090
runIfStoragePermissions {
91-
handleFileImport(fileIntent, reloadIntent, action)
91+
handleFileImport(intent, reloadIntent, action)
9292
finish()
9393
}
9494
LaunchType.TEXT_IMPORT ->
9595
runIfStoragePermissions {
96-
onSelectedCsvForImport(fileIntent)
96+
onSelectedCsvForImport(intent)
9797
finish()
9898
}
9999
LaunchType.IMAGE_IMPORT ->
@@ -128,15 +128,6 @@ class IntentHandler : AbstractIntentHandler() {
128128
)
129129
}
130130

131-
private val fileIntent: Intent
132-
get() {
133-
return if (intent.action == Intent.ACTION_SEND) {
134-
IntentCompat.getParcelableExtra(intent, Intent.EXTRA_STREAM, Intent::class.java) ?: intent
135-
} else {
136-
intent
137-
}
138-
}
139-
140131
/**
141132
* Execute the runnable if one of the two following conditions are satisfied:
142133
*

0 commit comments

Comments
 (0)