Bug 1375351 - Part 4: Remove unused resources. r?nechen,walkingice draft
authorJing-wei Wu <topwu.tw@gmail.com>
Wed, 09 Aug 2017 13:25:19 +0800
changeset 643775 0164e0ea3c51f603a08f2728cc893bb7ea0e8c69
parent 643774 8837271111e0c2c08208941c0e3f5f535387087d
child 725393 1ed76675327a757392b32200fcead1b0a7618ac8
push id73202
push userbmo:topwu.tw@gmail.com
push dateThu, 10 Aug 2017 03:23:20 +0000
reviewersnechen, walkingice
bugs1375351
milestone57.0a1
Bug 1375351 - Part 4: Remove unused resources. r?nechen,walkingice Resources don't be used in Photon should be removed to prevent lint error. MozReview-Commit-ID: IKjeeM7NecP
mobile/android/app/src/main/res/color/tabs_counter_text_color.xml
mobile/android/app/src/main/res/color/toolbar_display_layout_bg.xml
mobile/android/app/src/main/res/drawable-hdpi/private_masq.png
mobile/android/app/src/main/res/drawable-hdpi/tabs_count.png
mobile/android/app/src/main/res/drawable-hdpi/tabs_count_foreground.png
mobile/android/app/src/main/res/drawable-large-hdpi-v11/tabs_count.png
mobile/android/app/src/main/res/drawable-large-hdpi-v11/tabs_count_foreground.png
mobile/android/app/src/main/res/drawable-large-v11/browser_toolbar_action_bar_button.xml
mobile/android/app/src/main/res/drawable-large-xhdpi-v11/tabs_count.png
mobile/android/app/src/main/res/drawable-large-xhdpi-v11/tabs_count_foreground.png
mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/tabs_count.png
mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/tabs_count_foreground.png
mobile/android/app/src/main/res/drawable-v17/url_bar_translating_edge.xml
mobile/android/app/src/main/res/drawable-xhdpi/private_masq.png
mobile/android/app/src/main/res/drawable-xhdpi/tabs_count.png
mobile/android/app/src/main/res/drawable-xhdpi/tabs_count_foreground.png
mobile/android/app/src/main/res/drawable-xxhdpi/private_masq.png
mobile/android/app/src/main/res/drawable/url_bar_translating_edge.xml
mobile/android/app/src/main/res/values/ids.xml
mobile/android/app/src/photon/res/color/tab_strip_item_bg.xml
mobile/android/app/src/photon/res/drawable-hdpi/urlbar_stop.png
mobile/android/app/src/photon/res/drawable-mdpi/urlbar_stop.png
mobile/android/app/src/photon/res/drawable-xhdpi/urlbar_stop.png
mobile/android/app/src/photon/res/drawable-xxhdpi/urlbar_stop.png
mobile/android/app/src/photon/res/drawable-xxxhdpi/urlbar_stop.png
mobile/android/app/src/photon/res/values-large/dimens.xml
mobile/android/app/src/photon/res/values-large/styles.xml
mobile/android/app/src/photon/res/values/dimens.xml
mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
mobile/android/base/java/org/mozilla/gecko/toolbar/PageActionLayout.java
deleted file mode 100644
--- a/mobile/android/app/src/main/res/color/tabs_counter_text_color.xml
+++ /dev/null
@@ -1,14 +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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-    <item gecko:state_private="true"
-          android:color="@color/tabs_tray_grey_pressed"/>
-
-    <item android:color="@color/toolbar_grey"/>
-
-</selector>
\ No newline at end of file
deleted file mode 100644
--- a/mobile/android/app/src/main/res/color/toolbar_display_layout_bg.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- These colors are defined from the drawables url_bar_entry_default_* -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-    <item gecko:state_private="true" android:color="@color/placeholder_active_grey"/>
-
-    <item android:color="#FFFFFF"/>
-
-</selector>
deleted file mode 100644
index 8791f24bc4c5a736583cee6efcb82bd7133416c6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c8db01a1aa80944b08d8cdaae8bfb096fdb1140a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c9b9c055b090145c6f82336590b8e8561e52fe1c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 7db22b0ca16024c8e2d50fa27bdc75f94576acba..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3875c80cc7b72d7c37382890408bf484d7cdf679..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/mobile/android/app/src/main/res/drawable-large-v11/browser_toolbar_action_bar_button.xml
+++ /dev/null
@@ -1,77 +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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-   <item gecko:state_private="true"
-         android:state_pressed="true"
-         android:state_enabled="true">
-
-        <inset android:insetTop="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/text_and_tabs_tray_grey"/>
-                <corners android:radius="@dimen/standard_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
-
-    <item gecko:state_private="true"
-          android:state_focused="true"
-          android:state_pressed="false">
-
-        <inset android:insetTop="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/placeholder_active_grey"/>
-                <corners android:radius="@dimen/standard_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
-
-    <item android:state_pressed="true"
-          android:state_enabled="true">
-
-        <inset android:insetTop="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/toolbar_grey_pressed"/>
-                <corners android:radius="@dimen/standard_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
-
-    <item android:state_focused="true"
-          android:state_pressed="false">
-
-        <inset android:insetTop="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetBottom="@dimen/tablet_browser_toolbar_menu_item_inset_vertical"
-               android:insetLeft="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal"
-               android:insetRight="@dimen/tablet_browser_toolbar_menu_item_inset_horizontal">
-            <shape android:shape="rectangle">
-                <solid android:color="@color/tablet_highlight_focused"/>
-                <corners android:radius="@dimen/standard_corner_radius"/>
-            </shape>
-        </inset>
-
-    </item>
-
-    <item>
-        <shape android:shape="rectangle">
-            <solid android:color="@android:color/transparent"/>
-        </shape>
-    </item>
-
-</selector>
deleted file mode 100644
index 16e41c0cef6ac90a1979cfb5f619d7a5aed5910e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 85dc05e4a62d64b23096f3465982fba85e645312..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index af9ee4d3ad40b028794f41c673b6d34cdc9c8521..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fa051203520b14607993e790fb23daaee3d2f96e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/mobile/android/app/src/main/res/drawable-v17/url_bar_translating_edge.xml
+++ /dev/null
@@ -1,9 +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/. -->
-
-<clip xmlns:android="http://schemas.android.com/apk/res/android"
-      android:drawable="@drawable/url_bar_entry"
-      android:clipOrientation="horizontal"
-      android:gravity="end"/>
\ No newline at end of file
deleted file mode 100644
index 5ea5f5beb972f5530f3aa6ea3e123acd8fba6d28..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index e4c71cb140cbef71ba0bad0ea112842d4d634637..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a5a75227cae0c6503242cfb6fabc3adf717ff593..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index e62cdbe137ce32dfb52bf157edbf74c7bd10291c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/mobile/android/app/src/main/res/drawable/url_bar_translating_edge.xml
+++ /dev/null
@@ -1,9 +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/. -->
-
-<clip xmlns:android="http://schemas.android.com/apk/res/android"
-      android:drawable="@drawable/url_bar_entry"
-      android:clipOrientation="horizontal"
-      android:gravity="right"/>
\ No newline at end of file
--- a/mobile/android/app/src/main/res/values/ids.xml
+++ b/mobile/android/app/src/main/res/values/ids.xml
@@ -18,12 +18,9 @@
     <item type="id" name="pref_header_search"/>
     <item type="id" name="updateServicePermissionNotification" />
     <item type="id" name="websiteContentNotification" />
     <item type="id" name="foregroundNotification" />
     <item type="id" name="actionbar"/>
     <item type="id" name="action_button"/>
     <item type="id" name="page_progress"/>
     <item type="id" name="mediaControlNotification"/>
