forked from upstream-mirrors/quik
b0f5107f1f
Scale factor algorithm became <= 0 after 4-5 attempts regardless of image size, silently bailing and leaving images potentially over the carrier size limit. Replace with binary search on dimensions (100px to carrier max) plus a quality-reduction fallback (90→40) for images that still don't fit. Adds compressAttachment dispatch for extensibility (audio/* logged, image/* compressed, else raw). Fixes InputStream leak in BitmapFactory dimension probe. Queries MMS_CONFIG_ALLOW_ATTACH_AUDIO for future audio support groundwork. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>