Cache the application context instead of Activity.
When storing a reference to a Context, ensure that it's the
Application context rather than Activity Context.
Bug: 5084293
Change-Id: Ib0be5f8ceb91846bb985d0813a8f22cabd44eaf8
diff --git a/src/com/android/browser/Preloader.java b/src/com/android/browser/Preloader.java
index cc71f34..37cbc0e 100644
--- a/src/com/android/browser/Preloader.java
+++ b/src/com/android/browser/Preloader.java
@@ -49,7 +49,7 @@
}
private Preloader(Context context) {
- mContext = context;
+ mContext = context.getApplicationContext();
mHandler = new Handler(Looper.getMainLooper());
mSession = null;
mFactory = new BrowserWebViewFactory(context);