refactor(restart): route RestartActivity logging through AppLog (#324) #330

Closed
opened 2026-07-05 00:49:30 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-05 00:49:30 +00:00 (Migrated from github.com)

Part of #324 (strangler-migrate debug logging to AppLog).

Sequencing: PARALLEL with the other migration areas, after the Seam ticket merges.
This is the final raw-Log.* site outside the auth/lock, DB/keystore, connectivity/send, and
sync-engine areas — clearing it makes the codebase guard-ready. Touches restart/ only.

Scope (files)

  • app/src/main/kotlin/org/libremail/restart/RestartActivity.kt — 1 raw Log.w.

Migrate

  • :43 Log.w(TAG, "no launch intent for $packageName; cannot relaunch after restart") ->
    AppLog.w(TAG, same); drop import android.util.Log, add import org.libremail.reporting.AppLog.
    $packageName is the app's own package (org.libremail.app) — not PII.

Important behavior note

RestartActivity runs in the separate :restart trampoline process. In that process
LibreMailApplication.onCreate returns early (isRestartTrampolineProcess()), so
AppLog.install(buffer) is never called there — AppLog's buffer is null. Therefore this
breadcrumb reaches Logcat only, never a DebugReport. Migrating it is for guard-rule
compliance + Logcat consistency
, not report breadcrumbs. Do not expect a RingLogBuffer
assertion to capture it in-process.

PII

None.

Test expectation

  • RestartActivity is DEVICE-ONLY (multi-process kill/relaunch; see its KDoc). A JVM
    buffer-capture test is not meaningful here (null buffer in the trampoline). Keep/adjust the
    existing restart coverage; the guard-rule ticket (#324, last) is what actually enforces this
    file stays on AppLog. Call out in the PR that this is the one migrated site whose
    "buffer captured the breadcrumb" test intentionally does not apply.
  • Also scan for any other stray android.util.Log importers that appear before this lands
    (Grep import android.util.Log app/src/main) and fold them in here so the guard can enable
    cleanly.

Parallelism: parallel with the other four migration areas — after Seam.

Part of #324 (strangler-migrate debug logging to AppLog). **Sequencing: PARALLEL** with the other migration areas, **after the Seam ticket merges.** This is the final raw-`Log.*` site outside the auth/lock, DB/keystore, connectivity/send, and sync-engine areas — clearing it makes the codebase guard-ready. Touches `restart/` only. ## Scope (files) - `app/src/main/kotlin/org/libremail/restart/RestartActivity.kt` — 1 raw `Log.w`. ## Migrate - `:43` `Log.w(TAG, "no launch intent for $packageName; cannot relaunch after restart")` -> `AppLog.w(TAG, same)`; drop `import android.util.Log`, add `import org.libremail.reporting.AppLog`. `$packageName` is the app's own package (`org.libremail.app`) — **not PII**. ## Important behavior note `RestartActivity` runs in the separate `:restart` trampoline process. In that process `LibreMailApplication.onCreate` returns early (`isRestartTrampolineProcess()`), so `AppLog.install(buffer)` is **never called** there — `AppLog`'s buffer is null. Therefore this breadcrumb reaches **Logcat only**, never a `DebugReport`. Migrating it is for **guard-rule compliance + Logcat consistency**, not report breadcrumbs. Do not expect a `RingLogBuffer` assertion to capture it in-process. ## PII None. ## Test expectation - `RestartActivity` is **DEVICE-ONLY** (multi-process kill/relaunch; see its KDoc). A JVM buffer-capture test is not meaningful here (null buffer in the trampoline). Keep/adjust the existing restart coverage; the guard-rule ticket (#324, last) is what actually enforces this file stays on `AppLog`. Call out in the PR that this is the one migrated site whose "buffer captured the breadcrumb" test intentionally does not apply. - Also scan for any other stray `android.util.Log` importers that appear before this lands (`Grep import android.util.Log app/src/main`) and fold them in here so the guard can enable cleanly. **Parallelism:** parallel with the other four migration areas — after Seam.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#330