From 6ac5bfda1a372219e469d965e94899d3b4895e0f Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 1 Jul 2011 17:02:55 -0700 Subject: Temporarily show title bar on setActiveTab Bug: 4988753 Change-Id: I59ea95c860bac6cbf33f5f4e3907a039e199430c --- src/com/android/browser/BaseUi.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index e2ad329..0777efd 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -250,6 +250,10 @@ public abstract class BaseUi implements UI, OnTouchListener { boolean incognito = mActiveTab.getWebView().isPrivateBrowsingEnabled(); getTitleBar().setIncognitoMode(incognito); updateAutoLogin(tab, false); + if (web != null && web.getVisibleTitleHeight() + != getTitleBar().getEmbeddedHeight()) { + showTitleBarForDuration(); + } } Tab getActiveTab() { @@ -819,6 +823,13 @@ public abstract class BaseUi implements UI, OnTouchListener { } } + private void showTitleBarForDuration() { + mHandler.removeMessages(MSG_HIDE_TITLEBAR); + showTitleBar(); + Message msg = Message.obtain(mHandler, MSG_HIDE_TITLEBAR); + mHandler.sendMessageDelayed(msg, HIDE_TITLEBAR_DELAY); + } + @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { -- cgit v1.1