Skip to content

Commit

Permalink
Bump SDK version to 33
Browse files Browse the repository at this point in the history
  • Loading branch information
mwild1 committed Mar 1, 2024
1 parent eed90ce commit 15de57c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ ext {

android {
namespace 'eu.siacs.conversations'
compileSdkVersion 32
compileSdkVersion 33

defaultConfig {
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
versionCode 42051
versionName "2.12.2-2"
archivesBaseName += "-$versionName"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static boolean allFilesUnderSize(
"do not consider video file with min width larger than 720 for size check");
continue;
}
} catch (NotAVideoFile notAVideoFile) {
} catch (final IOException | NotAVideoFile e) {
// ignore and fall through
}
}
Expand Down Expand Up @@ -268,7 +268,7 @@ private static int calcSampleSize(BitmapFactory.Options options, int size) {
return inSampleSize;
}

private static Dimensions getVideoDimensions(Context context, Uri uri) throws NotAVideoFile {
private static Dimensions getVideoDimensions(Context context, Uri uri) throws NotAVideoFile, IOException {
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
try {
mediaMetadataRetriever.setDataSource(context, uri);
Expand All @@ -294,7 +294,7 @@ private static Dimensions getVideoDimensionsOfFrame(
}

private static Dimensions getVideoDimensions(MediaMetadataRetriever metadataRetriever)
throws NotAVideoFile {
throws NotAVideoFile, IOException {
String hasVideo =
metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_HAS_VIDEO);
if (hasVideo == null) {
Expand Down Expand Up @@ -1527,7 +1527,7 @@ public void updateFileParams(final Message message, final String url) {
Log.d(Config.LOGTAG, "ambiguous file " + mime + " is audio");
body.append("|0|0|").append(getMediaRuntime(file));
}
} catch (final NotAVideoFile e) {
} catch (final IOException | NotAVideoFile e) {
Log.d(Config.LOGTAG, "ambiguous file " + mime + " is audio");
body.append("|0|0|").append(getMediaRuntime(file));
}
Expand All @@ -1547,7 +1547,7 @@ public void updateFileParams(final Message message, final String url) {
.append('|')
.append(dimensions.height);
}
} catch (NotAVideoFile notAVideoFile) {
} catch (final IOException | NotAVideoFile notAVideoFile) {
Log.d(
Config.LOGTAG,
"file with mime type " + file.getMimeType() + " was not a video file");
Expand Down Expand Up @@ -1592,7 +1592,7 @@ private Dimensions getImageDimensions(File file) {
return new Dimensions(imageHeight, imageWidth);
}

private Dimensions getVideoDimensions(File file) throws NotAVideoFile {
private Dimensions getVideoDimensions(final File file) throws NotAVideoFile, IOException {
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
try {
metadataRetriever.setDataSource(file.getAbsolutePath());
Expand Down

0 comments on commit 15de57c

Please sign in to comment.