switch to safe-content-resolver-v21

This commit is contained in:
adbenitez
2024-08-08 22:30:22 +02:00
parent 6c4c241bb9
commit 839a9b38f4
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ android {
applicationId "com.b44t.messenger"
multiDexEnabled true
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 33
vectorDrawables.useSupportLibrary = true
@@ -191,7 +191,7 @@ dependencies {
// Replacement for ContentResolver
// that protects against the Surreptitious Sharing attack.
// <https://github.com/cketti/SafeContentResolver>
implementation 'de.cketti.safecontentresolver:safe-content-resolver-v14:1.0.0'
implementation 'de.cketti.safecontentresolver:safe-content-resolver-v21:1.0.0'
gplayImplementation('com.google.firebase:firebase-messaging:23.4.1') { // for PUSH notifications
exclude group: 'com.google.firebase', module: 'firebase-core'
@@ -17,7 +17,6 @@ import java.util.HashSet;
import static org.thoughtcrime.securesms.util.MediaUtil.getMimeType;
import de.cketti.safecontentresolver.SafeContentResolver;
import de.cketti.safecontentresolver.SafeContentResolverCompat;
public class ResolveMediaTask extends AsyncTask<Uri, Void, Uri> {
@@ -50,7 +49,7 @@ public class ResolveMediaTask extends AsyncTask<Uri, Void, Uri> {
String fileName = null;
Long fileSize = null;
SafeContentResolver safeContentResolver = SafeContentResolverCompat.newInstance(contextRef.get());
SafeContentResolver safeContentResolver = SafeContentResolver.newInstance(contextRef.get());
inputStream = safeContentResolver.openInputStream(uri);
if (inputStream == null) {