diff --git a/library/src/main/java/com/bumptech/glide/load/engine/cache/MemorySizeCalculator.java b/library/src/main/java/com/bumptech/glide/load/engine/cache/MemorySizeCalculator.java index 3fdd73545e..9024566399 100644 --- a/library/src/main/java/com/bumptech/glide/load/engine/cache/MemorySizeCalculator.java +++ b/library/src/main/java/com/bumptech/glide/load/engine/cache/MemorySizeCalculator.java @@ -92,9 +92,11 @@ private String toMb(int bytes) { @TargetApi(Build.VERSION_CODES.KITKAT) private static boolean isLowMemoryDevice(ActivityManager activityManager) { - final int sdkInt = Build.VERSION.SDK_INT; - return sdkInt < Build.VERSION_CODES.HONEYCOMB - || (sdkInt >= Build.VERSION_CODES.KITKAT && activityManager.isLowRamDevice()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + return activityManager.isLowRamDevice(); + } else { + return Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB; + } } private static class DisplayMetricsScreenDimensions implements ScreenDimensions {