Fix last remaining unused resources without rationale |
||||
Issue description
Some have crept in during the last lint upgrade. Fix these or add rationale:
<ignore regexp="ui/android/java/res/values/colors.xml"/>
<ignore regexp="ui/android/java/res/values/dimens.xml"/>
<ignore regexp="ui/android/java/res/values-v17/styles.xml"/>
<ignore regexp="chrome/android/java/res/anim/fullscreen_notification_in.xml"/>
<ignore regexp="chrome/android/java/res/values-v17/styles.xml"/>
<ignore regexp="chrome/android/java/res/values-v21/styles.xml"/>
,
Jan 26 2018
There are a number of expected unused resources in these files that huayinz@ added as part of our effort to unify and restrict text styles in Chrome. They should all be annotated with tools:ignore="UnusedResources", though. If there's some we missed that are related to the text styles we can go back and add the annotations. If there are non-text style resources being flagged as unused we'll need to investigate to determine what to do.
<ignore regexp="ui/android/java/res/values/colors.xml"/>
<ignore regexp="ui/android/java/res/values/dimens.xml"/>
<ignore regexp="ui/android/java/res/values-v17/styles.xml"/>
This is used in chrome/android/java/res/values-v17/styles.xml for FullscreenNotificationBubble, which appears to be unused. We can probably remove the style and the animation XML. [i]
<ignore regexp="chrome/android/java/res/anim/fullscreen_notification_in.xml"/>
Are there specific resources in that are being flagged as used?
<ignore regexp="chrome/android/java/res/values-v17/styles.xml"/>
<ignore regexp="chrome/android/java/res/values-v21/styles.xml"/>
[i] Usage was removed in this CL https://chromium.googlesource.com/chromium/src/+/a224d9458b3ba16f814bed2c925b07c36ad27ea7
,
Jan 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/78988928ff8dd13b8fd16017c617ee5ad76c7cd8 commit 78988928ff8dd13b8fd16017c617ee5ad76c7cd8 Author: Peter Wen <wnwen@chromium.org> Date: Mon Jan 29 15:16:52 2018 Android: Remove unused strings Update suppressions from android_tools upgrades resulting in unused resources (mostly strings) being left behind after their feature is removed. Also update some suppressions as expected. BUG= 799070 , 806060 TBR=nyquist@chromium.org Change-Id: I30d35320ad20b318a921972529f139b3b3e65453 Reviewed-on: https://chromium-review.googlesource.com/886863 Commit-Queue: Peter Wen <wnwen@chromium.org> Reviewed-by: Peter Wen <wnwen@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#532433} [modify] https://crrev.com/78988928ff8dd13b8fd16017c617ee5ad76c7cd8/build/android/lint/suppressions.xml [modify] https://crrev.com/78988928ff8dd13b8fd16017c617ee5ad76c7cd8/chrome/android/java/res/values/dimens.xml [modify] https://crrev.com/78988928ff8dd13b8fd16017c617ee5ad76c7cd8/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/78988928ff8dd13b8fd16017c617ee5ad76c7cd8/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TranslateUtil.java
,
Jan 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4719ef1a70a4f19bf8546d124e684074450f5985 commit 4719ef1a70a4f19bf8546d124e684074450f5985 Author: Peter Wen <wnwen@chromium.org> Date: Mon Jan 29 16:42:04 2018 Revert "Android: Remove unused strings" This reverts commit 78988928ff8dd13b8fd16017c617ee5ad76c7cd8. Reason for revert: Broke clank downstream unused resources Original change's description: > Android: Remove unused strings > > Update suppressions from android_tools upgrades resulting in unused > resources (mostly strings) being left behind after their feature is > removed. > > Also update some suppressions as expected. > > BUG= 799070 , 806060 > TBR=nyquist@chromium.org > > Change-Id: I30d35320ad20b318a921972529f139b3b3e65453 > Reviewed-on: https://chromium-review.googlesource.com/886863 > Commit-Queue: Peter Wen <wnwen@chromium.org> > Reviewed-by: Peter Wen <wnwen@chromium.org> > Reviewed-by: Theresa <twellington@chromium.org> > Cr-Commit-Position: refs/heads/master@{#532433} TBR=nyquist@chromium.org,wnwen@chromium.org,twellington@chromium.org Change-Id: I0681082ac3fdfe80d1ad6f3ba182e81f75678dce No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 799070 , 806060 Reviewed-on: https://chromium-review.googlesource.com/890660 Reviewed-by: Peter Wen <wnwen@chromium.org> Commit-Queue: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/master@{#532458} [modify] https://crrev.com/4719ef1a70a4f19bf8546d124e684074450f5985/build/android/lint/suppressions.xml [modify] https://crrev.com/4719ef1a70a4f19bf8546d124e684074450f5985/chrome/android/java/res/values/dimens.xml [modify] https://crrev.com/4719ef1a70a4f19bf8546d124e684074450f5985/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/4719ef1a70a4f19bf8546d124e684074450f5985/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TranslateUtil.java
,
Jan 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/694bf0eb3c5de0a290054716b548e4cadf9284ee commit 694bf0eb3c5de0a290054716b548e4cadf9284ee Author: Peter Wen <wnwen@chromium.org> Date: Mon Jan 29 18:54:57 2018 Reland "Android: Remove unused strings" Original CL: https://chromium-review.googlesource.com/886863 Fix: - Suppress unused resources for clank/ widgets BUG= 799070 , 806060 TBR=nyquist@chromium.org,twellington@chromium.org Change-Id: Id42c5a626f4a0754bea3d4db7a10af9756c0002d Reviewed-on: https://chromium-review.googlesource.com/891339 Commit-Queue: Peter Wen <wnwen@chromium.org> Reviewed-by: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/master@{#532516} [modify] https://crrev.com/694bf0eb3c5de0a290054716b548e4cadf9284ee/build/android/lint/suppressions.xml [modify] https://crrev.com/694bf0eb3c5de0a290054716b548e4cadf9284ee/chrome/android/java/res/values/dimens.xml [modify] https://crrev.com/694bf0eb3c5de0a290054716b548e4cadf9284ee/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/694bf0eb3c5de0a290054716b548e4cadf9284ee/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TranslateUtil.java
,
Jan 31 2018
Here are the chrome_java unused resources:
chrome/android/java/res/values-v21/styles.xml:116 The resource `R.style.PopupWindow_LowEnd` appears to be unused: UnusedResources [warning]
<style name="PopupWindow.LowEnd" parent="android:Widget.Material.Light.PopupWindow">
~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:406 The resource `R.style.MediaNotificationTitle` appears to be unused: UnusedResources [warning]
name="MediaNotificationTitle" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:409 The resource `R.style.MediaNotificationText` appears to be unused: UnusedResources [warning]
name="MediaNotificationText"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:412 The resource `R.style.RemoteNotificationTitle` appears to be unused: UnusedResources [warning]
name="RemoteNotificationTitle"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:415 The resource `R.style.RemoteNotificationText` appears to be unused: UnusedResources [warning]
name="RemoteNotificationText"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:418 The resource `R.style.RemoteNotificationProgressBar` appears to be unused: UnusedResources [warning]
name="RemoteNotificationProgressBar"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:603 The resource `R.style.LocationBarMenuButton` appears to be unused: UnusedResources [warning]
<style name="LocationBarMenuButton" parent="LocationBarButton">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:679 The resource `R.style.ListMenuStyle` appears to be unused: UnusedResources [warning]
<style name="ListMenuStyle" parent="Widget.AppCompat.ListPopupWindow">
~~~~~~~~~~~~~~~~~~~~
,
Jan 31 2018
Here are the ui_java unused resources:
ui/android/java/res/values/colors.xml:13 The resource `R.color.google_blue_300` appears to be unused: UnusedResources [warning]
<color name="google_blue_300">#7BAAF7</color>
~~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values/colors.xml:14 The resource `R.color.google_blue_500` appears to be unused: UnusedResources [warning]
<color name="google_blue_500">#4285F4</color>
~~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values/dimens.xml:10 The resource `R.dimen.headline_size_medium` appears to be unused: UnusedResources [warning]
<dimen name="headline_size_medium">20sp</dimen>
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:54 The resource `R.style.BlackHeadline2` appears to be unused: UnusedResources [warning]
<style name="BlackHeadline2" parent="RobotoMediumStyle"> ~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:62 The resource `R.style.BlackTitle2` appears to be unused: UnusedResources [warning]
<style name="BlackTitle2" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:98 The resource `R.style.BlackButtonText` appears to be unused: UnusedResources [warning]
<style name="BlackButtonText" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:113 The resource `R.style.WhiteHeadline2` appears to be unused: UnusedResources [warning]
<style name="WhiteHeadline2" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:129 The resource `R.style.WhiteTitle2` appears to be unused: UnusedResources [warning]
<style name="WhiteTitle2" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:140 The resource `R.style.BlueButtonText1` appears to be unused: UnusedResources [warning]
<style name="BlueButtonText1" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~~~~~
ui/android/java/res/values-v17/styles.xml:144 The resource `R.style.BlueButtonText2` appears to be unused: UnusedResources [warning]
<style name="BlueButtonText2" parent="RobotoMediumStyle">
~~~~~~~~~~~~~~~~~~~~~~
,
Jan 31 2018
I'm not sure about this one
chrome/android/java/res/values-v21/styles.xml:116 The resource `R.style.PopupWindow_LowEnd` appears to be unused: UnusedResources [warning]
<style name="PopupWindow.LowEnd" parent="android:Widget.Material.Light.PopupWindow">
~~~~~~~~~~~~~~~~~~~~~~~~~
The media and remove styles that are unused can probably be removed
chrome/android/java/res/values-v17/styles.xml:406 The resource `R.style.MediaNotificationTitle` appears to be unused: UnusedResources [warning]
name="MediaNotificationTitle" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:409 The resource `R.style.MediaNotificationText` appears to be unused: UnusedResources [warning]
name="MediaNotificationText"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:412 The resource `R.style.RemoteNotificationTitle` appears to be unused: UnusedResources [warning]
name="RemoteNotificationTitle"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:415 The resource `R.style.RemoteNotificationText` appears to be unused: UnusedResources [warning]
name="RemoteNotificationText"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:418 The resource `R.style.RemoteNotificationProgressBar` appears to be unused: UnusedResources [warning]
name="RemoteNotificationProgressBar"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chrome/android/java/res/values-v17/styles.xml:603 The resource `R.style.LocationBarMenuButton` appears to be unused: UnusedResources [warning]
<style name="LocationBarMenuButton" parent="LocationBarButton">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This can definitely be removed:
chrome/android/java/res/values-v17/styles.xml:679 The resource `R.style.ListMenuStyle` appears to be unused: UnusedResources [warning]
<style name="ListMenuStyle" parent="Widget.AppCompat.ListPopupWindow">
~~~~~~~~~~~~~~~~~~~~
The ui_java unused resource warnings should be suppressed.
,
Feb 1 2018
Thank you Theresa, I'll suppress the ui_java ones and try removing as many of the other ones as I can.
,
Feb 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be commit d9e95344fb0ec1680fc3416a1cbdbc5272ab97be Author: Peter Wen <wnwen@chromium.org> Date: Thu Feb 01 22:13:37 2018 Android: Remove more unused resources ui_java resources are intended to be used later. Other resources were no longer being used. Bug: 806060 Change-Id: Ifde5a469adc0453e65483d6988dcbb3dc4a1a876 Reviewed-on: https://chromium-review.googlesource.com/896405 Commit-Queue: Peter Wen <wnwen@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#533830} [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/build/android/lint/suppressions.xml [delete] https://crrev.com/a0dae6504945b7d6d81ede22b87e0ca7cbca5124/chrome/android/java/res/anim/fullscreen_notification_in.xml [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/chrome/android/java/res/values-v17/styles.xml [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/chrome/android/java/res/values-v21/styles.xml [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/ui/android/java/res/values-v17/styles.xml [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/ui/android/java/res/values/colors.xml [modify] https://crrev.com/d9e95344fb0ec1680fc3416a1cbdbc5272ab97be/ui/android/java/res/values/dimens.xml
,
Feb 1 2018
Lint failed on the Android x64 bot due to the patch in #10 https://uberchromegw.corp.google.com/i/chromium.android/builders/Android%20x64%20Builder%20%28dbg%29/builds/26140 Lint found 2 errors chrome/android/java/res/values-v17/styles.xml:62 The resource `R.style.VrSupportTheme` appears to be unused: UnusedResources [warning] <style name="VrSupportTheme" parent="MainTheme"> ~~~~~~~~~~~~~~~~~~~~~ chrome/android/java/res/values-v17/styles.xml:72 The resource `R.style.VrSupportThemeLauncher` appears to be unused: UnusedResources [warning] <style name="VrSupportThemeLauncher" parent="@android:style/Theme.NoDisplay"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lint found 2 new issues. I have a CL in the CQ [i] to add specific suppression for the 2 VR themes. They are used in AndroidManifest.xml, but only when vr is enabled. [i] https://chromium-review.googlesource.com/c/chromium/src/+/898410
,
Feb 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ef5cd4e831c21078301be64db6906ac2878651a5 commit ef5cd4e831c21078301be64db6906ac2878651a5 Author: Theresa <twellington@chromium.org> Date: Fri Feb 02 01:19:21 2018 Add lint suppression for conditionally used VR theme Compilation on some bots started failing due to the removal of a broad lint suppression for values-v17/styles.xml. This CL adds back lint suppression for a conditionally used VR theme. BUG= 806060 TBR=wnwen@chromium.org Change-Id: I7756f07f35c272937a9fbbeae22500d0f73944a6 Reviewed-on: https://chromium-review.googlesource.com/898410 Commit-Queue: Theresa <twellington@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#533891} [modify] https://crrev.com/ef5cd4e831c21078301be64db6906ac2878651a5/build/android/lint/suppressions.xml
,
Feb 5 2018
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/243103908664fc4cb53f96307ea38ecd193c24fb commit 243103908664fc4cb53f96307ea38ecd193c24fb Author: Andrew Grieve <agrieve@chromium.org> Date: Tue Feb 06 05:44:49 2018 Android: Move VR-specific styles into res_vr/ This allows removing the android lint suppression for them. Bug: 806060 Change-Id: Ibdfd421f4a1714c64fecb0f2c1349a7af033ef91 Reviewed-on: https://chromium-review.googlesource.com/900047 Reviewed-by: Theresa <twellington@chromium.org> Commit-Queue: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#534639} [modify] https://crrev.com/243103908664fc4cb53f96307ea38ecd193c24fb/build/android/lint/suppressions.xml [modify] https://crrev.com/243103908664fc4cb53f96307ea38ecd193c24fb/chrome/android/java/res/values-v17/styles.xml [add] https://crrev.com/243103908664fc4cb53f96307ea38ecd193c24fb/chrome/android/java/res_vr/values-v17/vr_styles.xml |
||||
►
Sign in to add a comment |
||||
Comment 1 by wnwen@chromium.org
, Jan 25 2018