Fix full-length SMS rendering and Unicode-aware segment counting

The expanded xsms conversation view handed the whole message body to
pango_xft_render_layout() as one multiline layout; on the target Pango/Xft
stack that call only paints the first line, so long concatenated/UCS-2
messages (e.g. the Ukrainian 'Мелорінг дарує хіти!' example) stopped right
before the first non-ASCII character. Verified on the connected phone with an
instrumented sms.so (530-byte body, 13 measured lines, one painted line) and
a standalone ARM reproducer; the QMI WMS reassembly and sms.txt parser are
correct.

- Draw message bodies and long drafts line by line via a shared
  renderLayoutLines() helper with an Xft clip, so nothing overflows the
  bubble or softkey bar; use the same layout width for measuring and drawing.
- Make the selected message scrollable with Up/Down (one line per press plus
  a right-edge scrollbar), stepping to the previous/next message only at the
  top/bottom of an overflowing message.
- Replace the byte-based compose counter with smsTextMetrics(), which decodes
  UTF-8, detects the GSM 7-bit alphabet/extension table and reports GSM-7
  septets (160/153) or UCS-2 UTF-16 units (70/67) with the right part count.
- Strip [SIM n] tags from QMI/local SMS log headers and stop writing them in
  the offline-send fallback; log units instead of bytes.
- Add a check-rebuild.sh guard against reintroducing the bulk layout render.
- Rebuild prebuilt/overlay sms.so and engmenu.so, sync docs, and regenerate
  images/bananarchy-nokia-argon.img.
