Bug 1265433 - Pre: remove v11 prefixes from menus. r=sebastian, a=sledru
authorAndrzej Hunt <ahunt@mozilla.com>
Wed, 20 Apr 2016 10:28:21 +0200
changeset 333165 491692205417d9e1bd358608cbd959a179bfed2f
parent 333164 fae69cba7787806bba92333b34b202786cd04f0a
child 333166 7cca65b7ac18fe541df95a74f1f61910de01161f
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian, sledru
bugs1265433
milestone48.0a2
Bug 1265433 - Pre: remove v11 prefixes from menus. r=sebastian, a=sledru We only care about API >= 14, so there's no need for the pre-v11 menu. MozReview-Commit-ID: 9DdahLRXzpD
mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
mobile/android/base/resources/menu-large/browser_app_menu.xml
mobile/android/base/resources/menu-v11/browser_app_menu.xml
mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
mobile/android/base/resources/menu-xlarge/browser_app_menu.xml
mobile/android/base/resources/menu/browser_app_menu.xml
rename from mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
rename to mobile/android/base/resources/menu-large/browser_app_menu.xml
deleted file mode 100644
--- a/mobile/android/base/resources/menu-v11/browser_app_menu.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?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/. -->
-
-<!-- We disable AlwaysShowAction because we interpret the menu
-     attributes ourselves and thus the warning isn't relevant to us. -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-      xmlns:tools="http://schemas.android.com/tools"
-      tools:ignore="AlwaysShowAction">
-
-    <item android:id="@+id/back"
-          android:icon="@drawable/ic_menu_back"
-          android:title="@string/back"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/forward"
-          android:icon="@drawable/ic_menu_forward"
-          android:title="@string/forward"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
-          android:title="@string/reload"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/bookmark"
-          android:icon="@drawable/ic_menu_bookmark_add"
-          android:title="@string/bookmark"
-          android:showAsAction="ifRoom"/>
-
-    <item android:id="@+id/share"
-          android:icon="@drawable/ic_menu_share"
-          android:title="@string/share"
-          android:showAsAction="ifRoom"/>
-
-    <!-- We only show the quick share items so no need for an icon or title.
-
-         The visibility is changed dynamically for v14+ - hide for previous versions. -->
-    <item android:id="@+id/quickshare"
-          android:visible="false"
-          android:enabled="false"
-          android:visibility="gone"
-          android:showAsAction="collapseActionView"/>
-
-    <item android:id="@+id/new_tab"
-          android:title="@string/new_tab"/>
-
-    <item android:id="@+id/new_private_tab"
-          android:title="@string/new_private_tab"/>
-
-    <item android:id="@+id/bookmarks_list"
-          android:title="@string/bookmarks_title"/>
-
-    <item android:id="@+id/history_list"
-          android:title="@string/history_title"/>
-
-    <item android:id="@+id/find_in_page"
-          android:title="@string/find_in_page" />
-
-    <item android:id="@+id/desktop_mode"
-          android:title="@string/desktop_mode"
-          android:checkable="true" />
-
-    <item android:id="@+id/page"
-          android:title="@string/page">
-
-        <menu>
-
-            <item android:id="@+id/subscribe"
-                  android:title="@string/contextmenu_subscribe"/>
-
-            <item android:id="@+id/save_as_pdf"
-                  android:title="@string/save_as_pdf"/>
-
-            <item android:id="@+id/print"
-                  android:title="@string/print"/>
-
-            <item android:id="@+id/add_search_engine"
-                  android:title="@string/contextmenu_add_search_engine"/>
-
-            <item android:id="@+id/add_to_launcher"
-                  android:title="@string/contextmenu_add_to_launcher"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/tools"
-          android:title="@string/tools">
-
-        <menu>
-
-            <item android:id="@+id/downloads"
-                  android:title="@string/downloads"/>
-
-            <item android:id="@+id/addons"
-                  android:title="@string/addons"/>
-
-            <item android:id="@+id/logins"
-                  android:title="@string/logins"/>
-
-            <item android:id="@+id/new_guest_session"
-                  android:visible="false"
-                  android:title="@string/new_guest_session"/>
-
-            <item android:id="@+id/exit_guest_session"
-                  android:visible="false"
-                  android:title="@string/exit_guest_session"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/char_encoding"
-          android:visible="false"
-          android:title="@string/char_encoding"/>
-
-    <item android:id="@+id/settings"
-          android:title="@string/settings" />
-
-    <item android:id="@+id/help"
-          android:title="@string/help_menu" />
-
-</menu>
rename from mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
rename to mobile/android/base/resources/menu-xlarge/browser_app_menu.xml
--- a/mobile/android/base/resources/menu/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu/browser_app_menu.xml
@@ -1,107 +1,125 @@
 <?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">
