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

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

Issue 1867543002: Enable deep-linking from notifications for recently used web apps on the Android home screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bulk-webappdatastorage
Patch Set: Address nits Created 4 years, 8 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
Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
index 45c50d86f37c95ab5815c8ee7715a6aa246a901b..179991e89dc477e4ae99fcb1c28e8fc872628e7e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
@@ -255,4 +255,12 @@ public class WebappInfo {
intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor());
intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated());
}
+
+ /**
+ * Returns true if the WebappInfo was created for an Intent fired from a launcher shortcut (as
+ * opposed to an intent from a push notification or other internal source).
+ */
+ public boolean isLaunchedFromHomescreen() {
+ return source() != ShortcutSource.NOTIFICATION;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698