commit 128f6a166df5dbbd1841620426f24224ca88905e
parent 8f29d26774c99d8d0d8792522b58426b1cf01e12
Author: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Date: Sat, 1 Nov 2025 16:24:55 +0000
Bug 1997648 - Update lint baselines. r=android-reviewers,Roger
Differential Revision: https://phabricator.services.mozilla.com/D270906
Diffstat:
5 files changed, 57 insertions(+), 282 deletions(-)
diff --git a/.prettierignore b/.prettierignore
@@ -1725,6 +1725,7 @@ mobile/android/android-components/components/lib/push-firebase/lint-baseline.xml
mobile/android/android-components/components/lib/state/lint-baseline.xml
mobile/android/android-components/components/service/digitalassetlinks/lint-baseline.xml
mobile/android/android-components/components/service/firefox-accounts/lint-baseline.xml
+mobile/android/android-components/components/service/firefox-relay/lint-baseline.xml
mobile/android/android-components/components/service/glean/lint-baseline.xml
mobile/android/android-components/components/service/location/lint-baseline.xml
mobile/android/android-components/components/service/mars/lint-baseline.xml
diff --git a/mobile/android/android-components/components/service/firefox-relay/lint-baseline.xml b/mobile/android/android-components/components/service/firefox-relay/lint-baseline.xml
@@ -1,8 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
<issues format="6" by="lint 8.13.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.13.0)" variant="all" version="8.13.0">
</issues>
diff --git a/mobile/android/fenix/app/lint-baseline.xml b/mobile/android/fenix/app/lint-baseline.xml
@@ -4,17 +4,6 @@
<issue
id="NoStaticMocking"
message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic(AboutListItemBinding::class)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/settings/about/AboutPageAdapterTest.kt"
- line="71"
- column="9"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
errorLine1=" mockkStatic("org.mozilla.fenix.ext.FragmentKt")"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -173,7 +162,7 @@
errorLine2=" ^">
<location
file="src/test/java/org/mozilla/fenix/home/pocket/DefaultPocketStoriesControllerTest.kt"
- line="220"
+ line="221"
column="9"/>
</issue>
@@ -184,7 +173,7 @@
errorLine2=" ^">
<location
file="src/test/java/org/mozilla/fenix/home/pocket/DefaultPocketStoriesControllerTest.kt"
- line="272"
+ line="273"
column="9"/>
</issue>
@@ -195,7 +184,7 @@
errorLine2=" ^">
<location
file="src/test/java/org/mozilla/fenix/home/pocket/DefaultPocketStoriesControllerTest.kt"
- line="413"
+ line="414"
column="9"/>
</issue>
@@ -206,7 +195,7 @@
errorLine2=" ^">
<location
file="src/test/java/org/mozilla/fenix/home/pocket/DefaultPocketStoriesControllerTest.kt"
- line="465"
+ line="466"
column="9"/>
</issue>
@@ -217,7 +206,7 @@
errorLine2=" ^">
<location
file="src/test/java/org/mozilla/fenix/home/pocket/DefaultPocketStoriesControllerTest.kt"
- line="518"
+ line="519"
column="9"/>
</issue>
@@ -345,138 +334,6 @@
<issue
id="NoStaticMocking"
message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="753"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="764"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="778"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="789"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="803"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="814"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="828"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="840"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="854"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="866"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" mockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="880"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'unmockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
- errorLine1=" unmockkStatic("mozilla.components.support.ktx.android.util.DisplayMetricsKt")"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/test/java/org/mozilla/fenix/tabstray/TabSheetBehaviorManagerTest.kt"
- line="892"
- column="13"/>
- </issue>
-
- <issue
- id="NoStaticMocking"
- message="Usage of MockK's 'mockkStatic' for static mocking is discouraged. Refactor to use dependency injection."
errorLine1=" mockkStatic("org.mozilla.fenix.utils.UndoKt")"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -624,7 +481,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/mozilla/fenix/ext/Context.kt"
- line="83"
+ line="85"
column="9"/>
</issue>
@@ -635,7 +492,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="510"
+ line="511"
column="17"/>
</issue>
@@ -646,7 +503,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="512"
+ line="513"
column="17"/>
</issue>
@@ -657,7 +514,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="514"
+ line="515"
column="17"/>
</issue>
@@ -668,7 +525,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="516"
+ line="517"
column="17"/>
</issue>
@@ -679,7 +536,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="518"
+ line="519"
column="17"/>
</issue>
@@ -690,7 +547,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="520"
+ line="521"
column="17"/>
</issue>
@@ -701,7 +558,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="522"
+ line="523"
column="17"/>
</issue>
@@ -712,7 +569,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="524"
+ line="525"
column="17"/>
</issue>
@@ -723,7 +580,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="526"
+ line="527"
column="17"/>
</issue>
@@ -734,7 +591,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="528"
+ line="529"
column="17"/>
</issue>
@@ -745,7 +602,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="530"
+ line="531"
column="17"/>
</issue>
@@ -756,7 +613,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="532"
+ line="533"
column="17"/>
</issue>
@@ -767,7 +624,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="534"
+ line="535"
column="17"/>
</issue>
@@ -778,7 +635,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="536"
+ line="537"
column="17"/>
</issue>
@@ -789,7 +646,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="538"
+ line="539"
column="17"/>
</issue>
@@ -800,7 +657,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="540"
+ line="541"
column="17"/>
</issue>
@@ -811,7 +668,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="542"
+ line="543"
column="17"/>
</issue>
@@ -822,7 +679,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="544"
+ line="545"
column="17"/>
</issue>
@@ -833,7 +690,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="546"
+ line="547"
column="17"/>
</issue>
@@ -844,7 +701,18 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="548"
+ line="549"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="IntentFilterUniqueDataAttributes"
+ message="Consider splitting data tag into multiple tags with individual attributes to avoid confusion"
+ errorLine1=" <data android:scheme="${deepLinkScheme}""
+ errorLine2=" ^">
+ <location
+ file="src/main/AndroidManifest.xml"
+ line="551"
column="17"/>
</issue>
@@ -1280,6 +1148,17 @@
<issue
id="DiscouragedApi"
message="Use of this function is discouraged because resource reflection makes it harder to perform build optimizations and compile-time verification of code. It is much more efficient to retrieve resources by identifier (e.g. `R.foo.bar`) than by name (e.g. `getIdentifier("bar", "foo", null)`)."
+ errorLine1=" val resourceId = context.resources.getIdentifier("
+ errorLine2=" ~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/org/mozilla/fenix/settings/settingssearch/DefaultFenixSettingsIndexer.kt"
+ line="282"
+ column="48"/>
+ </issue>
+
+ <issue
+ id="DiscouragedApi"
+ message="Use of this function is discouraged because resource reflection makes it harder to perform build optimizations and compile-time verification of code. It is much more efficient to retrieve resources by identifier (e.g. `R.foo.bar`) than by name (e.g. `getIdentifier("bar", "foo", null)`)."
errorLine1=" val resId = context.resources.getIdentifier(projectIdKey, "string", context.packageName)"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -1295,7 +1174,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
- line="751"
+ line="754"
column="10"/>
</issue>
@@ -1862,72 +1741,6 @@
<issue
id="UnusedResources"
- message="The resource `R.string.resource_scheme` appears to be unused"
- errorLine1=" <string name="resource_scheme">"resource://"</string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/arrays.xml"
- line="44"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.string.chrome_scheme` appears to be unused"
- errorLine1=" <string name="chrome_scheme">"chrome://</string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/arrays.xml"
- line="45"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.string.about_scheme` appears to be unused"
- errorLine1=" <string name="about_scheme">"about:"</string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/arrays.xml"
- line="46"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.array.mozac_url_schemes_blocklist` appears to be unused"
- errorLine1=" <string-array name="mozac_url_schemes_blocklist" >"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/arrays.xml"
- line="47"
- column="19"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mozac_browser_menu_corner_radius` appears to be unused"
- errorLine1=" <dimen name="mozac_browser_menu_corner_radius">8dp</dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="12"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mozac_browser_menu2_corner_radius` appears to be unused"
- errorLine1=" <dimen name="mozac_browser_menu2_corner_radius">8dp</dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="13"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
message="The resource `R.drawable.ic_onboarding_key_features` appears to be unused"
errorLine1="<vector xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android" android:height="320dp" android:viewportHeight="193.94" android:viewportWidth="200" android:width="329.99896dp">"
errorLine2="^">
@@ -1966,7 +1779,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values-vi/strings.xml"
- line="3742"
+ line="3752"
column="62"/>
</issue>
@@ -2009,20 +1822,6 @@
</issue>
<issue
- id="IconLocation"
- message="Found bitmap drawable `res/drawable/onboarding_redesign_background.webp` in densityless folder">
- <location
- file="src/main/res/drawable/onboarding_redesign_background.webp"/>
- </issue>
-
- <issue
- id="IconLocation"
- message="Found bitmap drawable `res/drawable/onboarding_redesign_background_landscape.webp` in densityless folder">
- <location
- file="src/main/res/drawable/onboarding_redesign_background_landscape.webp"/>
- </issue>
-
- <issue
id="IconDensities"
message="Missing the following drawables in `drawable-mdpi`: fenix_search_widget.webp (found in drawable-hdpi)">
<location
diff --git a/mobile/android/focus-android/app/lint-baseline.xml b/mobile/android/focus-android/app/lint-baseline.xml
@@ -51,28 +51,6 @@
errorLine1=" android:width="640dp""
errorLine2=" ~~~~~">
<location
- file="src/main/res/drawable-land/dark_background.xml"
- line="8"
- column="20"/>
- </issue>
-
- <issue
- id="VectorRaster"
- message="Limit vector icons sizes to 200×200 to keep icon drawing fast; see https://developer.android.com/studio/write/vector-asset-studio#when for more"
- errorLine1=" android:width="360dp""
- errorLine2=" ~~~~~">
- <location
- file="src/main/res/drawable/dark_background.xml"
- line="8"
- column="20"/>
- </issue>
-
- <issue
- id="VectorRaster"
- message="Limit vector icons sizes to 200×200 to keep icon drawing fast; see https://developer.android.com/studio/write/vector-asset-studio#when for more"
- errorLine1=" android:width="640dp""
- errorLine2=" ~~~~~">
- <location
file="src/main/res/drawable-land-night/home_background.xml"
line="8"
column="20"/>
@@ -635,7 +613,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/colors.xml"
- line="125"
+ line="124"
column="12"/>
</issue>
@@ -646,7 +624,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/colors.xml"
- line="126"
+ line="125"
column="12"/>
</issue>
@@ -657,7 +635,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/colors.xml"
- line="132"
+ line="131"
column="12"/>
</issue>
@@ -1148,7 +1126,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/preference_keys.xml"
- line="77"
+ line="71"
column="13"/>
</issue>
@@ -1159,7 +1137,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/preference_keys.xml"
- line="117"
+ line="111"
column="13"/>
</issue>
diff --git a/tools/rewriting/Generated.txt b/tools/rewriting/Generated.txt
@@ -155,6 +155,7 @@ mobile/android/android-components/components/lib/push-firebase/lint-baseline.xml
mobile/android/android-components/components/lib/state/lint-baseline.xml
mobile/android/android-components/components/service/digitalassetlinks/lint-baseline.xml
mobile/android/android-components/components/service/firefox-accounts/lint-baseline.xml
+mobile/android/android-components/components/service/firefox-relay/lint-baseline.xml
mobile/android/android-components/components/service/glean/lint-baseline.xml
mobile/android/android-components/components/service/location/lint-baseline.xml
mobile/android/android-components/components/service/mars/lint-baseline.xml