Commit ed5206e
committed
Refactor: Simplify MIME type handling in file explorer intent
This commit refactors the logic for setting MIME types in the `ACTION_OPEN_DOCUMENT` intent.
Previously, `Intent.ACTION_PICK` was used for specific image types. This has been removed in favor of consistently using `ACTION_OPEN_DOCUMENT`.
The handling of `EXTRA_MIME_TYPES` has been simplified:
- If `allowedExtensions` is provided, it's used as the value for `EXTRA_MIME_TYPES`.
- If `allowedExtensions` is null or empty, the primary `type` is used instead.1 parent 1a71293 commit ed5206e
File tree
1 file changed
+6
-5
lines changed- android/src/main/kotlin/com/mr/flutter/plugin/filepicker
1 file changed
+6
-5
lines changedLines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
0 commit comments