Bug 821434: Tabs button shows persona on private mode. [r=mfinkle]
authorSriram Ramasubramanian <sriram@mozilla.com>
Thu, 13 Dec 2012 12:28:49 -0800
changeset 125214 38754d5fcc855c326d3dad1722346ccbff0aeb9a
parent 125213 11e5207523120ac832493e25647a049073950257
child 125215 061b5c0c55800091d0fdf2455d15a5ac10f9e1bc
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs821434
milestone20.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 821434: Tabs button shows persona on private mode. [r=mfinkle]
mobile/android/base/BrowserToolbar.java
mobile/android/base/TabsButton.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -1011,16 +1011,17 @@ public class BrowserToolbar implements V
 
             mAddressBarBg.setPrivateMode(tab.isPrivate());
 
             if (mAwesomeBar instanceof GeckoButton)
                 ((GeckoButton) mAwesomeBar).setPrivateMode(tab.isPrivate());
             else if (mAwesomeBar instanceof GeckoRelativeLayout)
                 ((GeckoRelativeLayout) mAwesomeBar).setPrivateMode(tab.isPrivate());
 
+            mTabs.setPrivateMode(tab.isPrivate());
             mTitle.setPrivateMode(tab.isPrivate());
             mMenu.setPrivateMode(tab.isPrivate());
 
             if (mBack instanceof BackButton)
                 ((BackButton) mBack).setPrivateMode(tab.isPrivate());
 
             if (mForward instanceof ForwardButton)
                 ((ForwardButton) mForward).setPrivateMode(tab.isPrivate());
--- a/mobile/android/base/TabsButton.java
+++ b/mobile/android/base/TabsButton.java
@@ -168,16 +168,17 @@ public class TabsButton extends ShapedBu
         if (drawable == null)
             return;
 
         Resources resources = this.getContext().getResources();
         LayerDrawable layers = new LayerDrawable(new Drawable[] { resources.getDrawable(R.drawable.tabs_tray_bg_repeat), drawable }); 
 
         StateListDrawable stateList = new StateListDrawable();
         stateList.addState(new int[] { android.R.attr.state_pressed }, resources.getDrawable(R.drawable.highlight));
+        stateList.addState(new int[] { R.attr.state_private }, resources.getDrawable(R.drawable.tabs_tray_bg_repeat));
         stateList.addState(new int[] {}, layers);
 
         LevelListDrawable levelList = new LevelListDrawable();
         levelList.addLevel(0, 1, stateList);
 
         // If there is a side bar, the expanded state will have a filled button.
         if (mSideBar)
             levelList.addLevel(2, 2, stateList);