Adds a SmsRelaySettingsActivity that edits the four config knobs
(enabled, base URL, device ID, sender whitelist) directly against the
`sms_relay_prefs` SharedPreferences file via a PreferenceFragmentCompat.
Also shows last-forward time and 24h failure count read-only.
Standalone (its own Activity), not folded into the existing
SettingsActivity, so this lands without touching the 1000-line monolith.
Launch with adb during bring-up:
adb shell am start -n io.heckel.ntfy/.sms.SmsRelaySettingsActivity
A future pass can link it from main_preferences.xml with
app:fragment="io.heckel.ntfy.sms.SmsRelaySettingsActivity$Fragment"
SmsRelayPreferences.whitelist
Storage format moved from StringSet to a single comma-separated
string so an EditTextPreference can edit it directly. External API
is unchanged — getter still returns Set<String>, whitespace and
empty entries stripped on read.
res/xml/sms_relay_preferences.xml
SwitchPreferenceCompat (enabled) + three EditTextPreferences
(base_url, device_id, whitelist) + two read-only summary entries
(last forward, failure count).
SmsRelaySettingsActivity / Fragment
Activity hosts the fragment; fragment loads the XML, points the
PreferenceManager at the `sms_relay_prefs` file, and refreshes the
read-only status entries on resume.
Manifest <activity> declaration goes with the broader pending manifest
commit alongside the SmsRelayReceiver registration.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| schemas | ||
| src | ||
| build.gradle | ||