| Index: base/android/java/src/org/chromium/base/SysUtils.java
|
| diff --git a/base/android/java/src/org/chromium/base/SysUtils.java b/base/android/java/src/org/chromium/base/SysUtils.java
|
| index a8fcdcb8169df1710447d0be0cfb2b0501f5a2c2..1108d9ed555b83b37bb84ea1f1701a7fda3c8f7f 100644
|
| --- a/base/android/java/src/org/chromium/base/SysUtils.java
|
| +++ b/base/android/java/src/org/chromium/base/SysUtils.java
|
| @@ -32,14 +32,10 @@ public class SysUtils {
|
|
|
| /**
|
| * Return the amount of physical memory on this device in kilobytes.
|
| - * Note: the only reason this is public is for testability reason.
|
| * @return Amount of physical memory in kilobytes, or 0 if there was
|
| * an error trying to access the information.
|
| - *
|
| - * Note that this is CalledByNative for testing purpose only.
|
| */
|
| - @CalledByNative
|
| - public static int amountOfPhysicalMemoryKB() {
|
| + private static int amountOfPhysicalMemoryKB() {
|
| // Extract total memory RAM size by parsing /proc/meminfo, note that
|
| // this is exactly what the implementation of sysconf(_SC_PHYS_PAGES)
|
| // does. However, it can't be called because this method must be
|
| @@ -108,11 +104,13 @@ public class SysUtils {
|
|
|
| private static boolean detectLowEndDevice() {
|
| if (CommandLine.isInitialized()) {
|
| - if (CommandLine.getInstance().hasSwitch(BaseSwitches.ENABLE_LOW_END_DEVICE_MODE)) {
|
| - return true;
|
| - }
|
| - if (CommandLine.getInstance().hasSwitch(BaseSwitches.DISABLE_LOW_END_DEVICE_MODE)) {
|
| - return false;
|
| + if (CommandLine.getInstance().hasSwitch(BaseSwitches.LOW_END_DEVICE_MODE)) {
|
| + int mode = Integer.parseInt(CommandLine.getInstance().getSwitchValue(
|
| + BaseSwitches.LOW_END_DEVICE_MODE));
|
| + if (mode == 1)
|
| + return true;
|
| + if (mode == 0)
|
| + return false;
|
| }
|
| }
|
|
|
|
|