Bug 1106935 - Remove NewTabletUI branches in NewTabletUI. r=mhaigh
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 02 Apr 2015 16:29:32 -0700
changeset 256507 dff4d833af14b53c8e1017497db038d0b6398a56
parent 256506 57c22ce3666a5f0774b3c9101e843bfb4f0495e2
child 256508 ce8b48cf665eb7fa3a46d17889a0c6edccdfd7b1
push id1483
push usermichael.l.comella@gmail.com
push dateFri, 10 Apr 2015 15:12:05 +0000
reviewersmhaigh
bugs1106935
milestone40.0a1
Bug 1106935 - Remove NewTabletUI branches in NewTabletUI. r=mhaigh
mobile/android/base/BrowserApp.java
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/new_tablet_ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/new_tablet_ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/new_tablet_ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/new_tablet_ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-v11/ic_menu_bookmark_add.xml
mobile/android/base/resources/drawable-xlarge-v11/ic_menu_bookmark_remove.xml
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/new_tablet_ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/new_tablet_ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/new_tablet_ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/new_tablet_ic_menu_bookmark_remove.png
mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -3082,24 +3082,16 @@ public class BrowserApp extends GeckoApp
         } else {
             enterGuestMode.setVisible(true);
         }
 
         return true;
     }
 
     private int resolveBookmarkIconID(final boolean isBookmark) {
-        if (NewTabletUI.isEnabled(this) && HardwareUtils.isLargeTablet()) {
-            if (isBookmark) {
-                return R.drawable.new_tablet_ic_menu_bookmark_remove;
-            } else {
-                return R.drawable.new_tablet_ic_menu_bookmark_add;
-            }
-        }
-
         if (isBookmark) {
             return R.drawable.ic_menu_bookmark_remove;
         } else {
             return R.drawable.ic_menu_bookmark_add;
         }
     }
 
     private int resolveBookmarkTitleID(final boolean isBookmark) {
@@ -3120,19 +3112,17 @@ public class BrowserApp extends GeckoApp
         Intent intent = null;
 
         final int itemId = item.getItemId();
 
         // Track the menu action. We don't know much about the context, but we can use this to determine
         // the frequency of use for various actions.
         Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.MENU, getResources().getResourceEntryName(itemId));
 
-        if (NewTabletUI.isEnabled(this)) {
-            mBrowserToolbar.cancelEdit();
-        }
+        mBrowserToolbar.cancelEdit();
 
         if (itemId == R.id.bookmark) {
             tab = Tabs.getInstance().getSelectedTab();
             if (tab != null) {
                 if (item.isChecked()) {
                     Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.MENU, "bookmark");
                     tab.removeBookmark();
                     item.setIcon(resolveBookmarkIconID(false));
rename from mobile/android/base/resources/drawable-xlarge-hdpi-v11/new_tablet_ic_menu_bookmark_add.png
rename to mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png
rename from mobile/android/base/resources/drawable-xlarge-hdpi-v11/new_tablet_ic_menu_bookmark_remove.png
rename to mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png
rename from mobile/android/base/resources/drawable-xlarge-mdpi-v11/new_tablet_ic_menu_bookmark_add.png
rename to mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png
rename from mobile/android/base/resources/drawable-xlarge-mdpi-v11/new_tablet_ic_menu_bookmark_remove.png
rename to mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png
deleted file mode 100644
--- a/mobile/android/base/resources/drawable-xlarge-v11/ic_menu_bookmark_add.xml
+++ /dev/null
@@ -1,8 +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/. -->
-
-<!-- Bug 1106935: Temporary replacement for old tablet resources -->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-        android:src="@null"/>
deleted file mode 100644
--- a/mobile/android/base/resources/drawable-xlarge-v11/ic_menu_bookmark_remove.xml
+++ /dev/null
@@ -1,8 +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/. -->
-
-<!-- Bug 1106935: Temporary replacement for old tablet resources -->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-        android:src="@null"/>
rename from mobile/android/base/resources/drawable-xlarge-xhdpi-v11/new_tablet_ic_menu_bookmark_add.png
rename to mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png
rename from mobile/android/base/resources/drawable-xlarge-xhdpi-v11/new_tablet_ic_menu_bookmark_remove.png
rename to mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png
rename from mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/new_tablet_ic_menu_bookmark_add.png
rename to mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_add.png
rename from mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/new_tablet_ic_menu_bookmark_remove.png
rename to mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_remove.png
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
@@ -16,17 +16,17 @@
           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/new_tablet_ic_menu_bookmark_add"
+          android:icon="@drawable/ic_menu_bookmark_add"
           android:title="@string/bookmark"
           android:showAsAction="always"/>
 
     <item android:id="@+id/reading_list"
           android:icon="@drawable/ic_menu_reader_add"
           android:title="@string/overlay_share_reading_list_btn_label"
           android:showAsAction="ifRoom"/>