Commit 72906d56 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Removing new tab button dead code

The new tab button doesn't have text next to it anymore.

Change-Id: Ic489fe7f5c2a83cbf9a7a55497cd2065c715df21
Reviewed-on: https://chromium-review.googlesource.com/1153846Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580000}
parent d1545fce
......@@ -29,7 +29,6 @@ import android.support.annotation.IntDef;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.view.MarginLayoutParamsCompat;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.support.v7.graphics.drawable.DrawableWrapper;
import android.text.TextUtils;
......@@ -45,7 +44,6 @@ import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
......@@ -495,21 +493,6 @@ public class ToolbarPhone extends ToolbarLayout
TabSwitcherDrawable.createTabSwitcherDrawable(getContext(), true);
mToggleTabStackButton.setImageDrawable(mTabSwitcherButtonDrawable);
mTabSwitcherModeViews.add(mNewTabButton);
// Ensure that the new tab button will not draw over the toolbar buttons if the
// translated string is long. Set a margin to the size of the toolbar button container
// for the new tab button.
WindowManager wm =
(WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
Point screenSize = new Point();
wm.getDefaultDisplay().getSize(screenSize);
mToolbarButtonsContainer.measure(
MeasureSpec.makeMeasureSpec(screenSize.x, MeasureSpec.AT_MOST),
MeasureSpec.makeMeasureSpec(screenSize.y, MeasureSpec.AT_MOST));
MarginLayoutParamsCompat.setMarginEnd(getFrameLayoutParams(mNewTabButton),
mToolbarButtonsContainer.getMeasuredWidth());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment