mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 20:57:25 +01:00
Use MediaStore.VOLUME_EXTERNAL_PRIMARY when downloading media.
This commit is contained in:
parent
200f5839ff
commit
e2e7a8cdcd
@ -263,7 +263,7 @@ public class DownloadMediaService extends Service {
|
||||
contentValues.put(MediaStore.MediaColumns.RELATIVE_PATH, destinationFileUriString);
|
||||
contentValues.put(mediaType == EXTRA_MEDIA_TYPE_VIDEO ? MediaStore.Video.Media.IS_PENDING : MediaStore.Images.Media.IS_PENDING, 1);
|
||||
|
||||
final Uri contentUri = mediaType == EXTRA_MEDIA_TYPE_VIDEO ? MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL) : MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL);
|
||||
final Uri contentUri = mediaType == EXTRA_MEDIA_TYPE_VIDEO ? MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) : MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY);
|
||||
Uri uri = contentResolver.insert(contentUri, contentValues);
|
||||
|
||||
if (uri == null) {
|
||||
|
@ -25,7 +25,6 @@ import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Process;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
@ -417,7 +416,7 @@ public class DownloadRedditVideoService extends Service {
|
||||
Uri uri = null;
|
||||
|
||||
try {
|
||||
final Uri contentUri = MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL);
|
||||
final Uri contentUri = MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY);
|
||||
uri = contentResolver.insert(contentUri, contentValues);
|
||||
|
||||
if (uri == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user