Skip to content

fix(lint): clear the three errors baselined in #1743 - #1744

Merged
bmc08gt merged 4 commits into
code/cashfrom
fix/lint-baselined-errors
Oct 9, 2026
Merged

bmc08gt merged 4 commits into
code/cashfrom
fix/lint-baselined-errors

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #1743. Fixes the three lint errors that PR added to the baseline, and removes their entries.

  • WrongConstant (AppSettingsMapper.kt:18): Biometrics.TEST_AUTH reached canAuthenticate from another module, where lint can't tell it is a valid authenticator flag. The mapper now calls Biometrics.authenticationState(biometricManager), and TEST_AUTH is private so the constant stays in one module.
  • UnspecifiedRegisterReceiverFlag (SmsOtpAutofill.kt:104): the export flag was only passed on API 34+. ContextCompat.registerReceiver takes it on every version. The receiver stays exported, since SMS_RETRIEVED is sent by Play services, and SmsRetriever.SEND_PERMISSION still guards it.
  • UnrememberedMutableState (Flippable.kt:57): with animateFlip = false, FlippableCard created a new State object on every composition. It now uses rememberUpdatedState(cardFace.angle). FlippableCard has no callers in the repo, so this doesn't change any screen.

./gradlew :apps:flipcash:app:lintDebug reports 0 errors without the three entries.

The second commit regenerates the baseline with updateLintBaseline, now that checkDependencies is on. The old one was written with dependencies="false", which lint warned about. The new one holds the library modules' existing findings too: 827 warnings and 7 hints, mostly UnusedResources (534) and UsingMaterialAndMaterial3Libraries (169). Those warnings no longer show in the lint report.

The third commit clears the one error that was left. The manifest declares PhantomWalletCallbackActivity, but only :shared:onramp:deeplinks depended on phantom-connect-wallet, as an implementation dependency. The class was packaged in the APK, but lint couldn't see it from the app module and reported MissingClass. The app now depends on the library directly, with the same libsodium exclude. The baseline holds no errors now.

rememberChatPhotoPicker called getPickImagesMaxLimit() during composition
with no version check. The method exists only on API 33+, or on API 30-32
with SDK extension R 2+, so an Android 12 device without the MediaProvider
update threw NoSuchMethodError every time a chat opened (Bugsnag
6ac91865991833fd09984195, Samsung SM-N976V).

Only call it where the system picker provides it. Elsewhere androidx falls
back to a picker with no cap of its own, and the result callback already
trims the selection to the remaining slots.
Int.MAX_VALUE never reached the picker, since the clamp came out to
remaining anyway, but it read as no cap. Fall back to remaining directly.
CI runs :apps:flipcash:app:lintDebug, but checkDependencies defaults to
false, so lint only looked at the app module. The unguarded
MediaStore.getPickImagesMaxLimit() call in chat-ui (#1741) shipped
because no lint run ever saw it; with checkDependencies on, lint fails on
it with NewApi.

Turning it on surfaces three other existing errors, which go in the
baseline so the check gates new issues only: WrongConstant in
AppSettingsMapper, UnspecifiedRegisterReceiverFlag in SmsOtpAutofill (the
pre-34 branch, where the flag isn't available), and
UnrememberedMutableState in Flippable.
- WrongConstant: AppSettingMapper passed Biometrics.TEST_AUTH across a
  module boundary, where lint can't see it is a valid authenticator flag.
  The check now goes through Biometrics.authenticationState(), and
  TEST_AUTH is private.
- UnspecifiedRegisterReceiverFlag: SmsOtpAutofill only passed
  RECEIVER_EXPORTED on API 34+. ContextCompat.registerReceiver takes the
  flag on every version; the receiver stays exported, as SMS_RETRIEVED
  comes from Play services and SEND_PERMISSION still guards it.
- UnrememberedMutableState: FlippableCard built a new State object on
  each composition when animateFlip is false. It now uses
  rememberUpdatedState.

The three entries come out of the app's lint baseline.
@bmc08gt bmc08gt self-assigned this Oct 9, 2026
@github-actions github-actions Bot added type: fix Bug fix area: ui Compose UI, theme, components, resources area: phone labels Oct 9, 2026
@bmc08gt
bmc08gt changed the base branch from ci/lint-library-modules to code/cash October 9, 2026 17:39
@bmc08gt
bmc08gt merged commit 7155e83 into code/cash Oct 9, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/lint-baselined-errors branch October 9, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: phone area: ui Compose UI, theme, components, resources type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant