From a78ab4ba972cb8c74674a569efe0a13a0fde0430 Mon Sep 17 00:00:00 2001 From: eho Date: Mon, 21 May 2018 19:18:59 +0200 Subject: [PATCH] ui:preview Removed redundant variable. --- .../com/owncloud/android/ui/preview/PreviewImageFragment.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java index 03206c10b4..a202c396d8 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -824,8 +824,7 @@ public class PreviewImageFragment extends FileFragment { private static int convertDpToPixel(float dp, Context context) { Resources resources = context.getResources(); DisplayMetrics metrics = resources.getDisplayMetrics(); - int px = (int) (dp * ((float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT)); - return px; + return (int) (dp * ((float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT)); }