Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1518)

Unified Diff: base/android/java/src/org/chromium/base/SysUtils.java

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/android/java/src/org/chromium/base/JavaHandlerThread.java ('k') | base/android/java_handler_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1455a61ec8ca874b226883b2c3b86de2c653b2cf..9dad5162999c799243ebadc0374912ed6a4c0414 100644
--- a/base/android/java/src/org/chromium/base/SysUtils.java
+++ b/base/android/java/src/org/chromium/base/SysUtils.java
@@ -4,6 +4,7 @@
package org.chromium.base;
+import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.Context;
import android.os.Build;
@@ -19,10 +20,6 @@ import java.util.regex.Pattern;
* Exposes system related information about the current device.
*/
public class SysUtils {
- // Any device that runs this or an older version of the system cannot be considered 'low-end'
- private static final int ANDROID_LOW_MEMORY_ANDROID_SDK_THRESHOLD =
- Build.VERSION_CODES.JELLY_BEAN_MR2;
-
// A device reporting strictly more total memory in megabytes cannot be considered 'low-end'.
private static final int ANDROID_LOW_MEMORY_DEVICE_THRESHOLD_MB = 512;
@@ -107,6 +104,7 @@ public class SysUtils {
return sLowEndDevice.booleanValue();
}
+ @TargetApi(Build.VERSION_CODES.KITKAT)
private static boolean detectLowEndDevice() {
assert CommandLine.isInitialized();
if (CommandLine.getInstance().hasSwitch(BaseSwitches.ENABLE_LOW_END_DEVICE_MODE)) {
@@ -115,7 +113,8 @@ public class SysUtils {
if (CommandLine.getInstance().hasSwitch(BaseSwitches.DISABLE_LOW_END_DEVICE_MODE)) {
return false;
}
- if (Build.VERSION.SDK_INT <= ANDROID_LOW_MEMORY_ANDROID_SDK_THRESHOLD) {
+ // Any pre-KitKat device cannot be considered 'low-end'.
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return false;
}
« no previous file with comments | « base/android/java/src/org/chromium/base/JavaHandlerThread.java ('k') | base/android/java_handler_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698