Skip to content

Commit 9d65136

Browse files
committed
Disable lint bytecode verifier, update baselines
Temporarily disable sample checks that fail with --ci. Disable ConstraintLayout detector that fails to load. Fixes: 274906225 Test: ./gradlew lintDebug Merged-In: I32fa6740d9677db25078fcf82e91e5df83b8db53 Change-Id: I32fa6740d9677db25078fcf82e91e5df83b8db53
1 parent 2112ebc commit 9d65136

File tree

57 files changed

+1632
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1632
-520
lines changed

activity/integration-tests/testapp/lint-baseline.xml

-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<issues format="6" by="lint 8.0.0-alpha05" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-alpha05)" variant="all" version="8.0.0-alpha05">
33

4-
<issue
5-
id="UnspecifiedImmutableFlag"
6-
message="Missing `PendingIntent` mutability flag"
7-
errorLine1=" 0, Intent(MediaStore.ACTION_IMAGE_CAPTURE), 0"
8-
errorLine2=" ~">
9-
<location
10-
file="src/main/java/androidx/activity/integration/testapp/MainActivity.kt"/>
11-
</issue>
12-
134
<issue
145
id="UnknownNullness"
156
message="Should explicitly declare type here since implicit type does not specify nullness (ActivityResultLauncher&lt;(Uri or Uri?)>)"

