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 |