mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-20 16:12:26 +01:00
Compare commits
5 Commits
v3.2.0-dev
...
v3.2.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ceda29fce | ||
|
|
fcacd0f30d | ||
|
|
4f0c756b36 | ||
|
|
8ad9d7dedd | ||
|
|
b81c99920b |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,3 +1,18 @@
|
|||||||
|
# [3.2.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.2...v3.2.0-dev.3) (2023-12-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([048bf59](https://github.com/ReVanced/revanced-patches/commit/048bf592ef93ee5138aa1886be1644501f88964a))
|
||||||
|
|
||||||
|
# [3.2.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.1...v3.2.0-dev.2) (2023-12-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Public API:** Deprecate `HideEmailAddressPatch` ([866bceb](https://github.com/ReVanced/revanced-patches/commit/866bcebdd990b964d3dfd5aea792e7fffaedbf44))
|
||||||
|
* **YouTube:** Remove `Hide email address` patch ([3b84305](https://github.com/ReVanced/revanced-patches/commit/3b84305a6b97800cb147f86c642f19689548aca5))
|
||||||
|
|
||||||
# [3.2.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0-dev.1) (2023-12-18)
|
# [3.2.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0-dev.1) (2023-12-18)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -818,6 +818,12 @@ public final class app/revanced/patches/tiktok/feedfilter/FeedFilterPatch : app/
|
|||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/tiktok/interaction/clearmode/RememberClearModePatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/clearmode/RememberClearModePatch;
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/downloads/DownloadsPatch;
|
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/downloads/DownloadsPatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 3.2.0-dev.1
|
version = 3.2.0-dev.3
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,79 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.clearmode
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.tiktok.interaction.clearmode.fingerprints.OnClearModeEventFingerprint
|
||||||
|
import app.revanced.patches.tiktok.interaction.clearmode.fingerprints.OnRenderFirstFrameFingerprint
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.util.indexOfFirstInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remember clear mode",
|
||||||
|
description = "Remembers the clear mode configurations in between videos.",
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
|
||||||
|
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RememberClearModePatch : BytecodePatch(
|
||||||
|
setOf(
|
||||||
|
OnClearModeEventFingerprint,
|
||||||
|
OnRenderFirstFrameFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
OnClearModeEventFingerprint.result?.mutableMethod?.let {
|
||||||
|
// region Hook the "Clear mode" configuration save event to remember the state of clear mode.
|
||||||
|
|
||||||
|
val isEnabledIndex = it.indexOfFirstInstruction { opcode == Opcode.IGET_BOOLEAN } + 1
|
||||||
|
val isEnabledRegister = it.getInstruction<Instruction22c>(isEnabledIndex - 1).registerA
|
||||||
|
|
||||||
|
it.addInstructions(
|
||||||
|
isEnabledIndex,
|
||||||
|
"invoke-static { v$isEnabledRegister }, " +
|
||||||
|
"Lapp/revanced/tiktok/clearmode/RememberClearModePatch;->rememberClearModeState(Z)V"
|
||||||
|
)
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
|
// region Override the "Clear mode" configuration load event to load the state of clear mode.
|
||||||
|
|
||||||
|
val clearModeEventClass = it.parameters[0].type
|
||||||
|
OnRenderFirstFrameFingerprint.result?.mutableMethod?.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
# Create a new clearModeEvent and post it to the EventBus (https://github.com/greenrobot/EventBus)
|
||||||
|
|
||||||
|
# The state of clear mode.
|
||||||
|
invoke-static { }, Lapp/revanced/tiktok/clearmode/RememberClearModePatch;->getClearModeState()Z
|
||||||
|
move-result v3
|
||||||
|
if-eqz v3, :clear_mode_disabled
|
||||||
|
|
||||||
|
# Clear mode type such as 0 = LONG_PRESS, 1 = SCREEN_RECORD etc.
|
||||||
|
const/4 v1, 0x0
|
||||||
|
|
||||||
|
# Name of the clear mode type which is equivalent to the clear mode type.
|
||||||
|
const-string v2, "long_press"
|
||||||
|
|
||||||
|
new-instance v0, $clearModeEventClass
|
||||||
|
invoke-direct { v0, v1, v2, v3 }, $clearModeEventClass-><init>(ILjava/lang/String;Z)V
|
||||||
|
invoke-virtual { v0 }, $clearModeEventClass->post()Lcom/ss/android/ugc/governance/eventbus/IEvent;
|
||||||
|
""",
|
||||||
|
ExternalLabel("clear_mode_disabled", getInstruction(0))
|
||||||
|
)
|
||||||
|
} ?: throw OnRenderFirstFrameFingerprint.exception
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
} ?: throw OnClearModeEventFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.clearmode.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object OnClearModeEventFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("/ClearModePanelComponent;") && methodDef.name == "onClearModeEvent"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.clearmode.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object OnRenderFirstFrameFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.personalinformation
|
package app.revanced.patches.youtube.layout.hide.personalinformation
|
||||||
|
|
||||||
import app.revanced.util.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
@@ -9,10 +8,11 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.youtube.layout.hide.personalinformation.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
import app.revanced.patches.youtube.layout.hide.personalinformation.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.util.exception
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Deprecated("This patch is no longer working and will be removed in a future release.")
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide email address",
|
|
||||||
description = "Hides the email address in the account switcher.",
|
description = "Hides the email address in the account switcher.",
|
||||||
dependencies = [IntegrationsPatch::class, HideEmailAddressResourcePatch::class],
|
dependencies = [IntegrationsPatch::class, HideEmailAddressResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
|
|||||||
Reference in New Issue
Block a user