fix scroll callback for webview
http://b/issue?id=3377268
added check to see if state changed
Change-Id: Ic367144fb7bacb809e8acc7772298129d5c30388
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index b0057ed..1ab02ed 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -230,6 +230,17 @@
}
}
+ boolean showsTitleBarIndicator() {
+ Tab tab = mTabControl.getCurrentTab();
+ if (tab != null) {
+ TabView tv = mTabMap.get(tab);
+ if (tv != null) {
+ return tv.showsIndicator();
+ }
+ }
+ return false;
+ }
+
// callback after fake titlebar is shown
void onShowTitleBar() {
showTitleBarIndicator(false);
@@ -251,10 +262,14 @@
if (mTabControl.getCurrentTab() != null
&& !isLoading()) {
if (visibleTitleHeight == 0) {
- mUi.hideFakeTitleBar();
- showTitleBarIndicator(true);
+ if (!showsTitleBarIndicator()) {
+ mUi.hideFakeTitleBar();
+ showTitleBarIndicator(true);
+ }
} else {
- showTitleBarIndicator(false);
+ if (showsTitleBarIndicator()) {
+ showTitleBarIndicator(false);
+ }
}
}
mVisibleTitleHeight = visibleTitleHeight;
@@ -336,6 +351,10 @@
}
}
+ boolean showsIndicator() {
+ return (mIndicator.getVisibility() == View.VISIBLE);
+ }
+
@Override
public void onClick(View v) {
if (v == mClose) {