fix: silence false-positive Instantiatable lint on ExtensionAppFunctionService#6293
Merged
Conversation
…onService The googleRelease lint vital report emitted a (non-fatal) error: ExtensionAppFunctionService must extend android.app.Service [Instantiatable] ExtensionAppFunctionService's superclass chain ends at com.android.extensions.appfunctions.AppFunctionService, a class supplied at runtime by the optional `com.android.extensions.appfunctions` <uses-library> (android:required="false" in the appfunctions AAR), not by any compile/lint-classpath artifact. Lint cannot follow a <uses-library>-provided superclass, so it can't prove the service is a Service and false-positives. Add a narrow tools:ignore="Instantiatable" to only that <service> element, with a comment explaining the sidecar chain. The sibling PlatformAppFunctionService resolves cleanly (its chain ends in the compile-SDK android.app.appfunctions.AppFunctionService), so the check stays active there and on all our own components. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Google flavor Android manifest adds ChangesManifest lint suppression
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jamesarich
marked this pull request as ready for review
July 16, 2026 12:16
jamesarich
enabled auto-merge
July 16, 2026 12:16
jamesarich
disabled auto-merge
July 16, 2026 12:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
googleReleaselint vital report (visible in Create or Promote Release → release-google) emits an error that clutters release CI:It is non-fatal today only because our lint convention sets
abortOnError = false— it does not fail the build, but it pollutes every release lint report with a false positive.Root cause
The two AppFunctions delegate services we hand-declare (since alpha10 dropped the
appfunctions-servicemanifest) have different superclass chains:PlatformAppFunctionServiceandroidx.appfunctions.AppFunctionService→android.app.appfunctions.AppFunctionService(compile SDK, API 36)android.app.Service— no warningExtensionAppFunctionServiceExtensionsAppFunctionService(abstract) →com.android.extensions.appfunctions.AppFunctionService(device<uses-library>sidecar)com.android.extensions.appfunctions.AppFunctionServiceis supplied at runtime by the optionalcom.android.extensions.appfunctionsshared library — declared<uses-library android:required="false" />in the appfunctions AAR manifest — and follows the AndroidX convention for OEM on-device sidecars (com.android.extensions.<feature>, kept off the boot classpath). It is not shipped in any compile/lint-classpath artifact, so lint cannot follow the superclass chain up toandroid.app.Serviceand false-positives. OnlyExtensionAppFunctionServiceis affected (confirmed by reproduction).Making the dependency "visible to lint" is therefore a dead end — there is no artifact to add; the class only exists on-device via
<uses-library>.Changes
🐛 Bug Fixes
tools:ignore="Instantiatable"to only theExtensionAppFunctionService<service>element inandroidApp/src/google/AndroidManifest.xml, with a comment explaining the<uses-library>sidecar chain. The check stays active onPlatformAppFunctionServiceand on all our own components, so this is the most surgical option (preferred over a scopedlint { disable }or a baseline).Testing Performed
Local verification on the
googleReleasevariant (JDK 25):./gradlew :androidApp:lintVitalGoogleRelease -Pci=true→ 0 errors, 0 warnings (was1 error— the[Instantiatable]error is gone)./gradlew spotlessCheck→ pass./gradlew detekt→ passIndependent from the R8 proguard fix in #6292 — no overlap.
Summary by CodeRabbit