Index: base/android/sys_utils.cc |
diff --git a/base/android/sys_utils.cc b/base/android/sys_utils.cc |
index 2a7db192bfb2e62c7f36593dc93310185b291e14..81b6960b68e33362969d0c3299674a56a93d1cc9 100644 |
--- a/base/android/sys_utils.cc |
+++ b/base/android/sys_utils.cc |
@@ -8,23 +8,6 @@ |
#include "base/sys_info.h" |
#include "jni/SysUtils_jni.h" |
-// Any device that reports a physical RAM size less than this, in megabytes |
-// is considered 'low-end'. IMPORTANT: Read the LinkerLowMemoryThresholdTest |
-// comments in build/android/pylib/linker/test_case.py before modifying this |
-// value. |
-#define ANDROID_LOW_MEMORY_DEVICE_THRESHOLD_MB 512 |
- |
-const int64 kLowEndMemoryThreshold = |
- 1024 * 1024 * ANDROID_LOW_MEMORY_DEVICE_THRESHOLD_MB; |
- |
-// Only support low end device changes on builds greater than JB MR2. |
-const int kLowEndSdkIntThreshold = 18; |
- |
-// Defined and called by JNI |
-static jboolean IsLowEndDevice(JNIEnv* env, jclass clazz) { |
- return base::android::SysUtils::IsLowEndDevice(); |
-} |
- |
namespace base { |
namespace android { |
@@ -33,8 +16,8 @@ bool SysUtils::Register(JNIEnv* env) { |
} |
bool SysUtils::IsLowEndDevice() { |
- return SysInfo::AmountOfPhysicalMemory() <= kLowEndMemoryThreshold && |
- BuildInfo::GetInstance()->sdk_int() > kLowEndSdkIntThreshold; |
+ JNIEnv* env = AttachCurrentThread(); |
+ return Java_SysUtils_isLowEndDevice(env); |
} |
bulach
2013/11/06 12:16:39
you may want to expose "AmountOfPhyiscalMemoryForT
|
SysUtils::SysUtils() { } |