-
-    <!-- add this id to make java code pass build. should be removed in Bug 1375351 -->
-    <item type="id" name="menu_icon"/>
 </resources>
deleted file mode 100644
--- a/mobile/android/app/src/photon/res/color/tab_strip_item_bg.xml
+++ /dev/null
@@ -1,48 +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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-	      xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-    <item android:state_pressed="true"
-          android:state_checked="true"
-          gecko:state_private="true"
-          android:color="@color/highlight_nav_pb" />
-
-    <item android:state_checked="true"
-          gecko:state_private="true"
-          android:color="@color/tabs_tray_grey_pressed" />
-
-    <item android:state_pressed="true"
-          gecko:state_private="true"
-          android:color="@color/highlight_dark_focused" />
-
-    <item android:state_pressed="true"
-          android:state_checked="true"
-          android:color="@color/toolbar_grey_pressed" />
-
-    <!-- Lightweight Themes -->
-    <item android:state_checked="true"
-          gecko:state_light="true"
-          android:color="@color/background_normal_lwt" />
-    <item android:state_checked="true"
-          gecko:state_dark="true"
-          android:color="@color/background_normal_lwt" />
-    <item android:state_pressed="true"
-          gecko:state_light="true"
-          android:color="@color/tablet_highlight_lwt" />
-    <item android:state_pressed="true"
-          gecko:state_dark="true"
-          android:color="@color/tablet_highlight_dark_lwt" />
-
-    <item android:state_checked="true"
-          android:color="@color/toolbar_grey" />
-
-    <item android:state_pressed="true"
-          android:color="@color/tabs_tray_grey_pressed" />
-
-    <item android:color="@android:color/transparent"/>
-
-</selector>
deleted file mode 100644
index fcab9694e128705342deebeb60334490647691ae..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 90ec73c02149aa546c0fb9eb73637a22802a7329..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 27c574a128f9bbe56d6e59ec760ff78809476f8d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b79f5f983dd2331c8e640af1421c54c6123c2220..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 19aee103578c54e8592da2695ab21ada908fee5b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/app/src/photon/res/values-large/dimens.xml
+++ b/mobile/android/app/src/photon/res/values-large/dimens.xml
@@ -17,22 +17,18 @@
     <dimen name="browser_toolbar_button_padding">16dp</dimen>
     <dimen name="browser_toolbar_icon_width">@dimen/browser_toolbar_height</dimen>
     <dimen name="browser_toolbar_menu_radius">4dp</dimen>
     <dimen name="browser_toolbar_favicon_size">16dp</dimen>
 
     <dimen name="browser_toolbar_image_button_width">56dp</dimen>
     <dimen name="browser_toolbar_image_button_h_spacing">4dp</dimen>
 
