rouse-context/app/src/debug/AndroidManifest.xml
Jason Monk ef6a4cc684 Add debug-only receiver to trigger FGS limit notification on demand
Maintainers need a screenshot of the "Foreground service limit reached"
notification for user-facing docs (docs/user/security.md,
docs/user/troubleshooting.md), but reproducing the underlying Android
6-hour daily FGS budget exhaustion organically is impractical.

Adds DebugFgsLimitReceiver to the app module's debug source set (never
shipped in release builds) which invokes the same
FgsLimitNotifier.postLimitReachedNotification call that production uses
when startForeground throws ForegroundServiceStartNotAllowedException,
so the resulting notification is pixel-identical to what users see.

No refactor of FgsLimitNotifier was needed — it was already a public
object with a public function.

Trigger from a host shell:
  adb shell am broadcast \
    -a com.rousecontext.debug.FIRE_FGS_LIMIT \
    -n com.rousecontext.debug/com.rousecontext.app.debug.DebugFgsLimitReceiver

Verified both :app:assembleDebug and :app:assembleRelease succeed, and
the receiver is present only in the debug APK's merged manifest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 15:46:29 -04:00

32 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:networkSecurityConfig="@xml/network_security_config"
tools:replace="android:networkSecurityConfig">
<receiver
android:name=".debug.TestWakeReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.rousecontext.action.TEST_WAKE" />
</intent-filter>
</receiver>
<!--
Debug-only: fires the production "Foreground service limit reached"
notification on demand so maintainers can screenshot it for the
user-facing docs. See DebugFgsLimitReceiver for the adb command.
-->
<receiver
android:name=".debug.DebugFgsLimitReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.rousecontext.debug.FIRE_FGS_LIMIT" />
</intent-filter>
</receiver>
<provider
android:name=".testing.TestCommandProvider"
android:authorities="com.rousecontext.debug.test"
android:exported="true" />
</application>
</manifest>