Bug 1091531 - Don't refresh sidebar state in new tablet UI (r=mhaigh)
authorLucas Rocha <lucasr@lucasr.org>
Tue, 04 Nov 2014 12:01:39 +0000
changeset 213962 e1b14ecffaab06dafd376dd12aaab486518d08c4
parent 213961 ad0e861aede41612292aacf024c143e084ecf882
child 213963 0a16d59bad1edf29c40f1de6dc16cbf129420f59
push id27769
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 03:53:35 +0000
treeherdermozilla-central@62990ec7ad78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1091531
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1091531 - Don't refresh sidebar state in new tablet UI (r=mhaigh)
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1321,20 +1321,24 @@ public class BrowserApp extends GeckoApp
                 if (mDynamicToolbar.isEnabled()) {
                     mDynamicToolbar.setVisible(visible, VisibilityTransition.IMMEDIATE);
                 }
             }
         });
     }
 
     private void updateSideBarState() {
+        if (NewTabletUI.isEnabled(this)) {
+            return;
+        }
+
         if (mMainLayoutAnimator != null)
             mMainLayoutAnimator.stop();
 
-        boolean isSideBar = !NewTabletUI.isEnabled(this) && (HardwareUtils.isTablet() && getOrientation() == Configuration.ORIENTATION_LANDSCAPE);
+        boolean isSideBar = (HardwareUtils.isTablet() && getOrientation() == Configuration.ORIENTATION_LANDSCAPE);
         final int sidebarWidth = getResources().getDimensionPixelSize(R.dimen.tabs_sidebar_width);
 
         ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mTabsPanel.getLayoutParams();
         lp.width = (isSideBar ? sidebarWidth : ViewGroup.LayoutParams.MATCH_PARENT);
         mTabsPanel.requestLayout();
 
         final boolean sidebarIsShown = (isSideBar && mTabsPanel.isShown());
         final int mainLayoutScrollX = (sidebarIsShown ? -sidebarWidth : 0);