feat: add the Midas Settings extension and screen #49
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #16.
Feature description
Add an in-app settings screen, Midas Settings, to the patched apps. Users can switch individual patch behaviours on and off at runtime, without patching again. The patches stay as they are in Morphe Manager: including a patch adds its hook, and its Midas Settings toggle decides at runtime whether the hook acts.
Which roadmap issues get a toggle is noted in a "Midas Settings" section in each issue. Some things deliberately have no toggle and are always on when their patch is included: ads, tracking SDKs, the forced update and the ad SDK init.
The name must not suggest the screen comes from Morphe (NOTICE §7e, AGENTS.md). "Midas Settings" is fine; "Morphe settings" is not.
Research summary
app.morphe:morphe-extensions-library(Setting,BooleanSetting, SharedPreferencesmorphe_prefs);AbstractPreferenceFragment, theme utilities, widgets) and the Kotlin settings DSL are not published.sharedand would carry NOTICE obligations.androidx.preference(noPreferenceFragmentCompat). In De Gelderlander, AppCompat and Fragment are obfuscated. So build the screen on framework classes only:android.app.Activitywith plain views (Switch,LinearLayout,ScrollView), or the framework's deprecatedandroid.preference.PreferenceFragment.Design
Extension module
extensions/extensionback from the morphe-patches-template (see AGENTS.md). Use our own packagenl.midasvo.extension.Storage
MidasSettings, with SharedPreferences filemidas_settings.BooleanSetting(key, defaultValue, restartRequired).Which toggles exist
The screen must only show toggles for patches that were actually included.
midasSettingsPatch, collects toggle definitions from the named patches (key, Dutch title and summary, default, category, restart flag). Infinalize, it writes them tores/raw/midas_settings.json. The Activity renders that file.Screen
nl.midasvo.extension.settings.MidasSettingsActivity:Strings are Dutch; both apps are Dutch-only.
Manifest
exported=false, theme@style/AppTheme(exists in both apps).uiMode), not the app's in-app dark-mode override. That is acceptable for a first version.Context
Application.onCreate:nl.persgroep.edition.application.MainApplication.onCreate;com.kubusapp.MainApplication, which already has a static instance accessor.Build
GPR_USER/GPR_KEY).patches-list.jsongeneration still works.Delivery
Build this together with the first toggle and one entry point, as one vertical slice:
The Gelderlander entry point (#51) follows with its first toggle.
Done when
.mppcontains it.docs/apps/*.mddescribe the entry points.Done in
8126fee(pre-release v1.6.0-dev.1). Device-tested on de Volkskrant 7.52.0: the Midas Settings row in Instellingen opens the screen, back returns to the menu, toggle persists.