Bug 1378032 - Don't call setTabsCounterPrivateMode on Tablet in Photon. r=walkingice

In Photon, TabCounter has a new design and implementation which handles itself
private mode visual refresh by calling `TabCounter#setPrivateMode(boolean)`.

So we shouldn't call setTabsCounterPrivateMode anymore in BrowserToolbarTabletBase.

MozReview-Commit-ID: LKu4OiTQyJV

--HG--
extra : rebase_source : c31216fcc50e2c8aeadbd03773968c90b5b2f585
This commit is contained in:
jwu 2017-07-04 11:07:53 +08:00
parent 6a0985654f
commit b645d4560e

View File

@ -11,6 +11,7 @@ import android.support.v4.content.ContextCompat;
import org.mozilla.gecko.R;
import org.mozilla.gecko.Tab;
import org.mozilla.gecko.Tabs;
import org.mozilla.gecko.skin.SkinConfig;
import org.mozilla.gecko.tabs.TabHistoryController;
import org.mozilla.gecko.menu.MenuItemActionBar;
import org.mozilla.gecko.util.HardwareUtils;
@ -145,11 +146,13 @@ abstract class BrowserToolbarTabletBase extends BrowserToolbar {
public void setPrivateMode(final boolean isPrivate) {
super.setPrivateMode(isPrivate);
// If we had backgroundTintList, we could remove the colorFilter
// code in favor of setPrivateMode (bug 1197432).
final PorterDuffColorFilter colorFilter =
isPrivate ? privateBrowsingTabletMenuItemColorFilter : null;
setTabsCounterPrivateMode(isPrivate, colorFilter);
if (SkinConfig.isAustralis()) {
// If we had backgroundTintList, we could remove the colorFilter
// code in favor of setPrivateMode (bug 1197432).
final PorterDuffColorFilter colorFilter =
isPrivate ? privateBrowsingTabletMenuItemColorFilter : null;
setTabsCounterPrivateMode(isPrivate, colorFilter);
}
backButton.setPrivateMode(isPrivate);
forwardButton.setPrivateMode(isPrivate);