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

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

Issue 2045303002: Update to Chromium //base at Chromium commit 3e81715e6d3a4324362635aea46ce1f1a163cca1. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@master
Patch Set: Created 4 years, 6 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
Index: android/java/src/org/chromium/base/SysUtils.java
diff --git a/android/java/src/org/chromium/base/SysUtils.java b/android/java/src/org/chromium/base/SysUtils.java
index 1393e8ee7c33c0f6c3a6244f85631a02af054d69..74bac1055336b09d27a78d6dbc4a1ee0eb18578d 100644
--- a/android/java/src/org/chromium/base/SysUtils.java
+++ b/android/java/src/org/chromium/base/SysUtils.java
@@ -115,13 +115,10 @@ public class SysUtils {
if (CommandLine.getInstance().hasSwitch(BaseSwitches.DISABLE_LOW_END_DEVICE_MODE)) {
return false;
}
- // Any pre-KitKat device cannot be considered 'low-end'.
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
- return false;
- }
Context context = ApplicationStatus.getApplicationContext();
- if (context != null) {
+ // Only KitKat and later devices have isLowRamDevice() call available.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && context != null) {
ActivityManager activityManager = (ActivityManager)
context.getSystemService(Context.ACTIVITY_SERVICE);
if (activityManager.isLowRamDevice()) {
« no previous file with comments | « android/java/src/org/chromium/base/CommandLine.java ('k') | android/java/src/org/chromium/base/WindowCallbackWrapper.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698