This commit is contained in:
Luxferre committed 2026-11-05 17:34:21 +02:00
1 parent 8078f211e5
commit 16df110b0b
10 files changed
+266 -30

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ Instead of spawning slow shell scripts for everyday phone tasks, Bananarchy runs
- **Zero-log privacy default and Extended Logging toggle (`xengmenu` / `dmenu config` / `bananarchy-engmenu-ctl logging`)**: extended system and session logging is **disabled by default** (`OFF`) across `sxmo_log`, `superd` and its managed services, `Xorg` (`-logfile /dev/null -logverbose 0`), `dwm`, `fcitx5` (`--verbose="*=0"`), `tinydm`, `NetworkManager` (`level=OFF`), `ModemManager` (`--log-level=ERR --log-file=/dev/null`), and kernel `printk`, ensuring zero eMMC log writes and zero idle logging activity. Extended RAM-only logging in `/tmp` (`/tmp/sxmo.log`, `/tmp/superd.log`, `/tmp/superd_state/superd/logs/*.log`) can be toggled at any time in the **Engineering Menu (`*#0001#` / `xengmenu` -> `8: Extended Logging`)**, **`Config -> Extended Logging`**, or via `bananarchy-engmenu-ctl logging [on|off|toggle|status]`.
- **Global controls drawer (`xdrawer`) and `*` + `#` screenshot combo**: press **both softkeys together** from anywhere to adjust linear (`1%`–`100%`) speaker, earpiece, and ringtone volume, audio output routing (`Speaker`, `Earpiece`, `Headphones` with automatic 3.5mm jack plug/unplug routing), ringer mode (`Ring+Vib` / `Vibrate` / `Silent` / `DND`), 3-level vibration intensity (`Light` / `Medium` / `Strong`), flashlight, sound and microphone mute, screen brightness, and keypad backlight; press **`*` and `#` together** from anywhere to capture a `240x320` PNG screenshot (`scrot` via `bananarchy-screenshot`) to `~/Pictures/screenshot-YYYYMMDD-HHMMSS.png`.
- **Phone dialer (`xdialer`), call log (`xcalllog`), and call screen (`xcallscreen`)**: press any digit on the home screen to start dialing with live T9 contact matching, run interactive carrier USSD codes (`*100#`, etc.), or type `*#06#` to inspect both IMEIs. When two SIM cards are active in Dual-SIM Dual Standby (DSDS), placing a call or running a USSD code prompts to choose between `SIM 1` and `SIM 2`. Incoming and active calls on either SIM (as well as incoming/active VoIP calls from `xsip` and `xtox`) open a dedicated call screen with an active `[SIM 1]`/`[SIM 2]`/`[SIP]`/`[TOX]` badge, earpiece/speaker switching, microphone mute, DTMF keypad, and one-key normalized WAV call recording (`~/Recordings/rec_HHMMSS_<caller>.wav`). The call log includes a 5-tab view (`All`, `Miss`, `In`, `Out`, `Spam`) with integrated anti-spam number blocking (`~/.config/sxmo/block.tsv`) that automatically hangs up blocked callers and logs them to the `Spam` tab without triggering missed-call notifications.
- **Contacts (`xcontacts`) and SMS manager (`xsms`)**: full phonebook editor with direct Qualcomm QMI SIM card contact import and export across SIM 1 and SIM 2, paired with a threaded SMS conversation view, multi-tap message composer with outgoing `SIM 1` / `SIM 2` selection when two SIMs are active, and built-in anti-spam blocklist / spam folder (`~/.local/share/sxmo/block`) with one-key thread blocking and restoration.
- **Contacts (`xcontacts`) and SMS manager (`xsms`)**: full phonebook editor with direct Qualcomm QMI SIM card contact import and export across SIM 1 and SIM 2, paired with a threaded SMS conversation view that renders and scrolls full-length concatenated/Unicode (`UCS-2`) messages line by line, a multi-tap message composer with an encoding-aware GSM-7/UCS-2 segment counter and outgoing `SIM 1` / `SIM 2` selection when two SIMs are active, and built-in anti-spam blocklist / spam folder (`~/.local/share/sxmo/block`) with one-key thread blocking and restoration.
- **Modem and Dual-SIM manager (`xmodem`)**: 4-tab cellular control center (`SIMs`, `Radio`, `AT`, `Log`) supporting Dual-SIM Dual Standby (DSDS) with simultaneous network registration on both SIM slots, instant default SIM switching (`Set as Default SIM (Calls/SMS)`), full Primary/Secondary GW (`4G/Data`) slot swapping (`Make Primary GW (4G/Data Swap)`), SIM PIN unlock and PUK unblock wizards, 2G/3G/4G radio mode selection, interactive USSD sessions, and a live AT command console.
- **Networks and Bluetooth manager (`xnetworks`) with OBEX file transfer (`bananarchy-bt-obex`)**: 3-tab connectivity manager for Wi-Fi networks, WPA2 password entry, Wi-Fi hotspot, USB tethering, 4G/LTE mobile data (`wwan0`) and APN editing, and Bluetooth pairing, with built-in Bluetooth OBEX Object Push file reception (`~/Downloads` status and receiver toggle in the `Bluetooth` tab) and **Send via Bluetooth** in `xfiles`.
- **File manager (`xfiles`) with microSD automount (`sxmo_sdcard.sh`), Bluetooth file sharing, music and tracker player (`xmusic`), and camera (`xcamera`)**: keypad directory browser with automatic microSD card (`/dev/mmcblk1`) detection and `/media/sdcard` mounting/unmounting, **Send via Bluetooth** OBEX file push to paired/discovered devices, built-in text viewer, integrated GUI multi-tap text editor (`Edit in Text Editor`, available as an action on any file), image viewer, and dedicated monophonic ringtone viewer (`RingtoneView` for Nokia RTTTL `.nrt`/`.rtttl`/`.rtx`, Ericsson eMelody `.emy`, and IrDA iMelody `.imy` with graphical piano-roll pitch contour, note sequence viewer, live audio preview, and one-key assignment as call ringtone or notification/SMS sound — plus one-click actions to launch `.jar`/`.jad` MIDlets in the **ReMEdy (`remedy`)** J2ME emulator, launch `.gb`/`.gbc` ROMs in the Game Boy emulator, run `.yab` scripts in Yabasic inside the terminal, play audio, preview images, set any image as wallpaper, or install any audio, tracker, or monophonic melody file as call ringtone or notification/SMS sound), a 3-tab music and chiptune tracker module player (`WAV`, `MP3`, `OGG`, `FLAC`, `Opus`, `MOD`, `XM`, `IT`, `S3M`, `NRT`, `RTTTL`, `RTX`, `EMY`, `IMY`, and more), and a live V4L2 camera viewfinder with digital zoom, flash/torch control, self-timer, and photo gallery.