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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.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/WebappActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
index dc5a805a3e0244c2be00270695f875962b074d40..34bfc75b5c07b5d74b89df3e18024ca55bc353cd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -264,6 +264,16 @@ public class WebappActivity extends FullScreenActivity {
// Restore the data if necessary from the intent.
storage.updateFromShortcutIntent(intent);
+ // A recent last used time is the indicator that the web app is still
+ // present on the home screen, and enables sources such as notifications to
+ // launch web apps. Thus, we do not update the last used time when the web
+ // app is not directly launched from the home screen, as this interferes
+ // with the heuristic.
+ if (mWebappInfo.isLaunchedFromHomescreen()) {
+ storage.updateLastUsedTime();
+ storage.setLaunched();
+ }
+
// Retrieve the splash image if it exists.
storage.getSplashScreenImage(new WebappDataStorage.FetchCallback<Bitmap>() {
@Override

Powered by Google App Engine
This is Rietveld 408576698