1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-02-16 19:50:53 +01:00

Revert "fix crash when sharing file for android 11"

This reverts commit 205424735b929d9f9451171925db214013fc09e2.
This commit is contained in:
Tlaster 2021-03-22 10:54:48 +08:00
parent 94a73bf4b9
commit 6d4404bf57

View File

@ -624,12 +624,8 @@ class MediaViewerActivity : BaseActivity(), IMediaViewerActivity, MediaSwipeClos
intent.addFlags(Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) intent.addFlags(Intent.FLAG_GRANT_PREFIX_URI_PERMISSION)
} }
activity.processShareIntent(intent) activity.processShareIntent(intent)
val shareIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { activity.startActivityForResult(Intent.createChooser(intent, activity.getString(R.string.action_share)),
Intent.createChooser(intent, activity.getString(R.string.action_share)) REQUEST_SHARE_MEDIA)
} else {
Intent.createChooser(intent, activity.getString(R.string.action_share))
}
activity.startActivityForResult(shareIntent, REQUEST_SHARE_MEDIA)
} }
override fun onFileSaveFailed() { override fun onFileSaveFailed() {