appactions/interaction/interaction-service/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ dependencies {
4747
implementation(libs.kotlinStdlib)
4848
implementation(libs.jsr250)
4949

50+
// Force upgrade since 1.2.0 is not compatible with latest lint.
51+
implementation("androidx.annotation:annotation-experimental:1.3.0")
52+
5053
testImplementation(project(":appactions:interaction:interaction-capabilities-core"))
5154
testImplementation(project(":appactions:interaction:interaction-service-proto"))
5255
testImplementation(libs.grpcTesting)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 8.1.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.1.0-alpha07">
3+
4+
<issue
5+
id="UnsafeOptInUsageError"
6+
message="This declaration is opt-in and its usage should be marked with `@androidx.wear.tiles.TilesExperimental` or `@OptIn(markerClass = androidx.wear.tiles.TilesExperimental.class)`"
7+
errorLine1=" .setLayout(ByteString.copyFrom(layout.toByteArray()))"
8+
errorLine2=" ~~~~~~~~~~~">
9+
<location
10+
file="src/main/java/androidx/appactions/interaction/service/TileLayoutInternal.kt"/>
11+
</issue>
12+
13+
<issue
14+
id="UnsafeOptInUsageError"
15+
message="This declaration is opt-in and its usage should be marked with `@androidx.wear.tiles.TilesExperimental` or `@OptIn(markerClass = androidx.wear.tiles.TilesExperimental.class)`"
16+
errorLine1=" .setResources(ByteString.copyFrom(resources.toByteArray()))"
17+
errorLine2=" ~~~~~~~~~~~">
18+
<location
19+
file="src/main/java/androidx/appactions/interaction/service/TileLayoutInternal.kt"/>
20+
</issue>
21+
22+
</issues>

appcompat/appcompat-resources/lint-baseline.xml

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@
107107
errorLine2=" ~~~~~~~~">
108108
<location
109109
file="src/main/java/androidx/appcompat/widget/TintContextWrapper.java"/>
110+
<location
111+
file="src/main/java/androidx/appcompat/widget/TintContextWrapper.java"
112+
message="Setter here"/>
110113
</issue>
111114

112115
<issue

appcompat/appcompat/lint-baseline.xml

+15-45
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,6 @@
4646
file="src/androidTest/java/androidx/appcompat/widget/AppCompatRadioButtonTest.java"/>
4747
</issue>
4848

49-
<issue
50-
id="NewApi"
51-
message="Call requires API level 24 (current min is 14): `onDropForTextView`"
52-
errorLine1=" ? OnDropApi24Impl.onDropForTextView(event, (TextView) view, activity)"
53-
errorLine2=" ~~~~~~~~~~~~~~~~~">
54-
<location
55-
file="src/main/java/androidx/appcompat/widget/AppCompatReceiveContentHelper.java"/>
56-
</issue>
57-
58-
<issue
59-
id="NewApi"
60-
message="Call requires API level 24 (current min is 14): `onDropForView`"
61-
errorLine1=" : OnDropApi24Impl.onDropForView(event, view, activity);"
62-
errorLine2=" ~~~~~~~~~~~~~">
63-
<location
64-
file="src/main/java/androidx/appcompat/widget/AppCompatReceiveContentHelper.java"/>
65-
</issue>
66-
6749
<issue
6850
id="NewApi"
6951
message="Call requires API level 17 (current min is 14): `android.view.ContextThemeWrapper#applyOverrideConfiguration`"
@@ -458,6 +440,9 @@
458440
errorLine2=" ~~~~~~~~~~~~~~~">
459441
<location
460442
file="src/main/java/androidx/appcompat/widget/ActionBarContainer.java"/>
443+
<location
444+
file="src/main/java/androidx/appcompat/widget/ActionBarContainer.java"
445+
message="Setter here"/>
461446
</issue>
462447

463448
<issue
@@ -476,6 +461,9 @@
476461
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
477462
<location
478463
file="src/main/java/androidx/appcompat/app/AppCompatActivity.java"/>
464+
<location
465+
file="src/main/java/androidx/appcompat/app/AppCompatActivity.java"
466+
message="Setter here"/>
479467
</issue>
480468

481469
<issue
@@ -485,6 +473,9 @@
485473
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
486474
<location
487475
file="src/main/java/androidx/appcompat/app/AppCompatDelegate.java"/>
476+
<location
477+
file="src/main/java/androidx/appcompat/app/AppCompatDelegate.java"
478+
message="Setter here"/>
488479
</issue>
489480

490481
<issue
@@ -494,6 +485,9 @@
494485
errorLine2=" ~~~~~~~~">
495486
<location
496487
file="src/main/java/androidx/appcompat/view/ContextThemeWrapper.java"/>
488+
<location
489+
file="src/main/java/androidx/appcompat/view/ContextThemeWrapper.java"
490+
message="Setter here"/>
497491
</issue>
498492

499493
<issue
@@ -539,6 +533,9 @@
539533
errorLine2=" ~~~~~~~~~~">
540534
<location
541535
file="src/main/java/androidx/appcompat/view/menu/MenuItemImpl.java"/>
536+
<location
537+
file="src/main/java/androidx/appcompat/view/menu/MenuItemImpl.java"
538+
message="Setter here"/>
542539
</issue>
543540

544541
<issue
@@ -3430,15 +3427,6 @@
34303427
file="src/main/java/androidx/appcompat/widget/AppCompatRadioButton.java"/>
34313428
</issue>
34323429

3433-
<issue
3434-
id="UnknownNullness"
3435-
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
3436-
errorLine1=" protected synchronized void onDraw(Canvas canvas) {"
3437-
errorLine2=" ~~~~~~">
3438-
<location
3439-
file="src/main/java/androidx/appcompat/widget/AppCompatSeekBar.java"/>
3440-
</issue>
3441-
34423430
<issue
34433431
id="UnknownNullness"
34443432
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
@@ -7102,15 +7090,6 @@
71027090
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"/>
71037091
</issue>
71047092

7105-
<issue
7106-
id="UnknownNullness"
7107-
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
7108-
errorLine1=" protected void onDraw(Canvas canvas) {"
7109-
errorLine2=" ~~~~~~">
7110-
<location
7111-
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"/>
7112-
</issue>
7113-
71147093
<issue
71157094
id="UnknownNullness"
71167095
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
@@ -7966,15 +7945,6 @@
79667945
file="src/main/java/androidx/appcompat/widget/ViewStubCompat.java"/>
79677946
</issue>
79687947

7969-
<issue
7970-
id="UnknownNullness"
7971-
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
7972-
errorLine1=" protected void dispatchDraw(Canvas canvas) {"
7973-
errorLine2=" ~~~~~~">
7974-
<location
7975-
file="src/main/java/androidx/appcompat/widget/ViewStubCompat.java"/>
7976-
</issue>
7977-
79787948
<issue
79797949
id="UnknownNullness"
79807950
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"

buildSrc/lint.xml

+4
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@
4040
<issue id="WrongThread" severity="fatal" />
4141
<issue id="MissingTestSizeAnnotation" severity="fatal" />
4242
<issue id="IgnoreClassLevelDetector" severity="fatal" />
43+
<!-- Disable all lint checks on transformed classes by default. -->
44+
<issue id="all">
45+
<ignore path="**/.transforms/**" />
46+
</issue>
4347
</lint>

buildSrc/lint_samples.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<!-- Re-enable sampled lint checks for all projects. -->
3131
<issue id="InvalidSamplesLocation" severity="fatal" />
3232
<issue id="MultipleSampledFunctions" severity="fatal" />
33-
<issue id="UnresolvedSampleLink" severity="fatal" />
34-
<issue id="ObsoleteSampledAnnotation" severity="fatal" />
33+
<!-- Temporarily ignore checks that fail when using CI flag. -->
34+
<issue id="UnresolvedSampleLink" severity="ignore" />
35+
<issue id="ObsoleteSampledAnnotation" severity="ignore" />
3536
</lint>

camera/camera-camera2-pipe-integration/lint-baseline.xml

+45
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<issues format="6" by="lint 7.4.0-alpha08" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
33

4+
<issue
5+
id="CameraXQuirksClassDetector"
6+
message="CameraX quirks should include this template in the javadoc:&#xA;&#xA;* &lt;p>QuirkSummary&#xA;* Bug Id:&#xA;* Description:&#xA;* Device(s):&#xA;&#xA;"
7+
errorLine1="class AspectRatioLegacyApi21Quirk : Quirk {"
8+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
9+
<location
10+
file="src/main/java/androidx/camera/camera2/pipe/integration/compat/quirk/AspectRatioLegacyApi21Quirk.kt"/>
11+
</issue>
12+
13+
<issue
14+
id="CameraXQuirksClassDetector"
15+
message="CameraX quirks should include this template in the javadoc:&#xA;&#xA;* &lt;p>QuirkSummary&#xA;* Bug Id:&#xA;* Description:&#xA;* Device(s):&#xA;&#xA;"
16+
errorLine1="class ExcludedSupportedSizesQuirk() : Quirk {"
17+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
18+
<location
19+
file="src/main/java/androidx/camera/camera2/pipe/integration/compat/quirk/ExcludedSupportedSizesQuirk.kt"/>
20+
</issue>
21+
22+
<issue
23+
id="CameraXQuirksClassDetector"
24+
message="CameraX quirks should include this template in the javadoc:&#xA;&#xA;* &lt;p>QuirkSummary&#xA;* Bug Id:&#xA;* Description:&#xA;* Device(s):&#xA;&#xA;"
25+
errorLine1="class ExtraCroppingQuirk : Quirk {"
26+
errorLine2=" ~~~~~~~~~~~~~~~~~~">
27+
<location
28+
file="src/main/java/androidx/camera/camera2/pipe/integration/compat/quirk/ExtraCroppingQuirk.kt"/>
29+
</issue>
30+
31+
<issue
32+
id="CameraXQuirksClassDetector"
33+
message="CameraX quirks should include this template in the javadoc:&#xA;&#xA;* &lt;p>QuirkSummary&#xA;* Bug Id:&#xA;* Description:&#xA;* Device(s):&#xA;&#xA;"
34+
errorLine1="class ExtraSupportedSurfaceCombinationsQuirk : Quirk {"
35+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
36+
<location
37+
file="src/main/java/androidx/camera/camera2/pipe/integration/compat/quirk/ExtraSupportedSurfaceCombinationsQuirk.kt"/>
38+
</issue>
39+
40+
<issue
41+
id="CameraXQuirksClassDetector"
42+
message="CameraX quirks should include this template in the javadoc:&#xA;&#xA;* &lt;p>QuirkSummary&#xA;* Bug Id:&#xA;* Description:&#xA;* Device(s):&#xA;&#xA;"
43+
errorLine1="class Nexus4AndroidLTargetAspectRatioQuirk : Quirk {"
44+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
45+
<location
46+
file="src/main/java/androidx/camera/camera2/pipe/integration/compat/quirk/Nexus4AndroidLTargetAspectRatioQuirk.kt"/>
47+
</issue>
48+
449
<issue
550
id="SupportAnnotationUsage"
651
message="Did you mean `@get:VisibleForTesting`? Without `get:` this annotates the constructor parameter itself instead of the associated getter."

camera/camera-video/lint-baseline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
errorLine1=" Thread.sleep(TimeUnit.NANOSECONDS.toMillis(requiredBlockTimeNs));"
2626
errorLine2=" ~~~~~">
2727
<location
28-
file="src/main/java/androidx/camera/video/internal/SilentAudioStream.java"/>
28+
file="src/main/java/androidx/camera/video/internal/audio/SilentAudioStream.java"/>
2929
</issue>
3030

3131
<issue

camera/integration-tests/avsynctestapp/lint-baseline.xml

-13
This file was deleted.

camera/integration-tests/diagnosetestapp/lint-baseline.xml

-13
This file was deleted.

camera/integration-tests/extensionstestapp/lint-baseline.xml

-13
This file was deleted.

camera/integration-tests/uiwidgetstestapp/lint-baseline.xml

-22
This file was deleted.

camera/integration-tests/viewtestapp/lint-baseline.xml

-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,4 @@
1010
file="src/main/AndroidManifest.xml"/>
1111
</issue>
1212

13-
<issue
14-
id="PermissionImpliesUnsupportedChromeOsHardware"
15-
message="Permission exists without corresponding hardware `&lt;uses-feature android:name=&quot;android.hardware.camera.autofocus&quot; required=&quot;false&quot;>` tag"
16-
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; />"
17-
errorLine2=" ~~~~~~~~~~~~~~~">
18-
<location
19-
file="src/main/AndroidManifest.xml"/>
20-
</issue>
21-
2213
</issues>

car/app/app-automotive/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies {
3434
// There is an implicit compile-only dep due to :annotation-experimental
3535
// Build will complain without this manual declaration.
3636
api(libs.kotlinStdlib)
37-
implementation "androidx.annotation:annotation-experimental:1.2.0"
37+
implementation "androidx.annotation:annotation-experimental:1.3.0"
3838

3939
annotationProcessor(libs.nullaway)
4040
annotationProcessor(libs.autoValue)

0 commit comments

Comments
 (0)