Skip to content

chore(manifest): tag UnusedAttribute perm flags with tools:targetApi#509

Merged
yuga-hashimoto merged 1 commit into
mainfrom
chore/warning-sweep
Apr 22, 2026
Merged

chore(manifest): tag UnusedAttribute perm flags with tools:targetApi#509
yuga-hashimoto merged 1 commit into
mainfrom
chore/warning-sweep

Conversation

@yuga-hashimoto

Copy link
Copy Markdown
Owner

Priority 5 — Refactor / quality

Two manifest warnings were firing on every lint run:

  • `BLUETOOTH_SCAN` with `usesPermissionFlags="neverForLocation"` is API 31+
  • `NEARBY_WIFI_DEVICES` with the same flag is API 33+

Current minSdk is 28, so lint saw these as unused. Added matching `tools:targetApi` markers so the attributes stay but the warnings go away.

Test plan

  • `./gradlew lint` no longer flags UnusedAttribute on these permissions
  • `./gradlew testFullDebugUnitTest` green
  • CI green

## Priority 5

BLUETOOTH_SCAN's `usesPermissionFlags="neverForLocation"` is an API 31+ attribute,
and NEARBY_WIFI_DEVICES' matching flag is API 33+. Current minSdk is 28, so lint
flagged both as UnusedAttribute. The attributes are still correct on the
devices that honor them — add `tools:targetApi` hints so lint knows the version
gate and stops warning.

./gradlew lint + testFullDebugUnitTest green.
@yuga-hashimoto yuga-hashimoto merged commit 329c4a8 into main Apr 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant