Remove unused code - #812
Open
JingMatrix wants to merge 2 commits into
Open
Conversation
GITHUB_CLIENT_ID came from a `githubClientId` Gradle property that is set
nowhere -- not in gradle.properties, not in CI -- so every build compiled it
as "". isConfigured was therefore always false: the card returned before
drawing anything, signIn() short-circuited to Unavailable("no client id"),
and tokenProvider() always returned null, so no request ever carried an
Authorization header.
It bought only the rate limit, 60 requests an hour anonymous against 5000
signed in, and nothing depends on having it: the canary screen already
sources its zips from release assets precisely so that testing a build needs
no account, and every GitHub surface renders anonymously by design.
Deleting it rather than supplying a client id, because the flow also has
nowhere good to keep a token. Parasitically the manager's SharedPreferences
land in com.android.shell's data directory, whose shared_prefs is
world-executable, so a token would sit outside our own sandbox. That is
worth solving before offering sign-in again, not alongside it.
Also drops the SignInState import CanaryScreen never used.
buildSrc holds two Gradle task classes no build script registers, and neither output survives: there is no LangList.java and no material_theme_builder.xml, the locale list comes from BuildConfig.TRANSLATIONS computed in manager/build.gradle.kts, and the only XML theme left wraps Theme.DeviceDefault.NoActionBar. Its README documents registering both tasks against :app, gone since #796. The directory goes, with the format task's include for its Kotlin. The version catalog still pins the whole View stack -- Glide, Rikka's rikkax-* widgets, Fragment, Navigation 2 with safeargs, preference, RecyclerView, SwipeRefreshLayout, ConstraintLayout, Material Components for Views. No build script references any of those 26 aliases, the safeargs plugin, or the nav, glide and appcenter versions. rikkax-parcelablelist stays; :services:manager-service exposes it for the AIDL's ParcelableListSlice. hiddenapi/stubs carries 20 files nothing compiles against, mostly LSPosed-era rather than rewrite fallout. Where the platform declares the same class the stub is already inert: :daemon compiles PackageManager.VERSION_CODE_HIGHEST and XSharedPreferences compiles Environment.getDataDirectory(), neither of which the stub declares, so android.jar wins today. They are compileOnly and never reach a dex, so lsplant's FindClass on dalvik/system/VMRuntime keeps resolving the framework class. Four HiddenApiBridge wrappers and the stub members that existed only to type them go with them. In :manager the four @serializable models for the Actions runs and artifacts API became unreachable when eb07955 moved canary sourcing to release prereleases, and relativeTime, levelLabel, sectionHeaderStyle, SeedScheme.parseHex, VectorLightColors, VectorDarkColors, ModulesViewModel.selectAll, LogPaneState.atOldest and GOOD_FIRST_ISSUE_URL have no call site at all. RelativeTime.kt becomes TimeText.kt, since relative time is what left it. Seventeen strings go too, translations deleted alongside their source so the next Crowdin pull does not add them back. Three of them -- store_offline, settings_window, module_toggle_failed -- read more like missing features than dead weight, and their translated copy in eighteen languages goes with them. Daemon-side, CliHandler.isPackageInstalled, Utils.getZoneId, Utils.isLENOVO and :xposed's trackedApks have no caller; the live tracker is LoadedApkTracker.activeApks. magisk-loader goes as well, and that is the one deletion here that ships behaviour. Before #550 the loader baked the raw githubusercontent URL of magisk-loader/update/zygisk.json into every module.prop, so Magisk on a pre-v2.0 install polls it and will now get a 404. Effectively everyone is on v2.0 by now, and zygisk/update.json -- what module.prop has pointed at since -- is untouched. Nothing else changes behaviour. Release builds already shrink unused resources, and no deletion touches a de.robv or io.github.libxposed surface, an AIDL transaction id, a JNI name, a manifest entry or a keep rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reframes what began as removing the GitHub sign-in, which no build ever had: GITHUB_CLIENT_ID came from a Gradle property set nowhere, so the card never drew and no request carried an Authorization header.
The second commit removes everything else the Compose rewrite left unreferenced -- buildSrc, 26 View-era catalog aliases, 20 hiddenapi stubs, nine manager symbols and the seventeen strings that died with them. 123 files, 2071 deletions against 14 insertions, and the 14 are comment text.
Deleting magisk-loader/update/zygisk.json 404s the update check on pre-v2.0 installs, which baked that URL into module.prop. I am fine with that; zygisk/update.json is untouched. Nothing else here reaches a device.
Left alone: restartFor in the AIDL, whose transaction id an out-of-tree manager may be binding, and the Utils.Log members and XC_MethodHook.extras, which have no caller here but sit in dex a module could reach reflectively. The CI and update-endpoint fixes I found on the way are in #811.