0
Fork 0
mirror of https://github.com/XiaochangXu/AVBox.git synced 2026-10-24 07:09:08 +00:00
Commit graph

4 commits

Author SHA1 Message Date
XiaochangXu
f305cd1a2d refactor: clear all non-null assertions in main and Chaquopy sources
- 974 `!!` removed across app/src/main/java, app/src/python/java and the quickjs wrapper (126 files, +1489/-1186)

- replacements: null guards, hoisted locals, requireNotNull; the few ?. cases are display/log-only and registered in the batch record

- no signature, visibility, field-type or nullability changes; NPE -> IllegalArgumentException at the same call sites, all inside pre-existing catch blocks

- rule + gate registered: SKILL.md null-safety line and the gate step, avbox-code-review-spec.md gains the null-safety section

- also carries the pending PyLog release log-strip keep rules (proguard-rules.pro + companion marker)

Verified: :app:assembleDebug green; :app:testDebugUnitTest 953 passed / 0 failed / 1 skipped; null_assert_gate.py PASS (only the 2 vendored L5 exemptions remain)
2026-10-14 05:41:59 +08:00
XiaochangXu
6fbc81d71c refactor(quickjs): migrate the local wrapper layer from Java to Kotlin
- migrate the 4 Java files under quickjs/src/main/.../wrapper to Kotlin
  (ContextSetter, Function, JSUtils, UriUtil); the module now has 0 Java
- clarify that quickjs/ is not vendored code: the real third-party part is the
  wang.harlon.quickjs maven dependency (wrapper-java 3.2.3, 21 classes), which
  cannot be migrated because the native side matches it by name; only the 4
  locally written files were converted
- keep the bytecode contract identical: UriUtil keeps its 4 public statics and
  JSUtils keeps isEmpty/isNotEmpty/toJsonObject/toJsonArray plus the instance
  methods, all with unchanged descriptors; the only rename is
  toArray(byte[]) -> toByteArray (no call site uses it)
- keep @Retention(RUNTIME) on both annotations explicit, and restore the AOSP
  and caoccao Apache-2.0 headers the port had dropped
- add UriUtilTest (13 cases) written against the Java version first, so the
  Kotlin port is proven equivalent by tests rather than by inspection;
  resolveToUri stays untested because Uri.parse returns null under Robolectric
- quickjs: add the kotlin.android plugin and set jvmTarget to 21
- full :app:testDebugUnitTest is 904 cases / 0 failures / 1 skipped
- record the rules and pitfalls in the Kotlin migration spec (section 7.24)
2026-10-10 11:12:40 +08:00
XiaochangXu
505962d8c6 player: keep replay position and progress display on effects toggle
Replay keeps the live kernel position: same-address restart saves current progress first, reuse branches resume from the live position for same content (stored value across content), and the player view captures the live position before release instead of trusting the polled cache. Idle no longer zeroes the progress state and the progress tick is guarded against a detached kernel, so the bar no longer snaps back to zero during a kernel rebuild. Picture effects toggles force a kernel rebuild.

Also lands pending work: jar/js/py loaders clear off the main thread, parse moved off main, ApiConfig list reference swaps, BootGeneration guard, config switch toast removal, home empty-state retry and switch-race fixes, docs synced (playback-service spec 3.4, mobile-ui spec 6.17, history).
2026-10-07 05:57:38 +08:00
XiaochangXu
a9d69bc567 update 2026-09-13 00:52:45 +08:00