forked from mirror/monocles_chat
Support API 33 feature detection (Cheogram)
This commit is contained in:
parent
7a050f6d63
commit
af2f6c4973
3 changed files with 12 additions and 1 deletions
|
@ -125,7 +125,7 @@ def tags = grgit.tag.list().findAll { it.dateTime != null }.sort { it.dateTime }
|
|||
android {
|
||||
namespace 'eu.siacs.conversations'
|
||||
//noinspection GradleCompatible
|
||||
compileSdkVersion 32
|
||||
compileSdkVersion 33
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
|
|
|
@ -731,6 +731,12 @@ public class Contact implements ListItem, Blockable {
|
|||
// This Contact is a gateway to use for voice calls, register it with OS
|
||||
public void registerAsPhoneAccount(XmppConnectionService ctx) {
|
||||
if (Build.VERSION.SDK_INT < 23) return;
|
||||
if (Build.VERSION.SDK_INT >= 33) {
|
||||
if (!ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELECOM)) return;
|
||||
} else {
|
||||
if (!ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CONNECTION_SERVICE)) return;
|
||||
}
|
||||
|
||||
if (!ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CONNECTION_SERVICE)) return;
|
||||
|
||||
TelecomManager telecomManager = ctx.getSystemService(TelecomManager.class);
|
||||
|
|
|
@ -1980,6 +1980,11 @@ public class FileBackend {
|
|||
} catch (Exception e) {
|
||||
width = -1;
|
||||
}
|
||||
try {
|
||||
metadataRetriever.release();
|
||||
} catch (final IOException e) {
|
||||
throw new NotAVideoFile();
|
||||
}
|
||||
metadataRetriever.release();
|
||||
Log.d(Config.LOGTAG, "extracted video dims " + width + "x" + height);
|
||||
return rotated ? new Dimensions(width, height) : new Dimensions(height, width);
|
||||
|
|
Loading…
Reference in a new issue