Bug 1106935 - Remove new tablet branch in GeckoMenuInflater. r=mhaigh

--HG--
extra : rebase_source : 87bc1c15c03b7d18362a2a00ee37a65664632f83
This commit is contained in:
Michael Comella 2015-02-03 17:13:19 -08:00
parent 4cfb5fd273
commit 42b68fe8c1
3 changed files with 4 additions and 19 deletions

View File

@ -131,22 +131,7 @@ public class GeckoMenuInflater extends MenuInflater {
item.visible = a.getBoolean(R.styleable.MenuItem_android_visible, true);
item.enabled = a.getBoolean(R.styleable.MenuItem_android_enabled, true);
item.hasSubMenu = false;
// TODO: (bug 1058909) Remove this branch when we remove old tablet. We do this to
// avoid using a new menu resource for new tablet.
final int iconResID;
if (!NewTabletUI.isEnabled(mContext)) {
iconResID = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
} else {
if (item.id == R.id.reload) {
iconResID = R.drawable.new_tablet_ic_menu_reload;
} else if (HardwareUtils.isLargeTablet() && item.id == R.id.bookmark) {
iconResID = R.drawable.new_tablet_ic_menu_bookmark_add;
} else {
iconResID = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
}
}
item.iconRes = iconResID;
item.iconRes = a.getResourceId(R.styleable.MenuItem_android_icon, 0);
if (Versions.feature11Plus) {
item.showAsAction = a.getInt(R.styleable.MenuItem_android_showAsAction, 0);

View File

@ -6,7 +6,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/reload"
android:icon="@drawable/ic_menu_reload"
android:icon="@drawable/new_tablet_ic_menu_reload"
android:title="@string/reload"
android:showAsAction="always"/>

View File

@ -6,7 +6,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/reload"
android:icon="@drawable/ic_menu_reload"
android:icon="@drawable/new_tablet_ic_menu_reload"
android:title="@string/reload"
android:showAsAction="always"/>
@ -21,7 +21,7 @@
android:visible="false"/>
<item android:id="@+id/bookmark"
android:icon="@drawable/ic_menu_bookmark_add"
android:icon="@drawable/new_tablet_ic_menu_bookmark_add"
android:title="@string/bookmark"
android:showAsAction="always"/>