feat(volkskrant): disable the forced update dialog #21
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#21
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
A patched de Volkskrant is signed with Morphe's key, so Play can't update it. When DPG raises the minimum supported version, the app shows a dialog that can't be dismissed and only links to the Play Store. That blocks the patched app until a new tested version is patched.
Add a patch (e.g. Disable forced update) that never shows this dialog.
Findings (7.52.0, unobfuscated)
Backend
SupportedVersionsApicalls@GET("/supported-versions/v1/android"). The response DTO is{required: {version, message?}}.ForceUpdateRemoteDataSource.getMinVersionfetches it.ForceUpdateLocalDataSourcecaches the value inUserPreferencesDataSourceunder key"force_update_required_version". Offline, the cached value is used.Decision
nl.persgroep.edition.force.update.data.ForceUpdateRepositoryImpl.isForceUpdateRequired(Ljava/lang/String;)ZreturnsSemanticVersion(required) > SemanticVersion(appVersion).Chain
RequireForceUpdateUseCase.invokeForceUpdateViewModel.checkForUpdate(). It runs in the constructor, and again on resume after 8 hours viaRefreshOnResumeFromBackgroundEffect.MutableStateFlow<Boolean> forceUpdateRequiredStateForceUpdateDialogKt.ForceUpdateDialog(...), shown fromMainActivity. It is a MaterialAlertDialogwith an emptyonDismissRequest; its only button opens the store.Separate from Play
The Play in-app update API is not involved here (see #23).
Approach
isForceUpdateRequiredreturn false:const/4 p1, 0x0+return p1.p1is theStringparameter, so it is free to overwrite.(String)Z, and the log strings above.Risk
The patch hides the dialog; it doesn't make an old app compatible. If DPG shuts down an old API version, parts of the app can still break. Document this in the patch description or the docs.
Done when
Applied: <patch>on 7.52.0.force_update_required_versionto the app's prefs on a test install, after asking.docs/apps/volkskrant.mdhas a "Forced update" section.