fix(Twitter): address client shutdown behind update screen - #1763
fix(Twitter): address client shutdown behind update screen#1763RodrigoMenaM wants to merge 2 commits into
Conversation
| return Utils.getBooleanPref(Settings.MISC_BLOCK_UPDATE_SCREEN); | ||
| } | ||
|
|
||
| public static void blockUpdateScreen(View view) { |
There was a problem hiding this comment.
Move this function to utils
There was a problem hiding this comment.
System.Collections.Hashtable.Body
| returnType = "V", | ||
| strings = listOf("is_shutdown", "shutdown_min_version"), | ||
| custom = { _, classDef -> | ||
| classDef.type.startsWith("Lcom/twitter/subsystem/clientshutdown/") |
There was a problem hiding this comment.
You can use definingClass
There was a problem hiding this comment.
System.Collections.Hashtable.Body
|
|
||
| execute { | ||
| val isShutdownMethod = | ||
| ClientShutdownStateFingerprint.classDef.methods.single { method -> |
There was a problem hiding this comment.
Any reason why you have not created fingerprint for it
There was a problem hiding this comment.
System.Collections.Hashtable.Body
|
Correction to my earlier local validation: the first compatibility build I tested was state-only, not the full combined patch. It suppressed the persisted shutdown flag but omitted the existing full-cover UI hook. That incomplete backport regressed account-switch navigation and has been withdrawn. The working implementation uses both hooks. I rebuilt and installed that combination, confirmed both injections in the installed DEX, and tested cold launch plus profile switching in both directions without the update wall or an update-only activity. I also updated the PR description so nobody backports the state guard alone. The latest commit addresses all three review notes: the setting helper is in |
|
|
||
| public static boolean redirect(TabLayout$g g) {return Utils.redirect(g);} | ||
|
|
||
| public static boolean blockUpdateScreen() { |
There was a problem hiding this comment.
Yo keep this in Pref. I was taking about the blockUpdateScreen(View view) 🤦
Hopefully next time I hear back from a human not an AI |
Scope
This PR extends the existing Block update screen patch. The fix is the combination of two protections:
falsewhile the same setting is enabled.The state guard must not be shipped as a standalone backport without the full-cover UI hook.
Why both hooks are needed
X persists
is_shutdownafter its remote minimum-version check. That state is consumed outside the dialog path by launcher-entry handling and the client-shutdown network interceptor. Handling only the visible dialog can therefore leave the shutdown state active.Conversely, an earlier local compatibility build contained only the state guard. That incomplete backport regressed account-switch navigation: switching profiles could land on a root-level update screen that Back no longer escaped. That build has been withdrawn. The corrected compatibility build combines the existing UI hook with the state guard.
The
devbase of this PR already contains the full-cover UI hook; this diff adds the complementary state guard.Change
is_shutdownandshutdown_min_versionpreference keys.isShutdown()method directly within that resolved class.falseto client-shutdown consumers.Utils, following maintainer review.Verification
:patches:buildAndroidsucceeds.Addresses #1747 and the continued report in #1717.