Bug 1106935 - Remove new tablet branch in GeckoMenuInflater. r=mhaigh
☠☠ backed out by c17419e63808 ☠ ☠
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 03 Feb 2015 17:13:19 -0800
changeset 256739 319511aa757a5b3615b13bb86c62db3b4f4f17f2
parent 256738 78cb4369b3963aabac55172e3eac88010f67ffe3
child 256740 f292df38d7eb785980cb35ef3e2e2b93756934db
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1106935
milestone38.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 1106935 - Remove new tablet branch in GeckoMenuInflater. r=mhaigh
mobile/android/base/menu/GeckoMenuInflater.java
mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
--- a/mobile/android/base/menu/GeckoMenuInflater.java
+++ b/mobile/android/base/menu/GeckoMenuInflater.java
@@ -126,32 +126,17 @@ public class GeckoMenuInflater extends M
         item.id = a.getResourceId(R.styleable.MenuItem_android_id, NO_ID);
         item.order = a.getInt(R.styleable.MenuItem_android_orderInCategory, 0);
         item.title = a.getText(R.styleable.MenuItem_android_title);
         item.checkable = a.getBoolean(R.styleable.MenuItem_android_checkable, false);
         item.checked = a.getBoolean(R.styleable.MenuItem_android_checked, false);
         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);
         }
 
         a.recycle();
     }
 
--- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <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"/>
 
     <item android:id="@+id/back"
           android:icon="@drawable/ic_menu_back"
           android:title="@string/back"
           android:visible="false"/>
 
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <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"/>
 
     <item android:id="@+id/back"
           android:icon="@drawable/ic_menu_back"
           android:title="@string/back"
           android:visible="false"/>
 
     <item android:id="@+id/forward"
           android:icon="@drawable/ic_menu_forward"
           android:title="@string/forward"
           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"/>
 
     <item android:id="@+id/share"
           android:icon="@drawable/ic_menu_share"
           android:title="@string/share"
           android:showAsAction="ifRoom"/>