From ffb045251a0ec565c9c1a6b0e44ab9f9e03d085a Mon Sep 17 00:00:00 2001 From: inotia00 Date: Fri, 12 May 2023 08:13:49 +0900 Subject: [PATCH] fix(youtube/hide-general-ads): crash or force close due to incorrect class path --- .../ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt | 2 +- .../patches/youtube/ads/getpremium/patch/HideGetPremiumPatch.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt index 86fe1fb67..5b47464a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt @@ -38,7 +38,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() { val viewRegister = instruction(insertIndex).registerC - this.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAdAttributionView") + this.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/AdsFilter", "hideAdAttributionView") } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ads/getpremium/patch/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ads/getpremium/patch/HideGetPremiumPatch.kt index d0ff8d2dc..7ad9bd60b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ads/getpremium/patch/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ads/getpremium/patch/HideGetPremiumPatch.kt @@ -31,7 +31,7 @@ class HideGetPremiumPatch : BytecodePatch( addInstructions( startIndex + 2, """ - invoke-static {}, $PATCHES_PATH/ads/GeneralAdsPatch;->hideGetPremium()Z + invoke-static {}, $PATCHES_PATH/ads/AdsFilter;->hideGetPremium()Z move-result v$tempRegister if-eqz v$tempRegister, :show const/4 v$measuredWidthRegister, 0x0