fix(lint): declare telephony as optional uses-feature#795
Open
fluffyspace wants to merge 1 commit intoFossifyOrg:mainfrom
Open
fix(lint): declare telephony as optional uses-feature#795fluffyspace wants to merge 1 commit intoFossifyOrg:mainfrom
fluffyspace wants to merge 1 commit intoFossifyOrg:mainfrom
Conversation
AGP 9.2.0's lint flags `CALL_PHONE` and `CALL_PRIVILEGED` with `PermissionImpliesUnsupportedChromeOsHardware` because the manifest declares the permissions without a matching `<uses-feature>` entry for `android.hardware.telephony`. The errors are not absorbed by the existing baseline (generated against lint 9.0.1) and fail `./gradlew lint` on every PR opened against current main. Add the feature with `required="false"` since the app can install on tablets and ChromeOS devices that lack telephony hardware. The dialer features that need it already gate at runtime via `TelephonyManager`/`TelecomManager` checks.
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.
Summary
Unblocks
./gradlew lintonmain. The AGP 9.0.1 → 9.2.0 bump (#788) was merged with a failing lint check, and every PR opened against current main now inherits the failure (e.g. #794).Root cause
Lint 9.2.0 raises
PermissionImpliesUnsupportedChromeOsHardwareerrors atAndroidManifest.xml:9and:10forCALL_PHONEandCALL_PRIVILEGED. Both permissions implyandroid.hardware.telephony, but the manifest never declared a matching<uses-feature>entry. The existingapp/lint-baseline.xmlwas generated against lint 9.0.1 and doesn't cover these new checks (it also notes 4 stale entries that no longer apply under 9.2.0).Fix
Add
<uses-feature android:name="android.hardware.telephony" android:required="false" />. This is the fix lint suggests directly, andrequired="false"is correct here — the app can install on tablets and ChromeOS devices that lack telephony hardware. Dialer code paths that actually need telephony already gate at runtime viaTelephonyManager/TelecomManagercapability checks, so this does not change install or runtime behavior on devices that do have telephony.The 4 stale baseline entries flagged by the new lint version are left for the existing fossifybot baseline-update workflow to clean up — they're warnings, not errors, and don't fail the build.
Test plan
./gradlew lintpasses locally onmainafter the changerequired="true")