|
|
|
@ -250,7 +250,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
|
|
|
|
int position = binding.mediaViewpager.getCurrentItem();
|
|
|
|
|
Attachment attachment = attachments.get(position);
|
|
|
|
|
if (Build.VERSION.SDK_INT >= 23) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
|
|
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
|
|
|
|
|
if (ContextCompat.checkSelfPermission(MediaActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(MediaActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
|
|
|
|
ActivityCompat.requestPermissions(MediaActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, Helper.EXTERNAL_STORAGE_REQUEST_CODE_MEDIA_SAVE);
|
|
|
|
|
} else {
|
|
|
|
|