security: disable backups and don't log SMS bodies

- android:allowBackup=false so config (trigger, sound URIs, duration) is not
  extractable via adb backup or auto-restored to another device.
- SmsReceiver no longer logs received message body/sender (could contain
  sensitive content); uses generic debug logs instead.
This commit is contained in:
avi 2026-08-07 14:00:40 -05:00
commit 611c78776e
2 changed files with 4 additions and 3 deletions

View file

@ -27,7 +27,7 @@
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:allowBackup="true"
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"

View file

@ -29,10 +29,11 @@ class SmsReceiver : BroadcastReceiver() {
// We only act on a trigger and ignore others; we do NOT call abort() so
// other applications are not affected by broadcasts we do not handle.
val (body, sender) = parseMessages(intent) ?: return
Log.i(TAG, "SMS from '$sender': '$body'")
// Avoid logging message body/sender, which could be sensitive.
Log.d(TAG, "Incoming SMS received (running trigger check).")
if (!RingConfig.isConfiguredTrigger(context, body)) {
Log.i(TAG, "Not a trigger. Configured text='${RingConfig.triggerText(context)}'")
Log.d(TAG, "Message did not match configured trigger.")
return
}