bump target sdk to 33
This commit is contained in:
parent
772b2c4294
commit
bc00f6f629
|
@ -86,13 +86,13 @@ ext {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'eu.siacs.conversations'
|
namespace 'eu.siacs.conversations'
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
|
||||||
versionCode 42053
|
versionCode 42053
|
||||||
versionName "2.12.2"
|
versionName "2.12.2"
|
||||||
|
targetSdkVersion 33
|
||||||
archivesBaseName += "-$versionName"
|
archivesBaseName += "-$versionName"
|
||||||
applicationId "eu.siacs.conversations"
|
applicationId "eu.siacs.conversations"
|
||||||
resValue "string", "applicationId", applicationId
|
resValue "string", "applicationId", applicationId
|
||||||
|
|
|
@ -143,7 +143,7 @@ public class FileBackend {
|
||||||
"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 (final IOException | NotAVideoFile e) {
|
||||||
// ignore and fall through
|
// ignore and fall through
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ public class FileBackend {
|
||||||
return inSampleSize;
|
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();
|
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
|
||||||
try {
|
try {
|
||||||
mediaMetadataRetriever.setDataSource(context, uri);
|
mediaMetadataRetriever.setDataSource(context, uri);
|
||||||
|
@ -294,7 +294,7 @@ public class FileBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dimensions getVideoDimensions(MediaMetadataRetriever metadataRetriever)
|
private static Dimensions getVideoDimensions(MediaMetadataRetriever metadataRetriever)
|
||||||
throws NotAVideoFile {
|
throws NotAVideoFile, IOException {
|
||||||
String hasVideo =
|
String hasVideo =
|
||||||
metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_HAS_VIDEO);
|
metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_HAS_VIDEO);
|
||||||
if (hasVideo == null) {
|
if (hasVideo == null) {
|
||||||
|
@ -1527,7 +1527,7 @@ public class FileBackend {
|
||||||
Log.d(Config.LOGTAG, "ambiguous file " + mime + " is audio");
|
Log.d(Config.LOGTAG, "ambiguous file " + mime + " is audio");
|
||||||
body.append("|0|0|").append(getMediaRuntime(file));
|
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");
|
Log.d(Config.LOGTAG, "ambiguous file " + mime + " is audio");
|
||||||
body.append("|0|0|").append(getMediaRuntime(file));
|
body.append("|0|0|").append(getMediaRuntime(file));
|
||||||
}
|
}
|
||||||
|
@ -1547,7 +1547,7 @@ public class FileBackend {
|
||||||
.append('|')
|
.append('|')
|
||||||
.append(dimensions.height);
|
.append(dimensions.height);
|
||||||
}
|
}
|
||||||
} catch (NotAVideoFile notAVideoFile) {
|
} catch (final IOException | NotAVideoFile notAVideoFile) {
|
||||||
Log.d(
|
Log.d(
|
||||||
Config.LOGTAG,
|
Config.LOGTAG,
|
||||||
"file with mime type " + file.getMimeType() + " was not a video file");
|
"file with mime type " + file.getMimeType() + " was not a video file");
|
||||||
|
@ -1592,7 +1592,7 @@ public class FileBackend {
|
||||||
return new Dimensions(imageHeight, imageWidth);
|
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();
|
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
|
||||||
try {
|
try {
|
||||||
metadataRetriever.setDataSource(file.getAbsolutePath());
|
metadataRetriever.setDataSource(file.getAbsolutePath());
|
||||||
|
|
Loading…
Reference in a new issue