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

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

Issue 2800833003: Revert of Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: Created 3 years, 8 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: base/android/java/src/org/chromium/base/MemoryPressureListener.java
diff --git a/base/android/java/src/org/chromium/base/MemoryPressureListener.java b/base/android/java/src/org/chromium/base/MemoryPressureListener.java
index 408cafb9812636f4bc06381c3ebf31b67765b0fd..d61a006018032de06bc3e658ce63eea06fcfc130 100644
--- a/base/android/java/src/org/chromium/base/MemoryPressureListener.java
+++ b/base/android/java/src/org/chromium/base/MemoryPressureListener.java
@@ -6,6 +6,7 @@
import android.app.Activity;
import android.content.ComponentCallbacks2;
+import android.content.Context;
import android.content.res.Configuration;
import org.chromium.base.annotations.CalledByNative;
@@ -46,8 +47,8 @@
"org.chromium.base.ACTION_TRIM_MEMORY_MODERATE";
@CalledByNative
- private static void registerSystemCallback() {
- ContextUtils.getApplicationContext().registerComponentCallbacks(
+ private static void registerSystemCallback(Context context) {
+ context.registerComponentCallbacks(
new ComponentCallbacks2() {
@Override
public void onTrimMemory(int level) {
« no previous file with comments | « android_webview/native/android_protocol_handler.cc ('k') | base/android/memory_pressure_listener_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698