Bug 1872229 - Fix minor lint check failures in android-components r=android-reviewers,mcarare,webcompat-reviewers,twisniewski

We have moved more lint checks upstream to AC and these failures are
trivial to solve, rather than try to suppress.

Differential Revision: https://phabricator.services.mozilla.com/D236392
This commit is contained in:
Jonathan Almeida
2025-04-09 22:32:23 +00:00
parent ba490cbb60
commit 9956a54ab3
128 changed files with 1645 additions and 40 deletions

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.9.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.9.1)" variant="all" version="8.9.1">
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" val background = ContextCompat.getDrawable(this, R.drawable.focus_background)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="150"
column="26"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" val background = ContextCompat.getDrawable(this, R.drawable.focus_background)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="260"
column="26"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" ContextCompat.getDrawable(this, R.drawable.fenix_url_background),"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="372"
column="13"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" ContextCompat.getDrawable(this, R.drawable.fenix_url_background),"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="413"
column="13"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" ContextCompat.getDrawable(this, iconsR.drawable.mozac_ic_search_24)!!,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="416"
column="13"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" val drawableIcon = ContextCompat.getDrawable(this, iconsR.drawable.mozac_ic_cross_24)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="466"
column="28"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" val drawable = ContextCompat.getDrawable(this, iconsR.drawable.mozac_ic_share_android_24)?.apply {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="480"
column="24"/>
</issue>
<issue
id="UnsafeCompatGetDrawable"
message="This call can lead to crashes, replace with AppCompatResources.getDrawable"
errorLine1=" icon = ContextCompat.getDrawable("
errorLine2=" ^">
<location
file="src/main/java/org/mozilla/samples/toolbar/ToolbarActivity.kt"
line="554"
column="56"/>
</issue>
<issue
id="MonochromeLauncherIcon"
message="The application adaptive icon is missing a monochrome tag"
errorLine1="&lt;adaptive-icon xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2="^">
<location
file="src/main/res/mipmap-anydpi-v26/ic_launcher.xml"
line="5"
column="1"/>
</issue>
<issue
id="MonochromeLauncherIcon"
message="The application adaptive roundIcon is missing a monochrome tag"
errorLine1="&lt;adaptive-icon xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2="^">
<location
file="src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml"
line="5"
column="1"/>
</issue>
</issues>