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

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

Issue 2755723005: Explicitly check for an installed WebAPK before starting installation (Closed)
Patch Set: Created 3 years, 9 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/WebApkInstaller.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
index c157c6aeba67ef45cf8ccc87372055cec810ec27..c19b3a1ea8020608620cea38c7e3c4cf9f2dacfc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
@@ -115,6 +115,14 @@ public class WebApkInstaller {
return;
}
+ // Check whether the WebAPK package is already installed. The WebAPK may have been installed
+ // by another Chrome version (e.g. Chrome Dev). We have to do this check because the Play
+ // install API fails silently if the package is already installed.
+ if (isWebApkInstalled(packageName)) {
+ notify(true);
+ return;
+ }
+
Callback<Boolean> callback = new Callback<Boolean>() {
@Override
public void onResult(Boolean success) {
« 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