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

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

Issue 2634173002: Fall back to legacy add to homescreen behavior on non-GMS device or GMS isn't availabe. (Closed)
Patch Set: Nits. Created 3 years, 11 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 | chrome/browser/android/webapk/webapk_installer.h » ('j') | 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 149a3e2c5e0b5dd9fc75490975d5c5721627bc55..a32ff99e8f255816a1676f2fa5ecd27c53973032 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
@@ -20,6 +20,8 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.ChromeApplication;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.banners.InstallerDelegate;
+import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
+import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
import org.chromium.chrome.browser.util.IntentUtils;
import java.io.File;
@@ -62,8 +64,11 @@ public class WebApkInstaller {
}
@CalledByNative
- private boolean hasGooglePlayWebApkInstallDelegate() {
- return mGooglePlayWebApkInstallDelegate != null;
+ private boolean canUseGooglePlayInstallService() {
+ return mGooglePlayWebApkInstallDelegate != null
+ && ExternalAuthUtils.getInstance().canUseGooglePlayServices(
+ ContextUtils.getApplicationContext(),
+ new UserRecoverableErrorHandler.Silent());
}
@CalledByNative
« no previous file with comments | « no previous file | chrome/browser/android/webapk/webapk_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698