Bug 1263390 - Post: Add new unused resources to UnusedResourcesUtil. r?ahunt draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Thu, 28 Apr 2016 10:24:57 +0200
changeset 357240 a01af987bc1ecbbc180effdd9fb1b91ea74c94b3
parent 357238 3fa4433b9a15c10c7e4c3e0523ee25da1c6c1ced
child 519607 fc2ea6a151ff4b46b354a0a196e94dede9259318
push id16739
push users.kaspari@gmail.com
push dateThu, 28 Apr 2016 09:50:56 +0000
reviewersahunt
bugs1263390
milestone49.0a1
Bug 1263390 - Post: Add new unused resources to UnusedResourcesUtil. r?ahunt This is a temporary fix. The new plugin is able to find more unused resources. However we are not ready to remove all of them yet. Some of them will be in use again soon. This patch will add those files to UnusedResourcesUtil in order to suppress the lint error. MozReview-Commit-ID: 7X9Dee6hWDg
mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java
--- a/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java
+++ b/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java
@@ -83,9 +83,36 @@ final class UnusedResourcesUtil {
 
     public static final int[] USED_IN_PREFS = {
             R.xml.preferences_advanced,
             R.xml.preferences_accessibility,
             R.xml.preferences_home,
             R.xml.preferences_privacy,
             R.xml.preferences_privacy_clear_tablet,
     };
+
+    // We are migrating to Gradle 2.10 and the Android Gradle plugin 2.0. The new plugin does find
+    // more unused resources but we are not ready to remove them yet. Some of the resources are going
+    // to be reused soon. This is a temporary solution so that the gradle migration is not blocked.
+    // See bug 1263390 / bug 1268414.
+    public static final int[] TEMPORARY_UNUSED_WHILE_MIGRATING_GRADLE = {
+            R.color.remote_tabs_setup_button_background_hit,
+
+            R.drawable.remote_tabs_setup_button_background,
+
+            R.style.ActionBarThemeGeckoPreferences,
+            R.style.TabsPanelSectionBase,
+            R.style.TabsPanelSection,
+            R.style.TabsPanelItemBase,
+            R.style.TabsPanelItem,
+            R.style.TabsPanelItem_TextAppearance,
+            R.style.TabsPanelItem_TextAppearance_Header,
+            R.style.TabsPanelItem_TextAppearance_Linkified,
+            R.style.TabWidget,
+            R.style.GeckoDialogTitle,
+            R.style.GeckoDialogTitle_SubTitle,
+            R.style.RemoteTabsPanelItem,
+            R.style.RemoteTabsPanelItem_TextAppearance,
+            R.style.RemoteTabsPanelItem_TextAppearance_Header,
+            R.style.RemoteTabsPanelItem_TextAppearance_Linkified,
+            R.style.RemoteTabsPanelItem_Button,
+    };
 }