Bug 1256922 - Remove unused HardwareUtils.isLowMemoryPlatform(). r=sebastian
authorbzrd_Sdn <bouzroudzeineb@gmail.com>
Wed, 13 Apr 2016 14:49:24 +0200
changeset 316752 ef8a688b8b72f266782ed728071dd82dca1acf76
parent 316751 6ef7f0a7ea41dcfd74ae70abe36fd03610e6bfec
child 316753 d5ee38a7a2f7d2237e994a556462444c99590fcf
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1256922
milestone48.0a1
Bug 1256922 - Remove unused HardwareUtils.isLowMemoryPlatform(). r=sebastian MozReview-Commit-ID: CDkh8AekOVe
mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java
--- a/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java
+++ b/mobile/android/base/java/org/mozilla/gecko/util/HardwareUtils.java
@@ -13,24 +13,16 @@ import android.content.pm.PackageManager
 import android.content.res.Configuration;
 import android.os.Build;
 import android.util.Log;
 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") ||
                                                     Build.MODEL.startsWith("KF"));
 
     private static volatile boolean sInited;
 
     // These are all set once, during init.
@@ -81,29 +73,16 @@ public final class HardwareUtils {
     public static boolean isTelevision() {
         return sIsTelevision;
     }
 
     public static int getMemSize() {
         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).
      */
     public static boolean isSupportedSystem() {
         if (Build.VERSION.SDK_INT < AppConstants.Versions.MIN_SDK_VERSION ||
             Build.VERSION.SDK_INT > AppConstants.Versions.MAX_SDK_VERSION) {
             return false;
         }