docs: apply pin-point delta edits for correctness, consistency, and reviewer friction

Implementation plan improvements:
- Fix event name consistency: DOZE_FALLBACK → EVT_DOZE_FALLBACK_TAKEN in Test Matrix
- Lock receiver export policy as AC: only BootReceiver exported
- Handle unknown Content-Length: add streaming guard for -1 responses
- Ensure single joined error mirrors AC: validation failures return one joined message
- Add webDir echo and device idle hint to diagnostics: include webDir path and isDeviceIdleMode
- Make degradation visible in UI AC: matrix shows 'Degraded timing (Doze)' when fallback active
- Add Room migrations guard: no-op migration and fallbackToDestructiveMigration(false) test

Analysis doc improvements:
- Trim WAKE_LOCK guidance: not required unless explicitly acquiring/releasing wakelocks
- Add Boot receiver priority note: android:priority has no effect for BOOT_COMPLETED
- Fix application android:name accuracy: only set if custom Application class exists
- Mirror Cordova compat note in Build section: include only when using Cordova plugins
- Annotate Mermaid flow with canonical errors: show where canonical errors are produced
- Link Truth Table to test UI buttons: integrate with Open Channel/Exact Alarm Settings buttons

All changes maintain existing structure with surgical precision edits.
This commit is contained in:
Matthew Raymer
2025-10-24 10:56:49 +00:00
parent eb2ab62a58
commit 0bef820d0c
2 changed files with 32 additions and 6 deletions

View File

@@ -126,6 +126,8 @@ public class MainActivity extends BridgeActivity {
</intent-filter>
</activity>
> **Note:** Set `android:name` only if you provide a custom `Application` class; otherwise remove to avoid ClassNotFound at runtime.
<!-- Plugin Components -->
<!-- Internal receiver: keep non-exported unless intentionally public -->
<receiver
@@ -145,6 +147,8 @@ public class MainActivity extends BridgeActivity {
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
> **Note:** `android:priority` has no practical effect for `BOOT_COMPLETED`; safe to omit.
</application>
<!-- Required Permissions -->
@@ -162,7 +166,7 @@ public class MainActivity extends BridgeActivity {
- `POST_NOTIFICATIONS`: Required for Android 13+ notification posting
- `SCHEDULE_EXACT_ALARM`: Required for precise notification timing
- `WAKE_LOCK`: Required for background processing
- `WAKE_LOCK` **not required** unless you explicitly acquire/release your own wakelocks (AlarmManager & WorkManager handle theirs)
- `INTERNET`: Required for content fetching
- `RECEIVE_BOOT_COMPLETED`: Required for reboot recovery
@@ -391,6 +395,8 @@ dependencies {
// Cordova compatibility (include ONLY if using Cordova plugins)
debugImplementation(project(':capacitor-cordova-android-plugins')) { transitive = false }
releaseImplementation(project(':capacitor-cordova-android-plugins')) { transitive = false }
> **Note:** Include `capacitor-cordova-android-plugins` **only** when using Cordova plugins.
}
```
@@ -619,6 +625,8 @@ If **denied or quota-limited** → schedule via WorkManager (exp backoff + jitte
| Battery optimization kills | App not whitelisted | Guide user to battery optimization settings |
| Boot reschedule fails | `RECEIVE_BOOT_COMPLETED` denied | Check manifest receiver registration |
> **Test UI Integration:** Use "Open Channel Settings" and "Open Exact Alarm Settings" buttons in the test interface to resolve channel and exact alarm issues.
## Runtime Flow Diagram
```mermaid
@@ -635,8 +643,8 @@ graph TD
I --> J[UI Update]
%% Error paths
C -->|Validation Error| K[Canonical Error]
D -->|Use-case Error| K
C -->|Validation Error → Canonical Error| K[Canonical Error]
D -->|Use-case Error → Canonical Error| K
K --> L[JavaScript Promise Rejection]
```