[Linter: IconDuplicatesConfig] Correct icons duplicated across configurations

NEW
Unassigned

Status

()

Firefox for Android
General
3 years ago
2 years ago

People

(Reporter: mcomella, Unassigned)

Tracking

(Blocks: 3 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

via lint:

IconDuplicatesConfig: Identical bitmaps across various configurations
../../src/main/res/drawable-xhdpi-v11/alert_addon.png: The alert_addon.png icon has identical contents in the following configuration folders: drawable-hdpi-v11, drawable-xhdpi-v11



	
xhdpi-v11	hdpi-v11
../../src/main/res/drawable-xhdpi-v11/alert_app.png: The alert_app.png icon has identical contents in the following configuration folders: drawable-hdpi-v11, drawable-xhdpi-v11



	
xhdpi-v11	hdpi-v11
../../src/main/res/drawable-xhdpi/alert_app_animation_1.png: The alert_app_animation_1.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_2.png: The alert_app_animation_2.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_3.png: The alert_app_animation_3.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_4.png: The alert_app_animation_4.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_5.png: The alert_app_animation_5.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_6.png: The alert_app_animation_6.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_app_animation_7.png: The alert_app_animation_7.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi-v11/alert_download.png: The alert_download.png icon has identical contents in the following configuration folders: drawable-hdpi-v11, drawable-xhdpi-v11



	
xhdpi-v11	hdpi-v11
../../src/main/res/drawable-xhdpi/alert_download_animation_1.png: The alert_download_animation_1.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_download_animation_2.png: The alert_download_animation_2.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_download_animation_3.png: The alert_download_animation_3.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_download_animation_4.png: The alert_download_animation_4.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_download_animation_5.png: The alert_download_animation_5.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-xhdpi/alert_download_animation_6.png: The alert_download_animation_6.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-xhdpi



	
xhdpi	hdpi
../../src/main/res/drawable-mdpi/home_tab_menu_strip.9.png: The home_tab_menu_strip.9.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-mdpi



	
hdpi	mdpi
../../src/main/res/drawable-xhdpi/tab_indicator_divider.9.png: The tab_indicator_divider.9.png icon has identical contents in the following configuration folders: drawable-hdpi, drawable-mdpi, drawable-xhdpi



		
xhdpi	hdpi	mdpi
Priority: 5 / 10
Category: Usability:Icons
Severity: Warning
Explanation: Identical bitmaps across various configurations.
If an icon is provided under different configuration parameters such as drawable-hdpi or -v11, they should typically be different. This detector catches cases where the same icon is provided in different configuration folder which is usually not intentional. 

---

Anthony, looking at alert_addon, it seems we have a proper mdpi (24x24) and xhdpi (48x48) but hdpi is also 48x48 – can you either audit these assets and provide the proper asset where it's missing, or just re-export these assets in the appropriate sizes?
Flags: needinfo?(alam)
Sorry, I'm a bit confused about the context here and what I should be looking at.. Could you elaborate a bit more about the ask here Mike?
Flags: needinfo?(michael.l.comella)
For the alert_addon asset, xhdpi [1] and hdpi [2] are the same image, but shouldn't be. Can you re-export the assets listed in comment 0 so that we have the proper size assets for each density? This could save us some KBs (if we used the xhdpi for hdpi).

[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/drawable-xhdpi/alert_addon.png
[2]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/drawable-hdpi/alert_addon.png
Flags: needinfo?(michael.l.comella)
Where is "alert_addon" being used? 

I can't find this icon in my files and there looks to be a gradient on it. I can create a new one. I just want to know where I can see this so I have some context.
Flags: needinfo?(michael.l.comella)
Created attachment 8649009 [details]
alert_addon

(In reply to Anthony Lam (:antlam) from comment #3)
> Where is "alert_addon" being used? 

It's used in the toast for when an addon is installed (see attached).

Additionally, the duplicate icon density problem also applies to alert_app [1] and the animations for both alert_app and alert_download. I'm a bit concerned at the APK size hit to animate these at full resolution because there are so many of them (though we can always add the icons and see the difference). We can also consider shipping these animations on Honeycomb+ builds.

[1]: http://mxr.mozilla.org/mozilla-central/find?text=&string=alert_app
Flags: needinfo?(michael.l.comella)
Mike, is this still an issue? I see my snackbars don't have the icons since bug 1157526 landed.
Flags: needinfo?(alam) → needinfo?(michael.l.comella)
(In reply to Anthony Lam (:antlam) from comment #5)
> Mike, is this still an issue? I see my snackbars don't have the icons since
> bug 1157526 landed.

Yes – it's not just limited to `alert_addon` (which is now removed). The current list:

../../../../../../../mobile/android/base/resources/drawable-xhdpi-v11/alert_app.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_2.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_3.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_4.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_5.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_6.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_app_animation_7.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi-v11/alert_download.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png
../../../../../../../mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png
Flags: needinfo?(michael.l.comella)
You need to log in before you can comment on or make changes to this bug.