+<!-- We disable AlwaysShowAction because we interpret the menu
+     attributes ourselves and thus the warning isn't relevant to us. -->
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+      xmlns:tools="http://schemas.android.com/tools"
+      tools:ignore="AlwaysShowAction">
+
+    <item android:id="@+id/back"
+          android:icon="@drawable/ic_menu_back"
+          android:title="@string/back"
+          android:showAsAction="always"/>
+
+    <item android:id="@+id/forward"
+          android:icon="@drawable/ic_menu_forward"
+          android:title="@string/forward"
+          android:showAsAction="always"/>
 
     <item android:id="@+id/reload"
-          android:title="@string/reload"/>
-
-    <!-- We keep the reference so calls to findView don't fail. Hide
-         to avoid taking up real estate on the users' screen. -->
-    <item android:id="@+id/back"
-          android:title="@string/back"
-          android:visible="false"/>
-
-    <item android:id="@+id/forward"
-          android:title="@string/forward"/>
+          android:icon="@drawable/ic_menu_reload"
+          android:title="@string/reload"
+          android:showAsAction="always"/>
 
     <item android:id="@+id/bookmark"
-          android:title="@string/bookmark"/>
+          android:icon="@drawable/ic_menu_bookmark_add"
+          android:title="@string/bookmark"
+          android:showAsAction="ifRoom"/>
+
+    <item android:id="@+id/share"
+          android:icon="@drawable/ic_menu_share"
+          android:title="@string/share"
+          android:showAsAction="ifRoom"/>
+
+    <!-- We only show the quick share items so no need for an icon or title.
+
+         The visibility is changed dynamically for v14+ - hide for previous versions. -->
+    <item android:id="@+id/quickshare"
+          android:visible="false"
+          android:enabled="false"
+          android:visibility="gone"
+          android:showAsAction="collapseActionView"/>
 
     <item android:id="@+id/new_tab"
           android:title="@string/new_tab"/>
 
     <item android:id="@+id/new_private_tab"
           android:title="@string/new_private_tab"/>
 
-    <item android:id="@+id/share"
-          android:title="@string/share" />
+    <item android:id="@+id/bookmarks_list"
+          android:title="@string/bookmarks_title"/>
+
+    <item android:id="@+id/history_list"
+          android:title="@string/history_title"/>
 
     <item android:id="@+id/find_in_page"
           android:title="@string/find_in_page" />
 
     <item android:id="@+id/desktop_mode"
           android:title="@string/desktop_mode"
           android:checkable="true" />
 
-    <item android:id="@+id/bookmarks_list"
-          android:title="@string/bookmarks_title"/>
-
-    <item android:id="@+id/history_list"
-          android:title="@string/history_title"/>
-
     <item android:id="@+id/page"
           android:title="@string/page">
 
         <menu>
+
             <item android:id="@+id/subscribe"
                   android:title="@string/contextmenu_subscribe"/>
 
             <item android:id="@+id/save_as_pdf"
                   android:title="@string/save_as_pdf"/>
 
             <item android:id="@+id/print"
                   android:title="@string/print"/>
 
             <item android:id="@+id/add_search_engine"
                   android:title="@string/contextmenu_add_search_engine"/>
 
             <item android:id="@+id/add_to_launcher"
                   android:title="@string/contextmenu_add_to_launcher"/>
+
         </menu>
 
     </item>
 
     <item android:id="@+id/tools"
           android:title="@string/tools">
 
         <menu>
+
             <item android:id="@+id/downloads"
                   android:title="@string/downloads"/>
+
             <item android:id="@+id/addons"
                   android:title="@string/addons"/>
+
             <item android:id="@+id/logins"
                   android:title="@string/logins"/>
+
             <item android:id="@+id/new_guest_session"
                   android:visible="false"
                   android:title="@string/new_guest_session"/>
+
             <item android:id="@+id/exit_guest_session"
                   android:visible="false"
                   android:title="@string/exit_guest_session"/>
+
         </menu>
 
     </item>
 
     <item android:id="@+id/char_encoding"
           android:visible="false"
           android:title="@string/char_encoding"/>
 
     <item android:id="@+id/settings"
           android:title="@string/settings" />
 
     <item android:id="@+id/help"
           android:title="@string/help_menu" />
 
-    <!-- Android will eliminate v11+ resource files from pre-11 builds.
-         Those files are the only place in which certain IDs are defined.
-         This causes compilation errors.
-         To avoid nasty code workarounds, we define stub IDs here, but
-         hide the menu entries. -->
-
-    <item android:id="@+id/quickshare"
-          android:visible="false"
-          android:enabled="false" />
-
 </menu>