-    <dimen name="browser_toolbar_site_security_height">60dp</dimen>
     <dimen name="browser_toolbar_site_security_width">34dp</dimen>
     <dimen name="browser_toolbar_site_security_margin_end">6dp</dimen>
-    <!-- We primarily use padding (instead of margins) to increase the hit area. -->
-    <dimen name="browser_toolbar_site_security_padding_vertical">21dp</dimen>
-    <dimen name="browser_toolbar_site_security_padding_horizontal">8dp</dimen>
 
     <dimen name="firstrun_background_height">300dp</dimen>
 
     <dimen name="tabs_panel_indicator_width">96dp</dimen>
     <dimen name="tabs_panel_button_width">60dp</dimen>
     <dimen name="panel_grid_view_column_width">200dp</dimen>
 
     <dimen name="overlay_prompt_container_width">360dp</dimen>
--- a/mobile/android/app/src/photon/res/values-large/styles.xml
+++ b/mobile/android/app/src/photon/res/values-large/styles.xml
@@ -35,17 +35,16 @@
 
         <!-- Same as pre-19 Toast style, but with no left and right margins.
              They're removed since large tablets are never going to be only 400dp wide. -->
     </style>
 
     <style name="Widget.MenuItemActionBar">
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
-        <!--<item name="android:background">@drawable/browser_toolbar_action_bar_button</item>-->
         <item name="android:background">@drawable/action_bar_button</item>
         <item name="drawableTintList">@color/action_bar_menu_item_colors</item>
         <item name="android:scaleType">center</item>
 
         <!-- layout_width/height doesn't work here, likely because it's only
              added programmatically, so we use padding for the width instead.
              layout_height is set to MATCH_PARENT programmatically in
              org.mozilla.gecko.toolbar.BrowserToolbarTabletBase.addActionItem(View) -->
--- a/mobile/android/app/src/photon/res/values/dimens.xml
+++ b/mobile/android/app/src/photon/res/values/dimens.xml
@@ -55,18 +55,16 @@
     <dimen name="tablet_tab_strip_fading_edge_size">15dp</dimen>
     <dimen name="tablet_tab_strip_item_margin">0dp</dimen>
     <dimen name="tablet_tab_strip_divider_width">1dp</dimen>
     <dimen name="tablet_tab_strip_divider_height">30dp</dimen>
     <dimen name="tablet_tab_strip_divider_padding_bottom">6dp</dimen>
     <dimen name="tablet_browser_toolbar_menu_item_width">56dp</dimen>
     <!-- Padding combines with an 18dp image to form the menu item width and height. -->
     <dimen name="tablet_browser_toolbar_menu_item_padding_horizontal">19dp</dimen>
