From 936e313c2f479bdd76bf14d883781acf38c2c7b0 Mon Sep 17 00:00:00 2001 From: bzrd_Sdn Date: Wed, 13 Apr 2016 14:49:24 +0200 Subject: [PATCH] Bug 1256922 - Remove unused HardwareUtils.isLowMemoryPlatform(). r=sebastian MozReview-Commit-ID: CDkh8AekOVe --HG-- extra : rebase_source : 232f50d3b6fb8d4599967552679f05fe070e5dc1 --- .../org/mozilla/gecko/util/HardwareUtils.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java b/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java index def917b1b1bc..4b2dadb53f35 100644 --- a/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java +++ b/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java @@ -18,14 +18,6 @@ import android.view.ViewConfiguration; public final class HardwareUtils { private static final String LOGTAG = "GeckoHardwareUtils"; - // Minimum memory threshold for a device to be considered - // a low memory platform (see isLowMemoryPlatform). This value - // has be in sync with Gecko's equivalent threshold (defined in - // xpcom/base/nsMemoryImpl.cpp) and should only be used in cases - // where we can't depend on Gecko to be up and running e.g. show/hide - // reading list capabilities in HomePager. - private static final int LOW_MEMORY_THRESHOLD_MB = 384; - private static final boolean IS_AMAZON_DEVICE = Build.MANUFACTURER.equalsIgnoreCase("Amazon"); public static final boolean IS_KINDLE_DEVICE = IS_AMAZON_DEVICE && (Build.MODEL.equals("Kindle Fire") || @@ -86,19 +78,6 @@ public final class HardwareUtils { return SysInfo.getMemSize(); } - public static boolean isLowMemoryPlatform() { - final int memSize = getMemSize(); - - // Fallback to false if we fail to read meminfo - // for some reason. - if (memSize == 0) { - Log.w(LOGTAG, "Could not compute system memory. Falling back to isLowMemoryPlatform = false."); - return false; - } - - return memSize < LOW_MEMORY_THRESHOLD_MB; - } - /** * @return false if the current system is not supported (e.g. APK/system ABI mismatch). */