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

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

Issue 1477383002: Use ContextUtils instead of ApplicationStatus for context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java » ('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 74bac1055336b09d27a78d6dbc4a1ee0eb18578d..df2cd29e49e2fd87b89863e586a06e32b7a6b786 100644
--- a/base/android/java/src/org/chromium/base/SysUtils.java
+++ b/base/android/java/src/org/chromium/base/SysUtils.java
@@ -116,16 +116,14 @@ public class SysUtils {
return false;
}
- Context context = ApplicationStatus.getApplicationContext();
+ Context context = ContextUtils.getApplicationContext();
// Only KitKat and later devices have isLowRamDevice() call available.
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && context != null) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
ActivityManager activityManager = (ActivityManager)
context.getSystemService(Context.ACTIVITY_SERVICE);
if (activityManager.isLowRamDevice()) {
return true;
}
- } else {
- Log.e(TAG, "ApplicationContext is null in ApplicationStatus");
}
int ramSizeMB = amountOfPhysicalMemoryMB();
« no previous file with comments | « no previous file | components/signin/core/browser/android/java/src/org/chromium/components/signin/ChildAccountInfoFetcher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698