Commit c74dcc81 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android WebAPK Refactor] Remove unneeded conditionals in WebappActivity#initializeUI()

This CL:
- Removes the Tab#getUrl() empty check.
  The check originates from a bad refactor in
  https://chrome-internal-review.googlesource.com/c/45524
  (It was originally introduced in
   https://chrome-internal-review.googlesource.com/c/44162/)
- Removes the WebappInfo#isInitialized() check.
  WebappActivity#initializeUI() is never called when
  WebappInfo#isInitialized() is false.

BUG=None

Change-Id: I68bfae6c25d3f5103863c3138cbd9088570c0c60
Reviewed-on: https://chromium-review.googlesource.com/572386Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487088}
parent f078efc2
......@@ -127,11 +127,9 @@ public class WebappActivity extends SingleTabActivity {
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())) {
getActivityTab().loadUrl(new LoadUrlParams(
mWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL));
}
if (savedInstanceState == null) {
getActivityTab().loadUrl(
new LoadUrlParams(mWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL));
} else {
if (NetworkChangeNotifier.isOnline()) getActivityTab().reloadIgnoringCache();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment