Repository navigation
Commit 75afa44
authored
ci(lint): lint library modules from the app's lintDebug (#1743)
* fix(chat): guard MediaStore.getPickImagesMaxLimit on older pickers
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.
* fix(chat): cap the fallback photo picker at the open 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(lint): lint library modules from the app's lintDebug
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.1 parent 59fc672 commit 75afa44
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
380 | 413 | | |
0 commit comments