INNER CODE UNIT · Kotlin

executePatches

NexAlloy/NexAlloy · app/src/main/java/io/github/nexalloy/PatchExecutor.kt:210

    private fun executePatches() {
        patches.forEach { hook ->
            if (appliedPatches.contains(hook)) return@forEach
            /**
             * @see io.github.nexalloy.activity.AppPatchSettingsActivity.AppPatchSettingsFragment.onCreate
             * */
            val isEnabled = patchPreferences?.getBoolean(hook.name, hook.use) ?: hook.use
            if (!isEnabled) return@forEach // Pref Key
            runCatching { hook.run(this) }.onFailure { err ->
                XposedBridge.log(err)
                failedPatches.add(hook)
            }.onSuccess {
                appliedPatches.add(hook)
            }
        }
    }

    private fun finalizePatching() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…