Bug 712808: Redrawn URL bar needs to refresh its values [r=mfinkle a=akeybl]
authorSriram Ramasubramanian <sriram@mozilla.com>
Wed, 21 Dec 2011 15:58:36 -0800
changeset 84906 ffeb7909307f6c26cd3875e8592c7c00c457a415
parent 84905 d265066b0aecd6f4cc777572ec0545f45c0d12d6
child 84907 ffb813d220fbaeb5903bf08cf5b01ec2bbb311b6
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, akeybl
bugs712808
milestone11.0a2
Bug 712808: Redrawn URL bar needs to refresh its values [r=mfinkle a=akeybl]
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1845,16 +1845,28 @@ abstract public class GeckoApp
         super.onConfigurationChanged(newConfig);
 
         if (mOrientation != newConfig.orientation) {
             mOrientation = newConfig.orientation;
             mAutoCompletePopup.hide();
 
             if (Build.VERSION.SDK_INT >= 11) {
                 mBrowserToolbar = (BrowserToolbar) getLayoutInflater().inflate(R.layout.gecko_app_actionbar, null);
+
+                Tab tab = Tabs.getInstance().getSelectedTab();
+                if (tab != null) {
+                    mBrowserToolbar.setTitle(tab.getDisplayTitle());
+                    mBrowserToolbar.setFavicon(tab.getFavicon());
+                    mBrowserToolbar.setSecurityMode(tab.getSecurityMode());
+                    mBrowserToolbar.setProgressVisibility(tab.isLoading());
+                    mBrowserToolbar.setShadowVisibility(!(tab.getURL().startsWith("about:")));
+                    mBrowserToolbar.updateTabs(Tabs.getInstance().getCount());
+                }
+
+                GeckoActionBar.setBackgroundDrawable(this, getResources().getDrawable(R.drawable.gecko_actionbar_bg));
                 GeckoActionBar.setCustomView(mAppContext, mBrowserToolbar);
             }
         }
     }
 
     @Override
     public void onLowMemory()
     {