| Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| index b174519765b4af9ef2162054881fadbf36241fd6..3a7d1b83beb75bb5dd7e7c310c3b7a8aa10ba6d1 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| @@ -455,16 +455,22 @@ public class ShortcutHelper {
|
| }
|
|
|
| /**
|
| - * Returns true if WebAPKs are enabled and there is a WebAPK installed which can handle
|
| + * Returns the package name of the WebAPK if WebAPKs are enabled and there is an installed
|
| + * WebAPK which can handle {@link url}. Returns null otherwise.
|
| + */
|
| + @CalledByNative
|
| + private static String queryWebApkPackage(String url) {
|
| + if (!ChromeWebApkHost.isEnabled()) return null;
|
| + return WebApkValidator.queryWebApkPackage(ContextUtils.getApplicationContext(), url);
|
| + }
|
| +
|
| + /**
|
| + * Returns true if WebAPKs are enabled and there is an installed WebAPK which can handle
|
| * {@link url}.
|
| */
|
| @CalledByNative
|
| private static boolean isWebApkInstalled(String url) {
|
| - if (!ChromeWebApkHost.isEnabled()) {
|
| - return false;
|
| - }
|
| - return WebApkValidator.queryWebApkPackage(ContextUtils.getApplicationContext(), url)
|
| - != null;
|
| + return queryWebApkPackage(url) != null;
|
| }
|
|
|
| /**
|
|
|