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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java

Issue 2011393002: Disconnect from WebAPK service when the WebAPK is stopped (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/webapps/WebApkActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
index 2cd5ea50d829ef8efec3498d910f8cdb120fc8a4..74d23ae4e3b06f981e184cc3152e90b8138eec6d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
@@ -6,9 +6,11 @@ package org.chromium.chrome.browser.webapps;
import android.content.Intent;
+import org.chromium.base.ContextUtils;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.ui.base.PageTransition;
+import org.chromium.webapk.lib.client.WebApkServiceConnectionManager;
/**
* An Activity is designed for WebAPKs (native Android apps) and displays a webapp in a nearly
@@ -39,4 +41,12 @@ public class WebApkActivity extends WebappActivity {
// when WebAPKs are registered in WebappRegistry.
initializeSplashScreenWidgets(backgroundColor, null);
}
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ String packageName = getWebappInfo().webApkPackageName();
+ WebApkServiceConnectionManager.getInstance().disconnect(
+ ContextUtils.getApplicationContext(), packageName);
+ }
}
« 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