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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java

Issue 2458503004: android: Keep the context on disconnect in GSAServiceClient. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java b/chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java
index 90a28e4cf0fa8e749f70be15605ba784b53738a1..688c52f1268a996ef84465233481a02cc5a1d19a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java
@@ -80,7 +80,7 @@ public class GSAServiceClient {
* @param onMessageReceived optional callback when a message is received.
*/
GSAServiceClient(Context context, Callback<Bundle> onMessageReceived) {
- mContext = context;
+ mContext = context.getApplicationContext();
mOnMessageReceived = onMessageReceived;
mHandler = new IncomingHandler();
mMessenger = new Messenger(mHandler);
@@ -108,9 +108,7 @@ public class GSAServiceClient {
*/
void disconnect() {
if (mService == null) return;
-
mContext.unbindService(mConnection);
- mContext = null;
mService = null;
// Remove pending handler actions to prevent memory leaks.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698