-    <dimen name="tablet_browser_toolbar_menu_item_inset_vertical">5dp</dimen>
-    <dimen name="tablet_browser_toolbar_menu_item_inset_horizontal">3dp</dimen>
     <dimen name="tablet_tab_strip_button_inset">5dp</dimen>
 
     <!-- Dimensions used by Favicons and FaviconView -->
     <dimen name="favicon_bg">112dp</dimen>
     <dimen name="favicon_corner_radius">2dp</dimen>
     <!-- Set the upper limit on the size of favicon that will be processed. Favicons larger than
          this will be downscaled to this value. If you need to use larger Favicons (Due to a UI
          redesign sometime after this is written) you should increase this value to the largest
@@ -81,21 +79,18 @@
     <dimen name="firstrun_min_height">120dp</dimen>
     <dimen name="firstrun_background_height">120dp</dimen>
 
     <dimen name="overlay_prompt_content_width">260dp</dimen>
     <dimen name="overlay_prompt_button_width">148dp</dimen>
     <dimen name="overlay_prompt_container_width">@dimen/match_parent</dimen>
 
     <!-- Site security icon -->
-    <dimen name="browser_toolbar_site_security_height">32dp</dimen>
     <dimen name="browser_toolbar_site_security_width">32dp</dimen>
     <dimen name="browser_toolbar_site_security_margin_end">0dp</dimen>
-    <dimen name="browser_toolbar_site_security_padding_vertical">7dp</dimen>
-    <dimen name="browser_toolbar_site_security_padding_horizontal">7dp</dimen>
 
     <!-- If one of these values changes, they all should. -->
     <dimen name="browser_toolbar_site_security_margin_bottom">.5dp</dimen>
     <dimen name="site_security_unknown_inset_top">1dp</dimen>
     <dimen name="site_security_unknown_inset_bottom">-1dp</dimen>
 
     <dimen name="home_folder_title_oneline_textsize">16sp</dimen>
     <dimen name="home_folder_title_twoline_textsize">14sp</dimen>
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
@@ -116,18 +116,16 @@ public abstract class BrowserToolbar ext
     protected final ToolbarEditLayout urlEditLayout;
     protected final View urlBarEntry;
     protected boolean isSwitchingTabs;
     protected final ThemedImageButton tabsButton;
 
     private ToolbarProgressView progressBar;
     protected final TabCounter tabsCounter;
     protected final View menuButton;
-    // bug 1375351: There is no menuIcon in Photon flavor, menuIcon should be removed
-    protected final ThemedImageView menuIcon;
     private MenuPopup menuPopup;
     protected final List<View> focusOrder;
 
     private OnActivateListener activateListener;
     private OnFocusChangeListener focusChangeListener;
     private OnStartEditingListener startEditingListener;
     private OnStopEditingListener stopEditingListener;
     private TouchEventInterceptor mTouchEventInterceptor;
@@ -188,17 +186,16 @@ public abstract class BrowserToolbar ext
         urlBarEntry = findViewById(R.id.url_bar_entry);
         urlEditLayout = (ToolbarEditLayout) findViewById(R.id.edit_layout);
 
         tabsButton = (ThemedImageButton) findViewById(R.id.tabs);
         tabsCounter = (TabCounter) findViewById(R.id.tabs_counter);
         tabsCounter.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
 
         menuButton = findViewById(R.id.menu);
-        menuIcon = (ThemedImageView) findViewById(R.id.menu_icon);
 
         // The focusOrder List should be filled by sub-classes.
         focusOrder = new ArrayList<View>();
 
         final Resources res = getResources();
         shadowSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_shadow_size);
 
         shadowPaint = new Paint();
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/PageActionLayout.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/PageActionLayout.java
@@ -52,29 +52,27 @@ public class PageActionLayout extends Th
         mContext = context;
         mLayout = this;
 
         mPageActionList = new ArrayList<PageAction>();
         setNumberShown(DEFAULT_PAGE_ACTIONS_SHOWN);
         refreshPageActionIcons();
     }
 
-    // Bug 1375351 - should change to protected after bug 1366704 land
     @Override
-    public void onAttachedToWindow() {
+    protected void onAttachedToWindow() {
         super.onAttachedToWindow();
 
         EventDispatcher.getInstance().registerUiThreadListener(this,
             "PageActions:Add",
             "PageActions:Remove");
     }
 
-    // Bug 1375351 - should change to protected after bug 1366704 land
     @Override
-    public void onDetachedFromWindow() {
+    protected void onDetachedFromWindow() {
         EventDispatcher.getInstance().unregisterUiThreadListener(this,
             "PageActions:Add",
             "PageActions:Remove");
 
         super.onDetachedFromWindow();
     }
 
     @Override