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/KeyChainLookup.java b/src/com/android/browser/KeyChainLookup.java
index 52be25a..4d5f694 100644
--- a/src/com/android/browser/KeyChainLookup.java
+++ b/src/com/android/browser/KeyChainLookup.java
@@ -29,7 +29,7 @@
private final ClientCertRequestHandler mHandler;
private final String mAlias;
KeyChainLookup(Context context, ClientCertRequestHandler handler, String alias) {
- mContext = context;
+ mContext = context.getApplicationContext();
mHandler = handler;
mAlias = alias;
}