| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.base; | 5 package org.chromium.base; |
| 6 | 6 |
| 7 import android.os.StrictMode; | 7 import android.os.StrictMode; |
| 8 import android.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 private static boolean detectLowEndDevice() { | 102 private static boolean detectLowEndDevice() { |
| 103 assert CommandLine.isInitialized(); | 103 assert CommandLine.isInitialized(); |
| 104 if (CommandLine.getInstance().hasSwitch(BaseSwitches.ENABLE_LOW_END_DEVI
CE_MODE)) { | 104 if (CommandLine.getInstance().hasSwitch(BaseSwitches.ENABLE_LOW_END_DEVI
CE_MODE)) { |
| 105 return true; | 105 return true; |
| 106 } | 106 } |
| 107 if (CommandLine.getInstance().hasSwitch(BaseSwitches.DISABLE_LOW_END_DEV
ICE_MODE)) { | 107 if (CommandLine.getInstance().hasSwitch(BaseSwitches.DISABLE_LOW_END_DEV
ICE_MODE)) { |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| 110 | 110 |
| 111 int ramSizeKB = amountOfPhysicalMemoryKB(); | 111 int ramSizeKB = amountOfPhysicalMemoryKB(); |
| 112 return (ramSizeKB > 0 && ramSizeKB / 1024 < ANDROID_LOW_MEMORY_DEVICE_TH
RESHOLD_MB); | 112 return (ramSizeKB > 0 && ramSizeKB / 1024 <= ANDROID_LOW_MEMORY_DEVICE_T
HRESHOLD_MB); |
| 113 } | 113 } |
| 114 } | 114 } |
| OLD | NEW |