In many Chrome files, XML files have android:contentDescription="@null" attribute on ImageView/ImageButton tags. These were probably added to silence Lint warnings about ("Missing `contentDescription` attribute on image: ContentDescription [warning]").
These android:contentDescription="@null" attributes don't change behavior of ImageViews, as mContentDescription is already null by default for ImageView and ImageButton. However, these attributes do add some bytes to the APK size and they also need to be inflated.
There's a different way to explicitly silence this Lint error: by adding tools:ignore="ContentDescription". As far as I can tell from reading View and ImageView implementations, it gives the same behavior, but doesn't have extra costs in terms of binary size and CPU cycles during inflation.
There's one "but": https://developer.android.com/guide/topics/ui/accessibility/apps#label-elements recommends setting android:contentDescription="@null" on purely decorative ImageViews. However, I think for Chrome it makes sense to violate this recommendation and prefer tools:ignore="ContentDescription".
I've measured binary size effect and removing 102 android:contentDescription="@null" entries from Chrome XMLs has reduces the binary size by 2640 bytes.
Comment 1 by tedc...@chromium.org
, Jun 15 2018