minor code clean up
This commit is contained in:
parent
64b853f3ac
commit
5735bca517
|
@ -1602,7 +1602,6 @@ public class FileBackend {
|
||||||
return getVideoDimensions(metadataRetriever);
|
return getVideoDimensions(metadataRetriever);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
private Dimensions getPdfDocumentDimensions(final File file) {
|
private Dimensions getPdfDocumentDimensions(final File file) {
|
||||||
final ParcelFileDescriptor fileDescriptor;
|
final ParcelFileDescriptor fileDescriptor;
|
||||||
try {
|
try {
|
||||||
|
@ -1610,7 +1609,7 @@ public class FileBackend {
|
||||||
if (fileDescriptor == null) {
|
if (fileDescriptor == null) {
|
||||||
return new Dimensions(0, 0);
|
return new Dimensions(0, 0);
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
} catch (final FileNotFoundException e) {
|
||||||
return new Dimensions(0, 0);
|
return new Dimensions(0, 0);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -1621,7 +1620,7 @@ public class FileBackend {
|
||||||
page.close();
|
page.close();
|
||||||
pdfRenderer.close();
|
pdfRenderer.close();
|
||||||
return scalePdfDimensions(new Dimensions(height, width));
|
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);
|
Log.d(Config.LOGTAG, "unable to get dimensions for pdf document", e);
|
||||||
return new Dimensions(0, 0);
|
return new Dimensions(0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,6 +521,9 @@ public class RtpSessionActivity extends XmppActivity
|
||||||
@StringRes int res;
|
@StringRes int res;
|
||||||
final String firstDenied =
|
final String firstDenied =
|
||||||
getFirstDenied(permissionResult.grantResults, permissionResult.permissions);
|
getFirstDenied(permissionResult.grantResults, permissionResult.permissions);
|
||||||
|
if (firstDenied == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Manifest.permission.RECORD_AUDIO.equals(firstDenied)) {
|
if (Manifest.permission.RECORD_AUDIO.equals(firstDenied)) {
|
||||||
res = R.string.no_microphone_permission;
|
res = R.string.no_microphone_permission;
|
||||||
} else if (Manifest.permission.CAMERA.equals(firstDenied)) {
|
} else if (Manifest.permission.CAMERA.equals(firstDenied)) {
|
||||||
|
|
Loading…
Reference in a new issue