Ensure the fake title bar shows during loading.
Previously, if the BrowserActivity was paused when the page starts
to load (as when loading from bookmarks or the search bar), showing
the fake title bar would fail. Now do the check as the page continues
to load to guarantee that it shows.
Fix for http://b/issue?id=2487417
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index a004212..4cf4cf4 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2835,12 +2835,19 @@
hideFakeTitleBar();
}
}
- } else if (!mInLoad) {
- // onPageFinished may have already been called but a subframe is
- // still loading and updating the progress. Reset mInLoad and update
- // the menu items.
- mInLoad = true;
- updateInLoadMenuItems();
+ } else {
+ if (!mInLoad) {
+ // onPageFinished may have already been called but a subframe is
+ // still loading and updating the progress. Reset mInLoad and
+ // update the menu items.
+ mInLoad = true;
+ updateInLoadMenuItems();
+ }
+ // When the page first begins to load, the Activity may still be
+ // paused, in which case showFakeTitleBar will do nothing. Call
+ // again as the page continues to load so that it will be shown.
+ // (Calling it will the fake title bar is already showing will also
+ // do nothing.
if (!mOptionsMenuOpen || mIconView) {
// This page has begun to load, so show the title bar
showFakeTitleBar();