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

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

Issue 2758193002: [Android WebAPKs] Don't navigate WebAPK when launching it from launcher (Closed)
Patch Set: Merge branch 'master' into twitter Created 3 years, 9 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 cc62a08806a3cfee017307774a8c9c355f2b039f..18a55aab7024be1f64550f2a1e1a43c21450a94b 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
@@ -108,6 +108,9 @@ public class WebappActivity extends FullScreenActivity {
mWebappInfo = newWebappInfo;
resetSavedInstanceState();
if (mIsInitialized) initializeUI(null);
+ } else if (newWebappInfo.shouldForceNavigation() && mIsInitialized) {
+ getActivityTab().loadUrl(new LoadUrlParams(
+ newWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL));
}
}
@@ -119,7 +122,7 @@ public class WebappActivity extends FullScreenActivity {
return (intent == null) ? WebappInfo.createEmpty() : WebappInfo.create(intent);
}
- private void initializeUI(Bundle savedInstanceState) {
+ protected void initializeUI(Bundle savedInstanceState) {
// We do not load URL when restoring from saved instance states.
if (savedInstanceState == null && mWebappInfo.isInitialized()) {
if (TextUtils.isEmpty(getActivityTab().getUrl())) {

Powered by Google App Engine
This is Rietveld 408576698