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 5ca863096b36d819eac0d67cdd363465992cb0c1..b236f45330f9fc9871f3a07d0ed9a1fbb82e9a8d 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 |
@@ -405,10 +405,23 @@ public class WebappActivity extends FullScreenActivity { |
// app is not directly launched from the home screen, as this interferes |
// with the heuristic. |
if (mWebappInfo.isLaunchedFromHomescreen()) { |
+ boolean previouslyLaunched = storage.hasBeenLaunched(); |
+ long previousUsageTimestamp = storage.getLastUsedTime(); |
+ storage.setHasBeenLaunched(); |
storage.updateLastUsedTime(); |
+ onUpdatedLastUsedTime(storage, previouslyLaunched, previousUsageTimestamp); |
} |
} |
+ /** |
+ * Called after updating the last used time in {@link WebappDataStorage}. |
+ * @param previouslyLaunched Whether the webapp has been previously launched from the home |
+ * screen. |
+ * @param previousUsageTimestamp The previous time that the webapp was used. |
+ */ |
+ protected void onUpdatedLastUsedTime( |
+ WebappDataStorage storage, boolean previouslyLaunched, long previousUsageTimestamp) {} |
+ |
protected void initializeSplashScreenWidgets(int backgroundColor, Bitmap splashImage) { |
Bitmap displayIcon = splashImage == null ? mWebappInfo.icon() : splashImage; |
int minimiumSizeThreshold = getResources().getDimensionPixelSize( |