minor code clean up

This commit is contained in:
Daniel Gultsch 2022-10-01 09:26:07 +02:00
parent 64b853f3ac
commit 5735bca517
2 changed files with 5 additions and 3 deletions

View file

@ -1602,7 +1602,6 @@ public class FileBackend {
return getVideoDimensions(metadataRetriever);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private Dimensions getPdfDocumentDimensions(final File file) {
final ParcelFileDescriptor fileDescriptor;
try {
@ -1610,7 +1609,7 @@ public class FileBackend {
if (fileDescriptor == null) {
return new Dimensions(0, 0);
}
} catch (FileNotFoundException e) {
} catch (final FileNotFoundException e) {
return new Dimensions(0, 0);
}
try {
@ -1621,7 +1620,7 @@ public class FileBackend {
page.close();
pdfRenderer.close();
return scalePdfDimensions(new Dimensions(height, width));
} catch (IOException | SecurityException e) {
} catch (final IOException | SecurityException e) {
Log.d(Config.LOGTAG, "unable to get dimensions for pdf document", e);
return new Dimensions(0, 0);
}

View file

@ -521,6 +521,9 @@ public class RtpSessionActivity extends XmppActivity
@StringRes int res;
final String firstDenied =
getFirstDenied(permissionResult.grantResults, permissionResult.permissions);
if (firstDenied == null) {
return;
}
if (Manifest.permission.RECORD_AUDIO.equals(firstDenied)) {
res = R.string.no_microphone_permission;
} else if (Manifest.permission.CAMERA.equals(firstDenied)) {