bump targetSdk; bump room version
This commit is contained in:
parent
38c612d35d
commit
3e9029dc8f
|
@ -45,7 +45,7 @@ dependencies {
|
||||||
|
|
||||||
// Conversations 3.0 dependencies
|
// Conversations 3.0 dependencies
|
||||||
|
|
||||||
def room_version = "2.4.3"
|
def room_version = "2.5.0"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
||||||
|
|
||||||
|
@ -117,11 +117,11 @@ ext {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'eu.siacs.conversations'
|
namespace 'eu.siacs.conversations'
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "3.0.0-alpha"
|
versionName "3.0.0-alpha"
|
||||||
archivesBaseName += "-$versionName"
|
archivesBaseName += "-$versionName"
|
||||||
|
|
|
@ -26,16 +26,26 @@ import android.util.Base64OutputStream;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.LruCache;
|
import android.util.LruCache;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
import androidx.exifinterface.media.ExifInterface;
|
import androidx.exifinterface.media.ExifInterface;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
|
import eu.siacs.conversations.Config;
|
||||||
|
import eu.siacs.conversations.R;
|
||||||
|
import eu.siacs.conversations.entities.DownloadableFile;
|
||||||
|
import eu.siacs.conversations.entities.Message;
|
||||||
|
import eu.siacs.conversations.services.AttachFileToConversationRunnable;
|
||||||
|
import eu.siacs.conversations.services.XmppConnectionService;
|
||||||
|
import eu.siacs.conversations.ui.adapter.MediaAdapter;
|
||||||
|
import eu.siacs.conversations.ui.util.Attachment;
|
||||||
|
import eu.siacs.conversations.utils.CryptoHelper;
|
||||||
|
import eu.siacs.conversations.utils.FileUtils;
|
||||||
|
import eu.siacs.conversations.utils.FileWriterException;
|
||||||
|
import eu.siacs.conversations.utils.MimeUtils;
|
||||||
|
import eu.siacs.conversations.xmpp.pep.Avatar;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -58,20 +68,6 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import eu.siacs.conversations.Config;
|
|
||||||
import eu.siacs.conversations.R;
|
|
||||||
import eu.siacs.conversations.entities.DownloadableFile;
|
|
||||||
import eu.siacs.conversations.entities.Message;
|
|
||||||
import eu.siacs.conversations.services.AttachFileToConversationRunnable;
|
|
||||||
import eu.siacs.conversations.services.XmppConnectionService;
|
|
||||||
import eu.siacs.conversations.ui.adapter.MediaAdapter;
|
|
||||||
import eu.siacs.conversations.ui.util.Attachment;
|
|
||||||
import eu.siacs.conversations.utils.CryptoHelper;
|
|
||||||
import eu.siacs.conversations.utils.FileUtils;
|
|
||||||
import eu.siacs.conversations.utils.FileWriterException;
|
|
||||||
import eu.siacs.conversations.utils.MimeUtils;
|
|
||||||
import eu.siacs.conversations.xmpp.pep.Avatar;
|
|
||||||
|
|
||||||
public class FileBackend {
|
public class FileBackend {
|
||||||
|
|
||||||
private static final Object THUMBNAIL_LOCK = new Object();
|
private static final Object THUMBNAIL_LOCK = new Object();
|
||||||
|
@ -140,7 +136,8 @@ public class FileBackend {
|
||||||
if (dimensions.getMin() > 720) {
|
if (dimensions.getMin() > 720) {
|
||||||
Log.d(
|
Log.d(
|
||||||
Config.LOGTAG,
|
Config.LOGTAG,
|
||||||
"do not consider video file with min width larger than 720 for size check");
|
"do not consider video file with min width larger than 720 for"
|
||||||
|
+ " size check");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} catch (NotAVideoFile notAVideoFile) {
|
} catch (NotAVideoFile notAVideoFile) {
|
||||||
|
@ -269,13 +266,12 @@ public class FileBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dimensions getVideoDimensions(Context context, Uri uri) throws NotAVideoFile {
|
private static Dimensions getVideoDimensions(Context context, Uri uri) throws NotAVideoFile {
|
||||||
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
|
try (final MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever()) {
|
||||||
try {
|
|
||||||
mediaMetadataRetriever.setDataSource(context, uri);
|
mediaMetadataRetriever.setDataSource(context, uri);
|
||||||
} catch (RuntimeException e) {
|
return getVideoDimensions(mediaMetadataRetriever);
|
||||||
|
} catch (IOException | RuntimeException e) {
|
||||||
throw new NotAVideoFile(e);
|
throw new NotAVideoFile(e);
|
||||||
}
|
}
|
||||||
return getVideoDimensions(mediaMetadataRetriever);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dimensions getVideoDimensionsOfFrame(
|
private static Dimensions getVideoDimensionsOfFrame(
|
||||||
|
@ -324,7 +320,7 @@ public class FileBackend {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
width = -1;
|
width = -1;
|
||||||
}
|
}
|
||||||
metadataRetriever.release();
|
// metadataRetriever.release();
|
||||||
Log.d(Config.LOGTAG, "extracted video dims " + width + "x" + height);
|
Log.d(Config.LOGTAG, "extracted video dims " + width + "x" + height);
|
||||||
return rotated ? new Dimensions(width, height) : new Dimensions(height, width);
|
return rotated ? new Dimensions(width, height) : new Dimensions(height, width);
|
||||||
}
|
}
|
||||||
|
@ -1593,13 +1589,12 @@ public class FileBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dimensions getVideoDimensions(File file) throws NotAVideoFile {
|
private Dimensions getVideoDimensions(File file) throws NotAVideoFile {
|
||||||
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
|
try (final MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever()) {
|
||||||
try {
|
|
||||||
metadataRetriever.setDataSource(file.getAbsolutePath());
|
metadataRetriever.setDataSource(file.getAbsolutePath());
|
||||||
} catch (RuntimeException e) {
|
return getVideoDimensions(metadataRetriever);
|
||||||
|
} catch (IOException | RuntimeException e) {
|
||||||
throw new NotAVideoFile(e);
|
throw new NotAVideoFile(e);
|
||||||
}
|
}
|
||||||
return getVideoDimensions(metadataRetriever);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dimensions getPdfDocumentDimensions(final File file) {
|
private Dimensions getPdfDocumentDimensions(final File file) {
|
||||||
|
|
Loading…
Reference in a new issue