Skip to content

Commit 690b5dc

Browse files
authored
chore: Merge RVX
2 parents 397de5d + e986061 commit 690b5dc

267 files changed

Lines changed: 891 additions & 631 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/revanced-patches.api

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ public final class app/revanced/patches/music/layout/branding/name/CustomBrandin
131131
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
132132
}
133133

134-
public final class app/revanced/patches/music/layout/doubletapbackground/DoubleTapOverlayBackgroundPatch : app/revanced/util/patch/BaseResourcePatch {
135-
public static final field INSTANCE Lapp/revanced/patches/music/layout/doubletapbackground/DoubleTapOverlayBackgroundPatch;
136-
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
137-
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
138-
}
139-
140134
public final class app/revanced/patches/music/layout/header/ChangeHeaderPatch : app/revanced/util/patch/BaseResourcePatch {
141135
public static final field INSTANCE Lapp/revanced/patches/music/layout/header/ChangeHeaderPatch;
142136
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
@@ -331,6 +325,7 @@ public final class app/revanced/patches/music/utils/resourceid/SharedResourceIdP
331325
public final fun getButtonIconPaddingMedium ()J
332326
public final fun getChipCloud ()J
333327
public final fun getColorGrey ()J
328+
public final fun getDarkBackground ()J
334329
public final fun getDesignBottomSheetDialog ()J
335330
public final fun getDialogSolid ()J
336331
public final fun getEndButtonsContainer ()J
@@ -353,6 +348,7 @@ public final class app/revanced/patches/music/utils/resourceid/SharedResourceIdP
353348
public final fun getQualityAuto ()J
354349
public final fun getRemixGenericButtonSize ()J
355350
public final fun getSlidingDialogAnimation ()J
351+
public final fun getTapBloomView ()J
356352
public final fun getText1 ()J
357353
public final fun getToolTipContentView ()J
358354
public final fun getTopBarMenuItemImageView ()J
@@ -368,6 +364,7 @@ public final class app/revanced/patches/music/utils/resourceid/SharedResourceIdP
368364
public final fun setButtonIconPaddingMedium (J)V
369365
public final fun setChipCloud (J)V
370366
public final fun setColorGrey (J)V
367+
public final fun setDarkBackground (J)V
371368
public final fun setDesignBottomSheetDialog (J)V
372369
public final fun setDialogSolid (J)V
373370
public final fun setEndButtonsContainer (J)V
@@ -390,6 +387,7 @@ public final class app/revanced/patches/music/utils/resourceid/SharedResourceIdP
390387
public final fun setQualityAuto (J)V
391388
public final fun setRemixGenericButtonSize (J)V
392389
public final fun setSlidingDialogAnimation (J)V
390+
public final fun setTapBloomView (J)V
393391
public final fun setText1 (J)V
394392
public final fun setToolTipContentView (J)V
395393
public final fun setTopBarMenuItemImageView (J)V
@@ -879,10 +877,6 @@ public final class app/revanced/patches/shared/translations/TranslationsUtilsKt
879877
public static final fun getAPP_LANGUAGES ()[Ljava/lang/String;
880878
}
881879

882-
public final class app/revanced/patches/shared/voicesearch/VoiceSearchUtils {
883-
public static final field INSTANCE Lapp/revanced/patches/shared/voicesearch/VoiceSearchUtils;
884-
}
885-
886880
public final class app/revanced/patches/youtube/ads/general/AdsBytecodePatch : app/revanced/patcher/patch/BytecodePatch {
887881
public static final field INSTANCE Lapp/revanced/patches/youtube/ads/general/AdsBytecodePatch;
888882
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1019,14 +1013,8 @@ public final class app/revanced/patches/youtube/general/toolbar/fingerprints/Sea
10191013
public static final field INSTANCE Lapp/revanced/patches/youtube/general/toolbar/fingerprints/SearchResultFingerprint;
10201014
}
10211015

1022-
public final class app/revanced/patches/youtube/layout/animated/AnimatedButtonBackgroundPatch : app/revanced/util/patch/BaseResourcePatch {
1023-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/animated/AnimatedButtonBackgroundPatch;
1024-
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1025-
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
1026-
}
1027-
1028-
public final class app/revanced/patches/youtube/layout/animated/AnimatedLikePatch : app/revanced/util/patch/BaseResourcePatch {
1029-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/animated/AnimatedLikePatch;
1016+
public final class app/revanced/patches/youtube/layout/actionbuttons/ShortsActionButtonsPatch : app/revanced/util/patch/BaseResourcePatch {
1017+
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/actionbuttons/ShortsActionButtonsPatch;
10301018
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10311019
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10321020
}
@@ -1050,14 +1038,14 @@ public final class app/revanced/patches/youtube/layout/dimming/ShortsDimmingPatc
10501038
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10511039
}
10521040

1053-
public final class app/revanced/patches/youtube/layout/doubletapbackground/DoubleTapOverlayBackgroundPatch : app/revanced/util/patch/BaseResourcePatch {
1054-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/doubletapbackground/DoubleTapOverlayBackgroundPatch;
1041+
public final class app/revanced/patches/youtube/layout/doubletaplength/DoubleTapLengthPatch : app/revanced/util/patch/BaseResourcePatch {
1042+
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/doubletaplength/DoubleTapLengthPatch;
10551043
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10561044
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10571045
}
10581046

1059-
public final class app/revanced/patches/youtube/layout/doubletaplength/DoubleTapLengthPatch : app/revanced/util/patch/BaseResourcePatch {
1060-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/doubletaplength/DoubleTapLengthPatch;
1047+
public final class app/revanced/patches/youtube/layout/header/ChangeHeaderPatch : app/revanced/util/patch/BaseResourcePatch {
1048+
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/header/ChangeHeaderPatch;
10611049
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10621050
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10631051
}
@@ -1068,8 +1056,8 @@ public final class app/revanced/patches/youtube/layout/header/CustomBrandingHead
10681056
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10691057
}
10701058

1071-
public final class app/revanced/patches/youtube/layout/playerbuttonbg/ForcePlayerButtonBackgroundPatch : app/revanced/util/patch/BaseResourcePatch {
1072-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/playerbuttonbg/ForcePlayerButtonBackgroundPatch;
1059+
public final class app/revanced/patches/youtube/layout/playerbuttonbg/PlayerButtonBackgroundPatch : app/revanced/util/patch/BaseResourcePatch {
1060+
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/playerbuttonbg/PlayerButtonBackgroundPatch;
10731061
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10741062
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
10751063
}
@@ -1254,6 +1242,12 @@ public final class app/revanced/patches/youtube/player/speedoverlay/SpeedOverlay
12541242
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
12551243
}
12561244

1245+
public final class app/revanced/patches/youtube/shorts/components/ShortsAnimationPatch : app/revanced/patcher/patch/BytecodePatch {
1246+
public static final field INSTANCE Lapp/revanced/patches/youtube/shorts/components/ShortsAnimationPatch;
1247+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
1248+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1249+
}
1250+
12571251
public final class app/revanced/patches/youtube/shorts/components/ShortsComponentPatch : app/revanced/util/patch/BaseBytecodePatch {
12581252
public static final field INSTANCE Lapp/revanced/patches/youtube/shorts/components/ShortsComponentPatch;
12591253
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1278,12 +1272,6 @@ public final class app/revanced/patches/youtube/shorts/repeat/ShortsRepeatPatch
12781272
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
12791273
}
12801274

1281-
public final class app/revanced/patches/youtube/shorts/shortsoverlay/ShortsOverlayButtonsPatch : app/revanced/util/patch/BaseResourcePatch {
1282-
public static final field INSTANCE Lapp/revanced/patches/youtube/shorts/shortsoverlay/ShortsOverlayButtonsPatch;
1283-
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1284-
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
1285-
}
1286-
12871275
public final class app/revanced/patches/youtube/shorts/startupshortsreset/ResumingShortsOnStartupPatch : app/revanced/util/patch/BaseBytecodePatch {
12881276
public static final field INSTANCE Lapp/revanced/patches/youtube/shorts/startupshortsreset/ResumingShortsOnStartupPatch;
12891277
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1423,6 +1411,12 @@ public final class app/revanced/patches/youtube/utils/lockmodestate/LockModeStat
14231411
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
14241412
}
14251413

1414+
public final class app/revanced/patches/youtube/utils/lottie/LottieAnimationViewHookPatch : app/revanced/patcher/patch/BytecodePatch {
1415+
public static final field INSTANCE Lapp/revanced/patches/youtube/utils/lottie/LottieAnimationViewHookPatch;
1416+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
1417+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1418+
}
1419+
14261420
public final class app/revanced/patches/youtube/utils/mainactivity/MainActivityResolvePatch : app/revanced/patches/shared/mainactivity/BaseMainActivityResolvePatch {
14271421
public static final field INSTANCE Lapp/revanced/patches/youtube/utils/mainactivity/MainActivityResolvePatch;
14281422
}
@@ -1485,6 +1479,7 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
14851479
public final fun getCompactLink ()J
14861480
public final fun getCompactListItem ()J
14871481
public final fun getControlsLayoutStub ()J
1482+
public final fun getDarkBackground ()J
14881483
public final fun getDarkSplashAnimation ()J
14891484
public final fun getDonationCompanion ()J
14901485
public final fun getDrawerContentView ()J
@@ -1523,9 +1518,12 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
15231518
public final fun getQuickActionsElementContainer ()J
15241519
public final fun getReelDynRemix ()J
15251520
public final fun getReelDynShare ()J
1521+
public final fun getReelFeedbackLike ()J
1522+
public final fun getReelFeedbackPause ()J
1523+
public final fun getReelFeedbackPlay ()J
15261524
public final fun getReelForcedMuteButton ()J
1527-
public final fun getReelPivotButton ()J
15281525
public final fun getReelPlayerFooter ()J
1526+
public final fun getReelPlayerRightPivotV2Size ()J
15291527
public final fun getReelRightDislikeIcon ()J
15301528
public final fun getReelRightLikeIcon ()J
15311529
public final fun getReelTimeBarPlayedColor ()J
@@ -1539,6 +1537,7 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
15391537
public final fun getSlidingDialogAnimation ()J
15401538
public final fun getSubtitleMenuSettingsFooterInfo ()J
15411539
public final fun getSuggestedAction ()J
1540+
public final fun getTapBloomView ()J
15421541
public final fun getTitleAnchor ()J
15431542
public final fun getToolTipContentView ()J
15441543
public final fun getTotalTime ()J
@@ -1575,6 +1574,7 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
15751574
public final fun setCompactLink (J)V
15761575
public final fun setCompactListItem (J)V
15771576
public final fun setControlsLayoutStub (J)V
1577+
public final fun setDarkBackground (J)V
15781578
public final fun setDarkSplashAnimation (J)V
15791579
public final fun setDonationCompanion (J)V
15801580
public final fun setDrawerContentView (J)V
@@ -1613,9 +1613,12 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
16131613
public final fun setQuickActionsElementContainer (J)V
16141614
public final fun setReelDynRemix (J)V
16151615
public final fun setReelDynShare (J)V
1616+
public final fun setReelFeedbackLike (J)V
1617+
public final fun setReelFeedbackPause (J)V
1618+
public final fun setReelFeedbackPlay (J)V
16161619
public final fun setReelForcedMuteButton (J)V
1617-
public final fun setReelPivotButton (J)V
16181620
public final fun setReelPlayerFooter (J)V
1621+
public final fun setReelPlayerRightPivotV2Size (J)V
16191622
public final fun setReelRightDislikeIcon (J)V
16201623
public final fun setReelRightLikeIcon (J)V
16211624
public final fun setReelTimeBarPlayedColor (J)V
@@ -1629,6 +1632,7 @@ public final class app/revanced/patches/youtube/utils/resourceid/SharedResourceI
16291632
public final fun setSlidingDialogAnimation (J)V
16301633
public final fun setSubtitleMenuSettingsFooterInfo (J)V
16311634
public final fun setSuggestedAction (J)V
1635+
public final fun setTapBloomView (J)V
16321636
public final fun setTitleAnchor (J)V
16331637
public final fun setToolTipContentView (J)V
16341638
public final fun setTotalTime (J)V

src/main/kotlin/app/revanced/patches/music/general/components/LayoutComponentsPatch.kt

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith
77
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
88
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
99
import app.revanced.patcher.patch.PatchException
10-
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.booleanPatchOption
1110
import app.revanced.patcher.util.smali.ExternalLabel
1211
import app.revanced.patches.music.general.components.fingerprints.ChipCloudFingerprint
1312
import app.revanced.patches.music.general.components.fingerprints.ContentPillInFingerprint
@@ -32,7 +31,6 @@ import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.TopBarM
3231
import app.revanced.patches.music.utils.settings.CategoryType
3332
import app.revanced.patches.music.utils.settings.SettingsPatch
3433
import app.revanced.patches.shared.litho.LithoFilterPatch
35-
import app.revanced.patches.shared.voicesearch.VoiceSearchUtils.patchXml
3634
import app.revanced.util.getTargetIndexOrThrow
3735
import app.revanced.util.getTargetIndexWithMethodReferenceNameOrThrow
3836
import app.revanced.util.getWideLiteralInstructionIndex
@@ -74,18 +72,9 @@ object LayoutComponentsPatch : BaseBytecodePatch(
7472
private const val LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR =
7573
"$COMPONENTS_PATH/LayoutComponentsFilter;"
7674

77-
private val ForceHideVoiceSearchButton by booleanPatchOption(
78-
key = "ForceHideVoiceSearchButton",
79-
default = false,
80-
title = "Force hide voice search button",
81-
description = "Permanently hide the voice search button with the legacy method.",
82-
required = true
83-
)
84-
8575
override fun execute(context: BytecodeContext) {
8676
var notificationButtonIncluded = false
8777
var soundSearchButtonIncluded = false
88-
var voiceSearchButtonIncluded = false
8978

9079
// region patch for hide cast button
9180

@@ -272,31 +261,23 @@ object LayoutComponentsPatch : BaseBytecodePatch(
272261

273262
// region patch for hide voice search button
274263

275-
if (ForceHideVoiceSearchButton == true) {
276-
SettingsPatch.contexts.patchXml(
277-
arrayOf("search_toolbar_view.xml"),
278-
arrayOf("height", "width")
279-
)
280-
} else {
281-
SearchBarFingerprint.resolve(
282-
context,
283-
SearchBarParentFingerprint.resultOrThrow().classDef
284-
)
285-
SearchBarFingerprint.resultOrThrow().let {
286-
it.mutableMethod.apply {
287-
val setVisibilityIndex =
288-
getTargetIndexWithMethodReferenceNameOrThrow("setVisibility")
289-
val setVisibilityInstruction =
290-
getInstruction<FiveRegisterInstruction>(setVisibilityIndex)
291-
292-
replaceInstruction(
293-
setVisibilityIndex,
294-
"invoke-static {v${setVisibilityInstruction.registerC}, v${setVisibilityInstruction.registerD}}, " +
295-
"$GENERAL_CLASS_DESCRIPTOR->hideVoiceSearchButton(Landroid/widget/ImageView;I)V"
296-
)
297-
}
264+
SearchBarFingerprint.resolve(
265+
context,
266+
SearchBarParentFingerprint.resultOrThrow().classDef
267+
)
268+
SearchBarFingerprint.resultOrThrow().let {
269+
it.mutableMethod.apply {
270+
val setVisibilityIndex =
271+
getTargetIndexWithMethodReferenceNameOrThrow("setVisibility")
272+
val setVisibilityInstruction =
273+
getInstruction<FiveRegisterInstruction>(setVisibilityIndex)
274+
275+
replaceInstruction(
276+
setVisibilityIndex,
277+
"invoke-static {v${setVisibilityInstruction.registerC}, v${setVisibilityInstruction.registerD}}, " +
278+
"$GENERAL_CLASS_DESCRIPTOR->hideVoiceSearchButton(Landroid/widget/ImageView;I)V"
279+
)
298280
}
299-
voiceSearchButtonIncluded = true
300281
}
301282

302283
// endregion
@@ -373,12 +354,10 @@ object LayoutComponentsPatch : BaseBytecodePatch(
373354
"false"
374355
)
375356
}
376-
if (voiceSearchButtonIncluded) {
377-
SettingsPatch.addSwitchPreference(
378-
CategoryType.GENERAL,
379-
"revanced_hide_voice_search_button",
380-
"false"
381-
)
382-
}
357+
SettingsPatch.addSwitchPreference(
358+
CategoryType.GENERAL,
359+
"revanced_hide_voice_search_button",
360+
"false"
361+
)
383362
}
384363
}

src/main/kotlin/app/revanced/patches/music/layout/doubletapbackground/DoubleTapOverlayBackgroundPatch.kt

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)