0

Android: Fix NoRedundantFieldInit warning for generated R.java files

We don't run Error Prone on these files, but we do when running
NullAwayAnnotator, and the warnings produced a lot of logs.

Bug: 40657579
Change-Id: I23ab00d3d6e929e1d1bb83921d9aa77d90bf506d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6134792
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401907}
This commit is contained in:
Andrew Grieve
2025-01-03 11:26:00 -08:00
committed by Chromium LUCI CQ
parent 076a4736c0
commit d011cf42ac

@ -714,7 +714,7 @@ public final class R {
public static {{ e.java_type }} {{ e.name }} = {{ e.value }};
{% endfor %}
{% for e in non_final_resources[resource_type] %}
{% if e.value != '0' %}
{% if e.value not in ('0', '0x0') %}
public static {{ e.java_type }} {{ e.name }} = {{ e.value }};
{% else %}
public static {{ e.java_type }} {{ e.name }};