Deel identieke Edition/Kubus-patches, toggle-teksten en het "hook elke return"-patroon #84
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#84
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?
Severity: medium · Categorie: architecture · Effort: L
Probleem
Zo'n tien features bestaan twee keer (ads, review prompts, surveys, in-app messages, game promos, preferred source, push suggestions, subscription banners, tracking, Midas Settings). Naam, beschrijving, default, categorie, toggle-key, Nederlandse titel en samenvatting worden daarbij letterlijk herhaald. Hide surveys is in beide platforms identiek. Het patroon "zoek elke
return, gooi een exception als er geen is, loop van achter naar voren en voeg in op het control-flow-label" staat in ongeveer 8 patches. De manifest-cleanup staat er per platform los.Waar
patches/src/main/kotlin/nl/midasvo/patches/edition/surveys/HideSurveysPatch.kt#L12-37patches/src/main/kotlin/nl/midasvo/patches/kubus/surveys/HideSurveysPatch.kt#L12-37patches/src/main/kotlin/nl/midasvo/patches/edition/games/HideGamePromosPatch.kt#L12-34patches/src/main/kotlin/nl/midasvo/patches/kubus/games/HideGamePromosPatch.kt#L12-39patches/src/main/kotlin/nl/midasvo/patches/edition/inappmessaging/HideInAppMessagesPatch.kt#L33-53patches/src/main/kotlin/nl/midasvo/patches/kubus/inappmessaging/HideInAppMessagesPatch.kt#L44-66patches/src/main/kotlin/nl/midasvo/patches/edition/settings/MidasSettingsPatch.kt#L97-101patches/src/main/kotlin/nl/midasvo/patches/kubus/settings/MidasSettingsPatch.kt#L33-37patches/src/main/kotlin/nl/midasvo/patches/videoland/settings/MidasSettingsPatch.kt#L32-36patches/src/main/kotlin/nl/midasvo/patches/edition/reviewprompts/HideReviewPromptsPatch.kt#L47-67patches/src/main/kotlin/nl/midasvo/patches/kubus/settings/MidasSettingsPatch.kt#L51-70patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt#L105-125patches/src/main/kotlin/nl/midasvo/patches/videoland/assets/LogVideoAssetsPatch.kt#L44-60patches/src/main/kotlin/nl/midasvo/patches/videoland/quality/ForceHdPatch.kt#L98-114patches/src/main/kotlin/nl/midasvo/patches/edition/tracking/EditionManifestCleanupPatch.kt#L8-56patches/src/main/kotlin/nl/midasvo/patches/kubus/tracking/KubusManifestCleanupPatch.kt#L1-45patches/src/main/kotlin/nl/midasvo/patches/edition/markdown/CopyArticleMarkdownPatch.kt#L34Bewijs
X-arch-3 (patches/src/main/kotlin/nl/midasvo/patches/edition/surveys/HideSurveysPatch.kt)
X-arch-8 (patches/src/main/kotlin/nl/midasvo/patches/edition/reviewprompts/HideReviewPromptsPatch.kt)
Impact
Een fix of een tekstwijziging moet op meerdere plekken gebeuren en blijft makkelijk op één plek achter. Bij dat delicate smali-patroon (labels, registers) is dat het grootste risico.
Voorstel
compatibleWith(*EDITION_COMPATIBILITY, *KUBUS_COMPATIBILITY), te beginnen met Hide surveys.shared/settings(key, titel, samenvatting, categorie). Dat sluit aan op de contractcheck.MutableMethod.hookReturns(opcode) { reg -> smali }(met een wide-variant) en een helperremoveManifestEntries(...)toe aanshared/util, en gebruik die in de bestaande patches.Acceptatiecriteria
Applied:op een Edition- en een Kubus-APK.Code review @
33e02db(2026-10-14) · findings: X-arch-3, X-arch-8Opgelost in PR #123, gemerged in dev en uitgebracht in v1.10.0 (onderdeel van #105).