Skip to content

Commit a6194ab

Browse files
committed
Upload file
1 parent 85306ee commit a6194ab

2 files changed

Lines changed: 416 additions & 18 deletions

File tree

common/src/main/java/com/omarea/common/shell/ShellTranslation.kt

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,6 @@ class ShellTranslation(val context: Context) {
6868
try {
6969
val intent = parseIntentArgs(subArgs)
7070

71-
if (intent.action == Intent.ACTION_SEND
72-
|| intent.action == Intent.ACTION_SEND_MULTIPLE
73-
) {
74-
val uri =
75-
intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)
76-
?: intent.data
77-
if (uri != null) {
78-
intent.putExtra(Intent.EXTRA_STREAM, uri)
79-
intent.clipData = ClipData.newRawUri(null, uri)
80-
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
81-
intent.data = null
82-
}
83-
}
84-
8571
when (cmd) {
8672
"start" -> {
8773
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
@@ -90,10 +76,7 @@ class ShellTranslation(val context: Context) {
9076
&& intent.component == null
9177
) {
9278
val chooser = Intent.createChooser(intent, null)
93-
chooser.addFlags(
94-
Intent.FLAG_ACTIVITY_NEW_TASK or
95-
Intent.FLAG_GRANT_READ_URI_PERMISSION
96-
)
79+
chooser.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
9780
ctx.startActivity(chooser)
9881
} else {
9982
ctx.startActivity(intent)

0 commit comments

Comments
 (0)