Hide fake title bar on scroll
Bug: 3293529
Hide the fake title bar when the page is scrolled, even if the user
opened it with the affordance
Change-Id: Id2606b0b5bb564e5e0e88557da4509b620c3f12c
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index 88209fe..32e19a1 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -238,16 +238,12 @@
public void onScroll(int visibleTitleHeight) {
if (mUseQuickControls) return;
// isLoading is using the current tab, which initially might not be set yet
- if (mTabControl.getCurrentTab() != null) {
- if ((mVisibleTitleHeight != 0) && (visibleTitleHeight == 0)
- && !isLoading()) {
- if (mUserRequestedUrlbar) {
- mUi.hideFakeTitleBar();
- } else {
- showTitleBarIndicator(true);
- }
- } else if ((mVisibleTitleHeight == 0) && (visibleTitleHeight != 0)
- && !isLoading()) {
+ if (mTabControl.getCurrentTab() != null
+ && !isLoading()) {
+ if (visibleTitleHeight == 0) {
+ mUi.hideFakeTitleBar();
+ showTitleBarIndicator(true);
+ } else {
showTitleBarIndicator(false);
}
}