Skip to content

Commit 611aa03

Browse files
committed
Youtube: Directly checks for the native protobuf parsing feature ID to disable it.
Fix play/pause button missing in in-app PIP and other unknown side-effects caused by disable too many feature IDs
1 parent 0e0c476 commit 611aa03

File tree

1 file changed

+6
-4
lines changed
  • app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/misc/litho/filter

1 file changed

+6
-4
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/youtube/misc/litho/filter/LithoFilterPatch.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import app.revanced.extension.youtube.patches.components.Filter
44
import app.revanced.extension.youtube.patches.components.LithoFilterPatch
55
import de.robv.android.xposed.XC_MethodReplacement.returnConstant
66
import io.github.chsbuffer.revancedxposed.new
7-
import io.github.chsbuffer.revancedxposed.scopedHook
87
import io.github.chsbuffer.revancedxposed.youtube.YoutubeHook
98
import java.nio.ByteBuffer
109

@@ -70,9 +69,12 @@ fun YoutubeHook.LithoFilter() {
7069
// Turn off a feature flag that enables native code of protobuf parsing (Upb protobuf).
7170
// If this is enabled, then the litho protobuffer hook will always show an empty buffer
7271
// since it's no longer handled by the hooked Java code.
73-
::lithoConverterBufferUpbFeatureFlagFingerprint.hookMethod(scopedHook(::featureFlagCheck.member) {
74-
before { it.result = false }
75-
})
72+
::featureFlagCheck.hookMethod {
73+
before {
74+
if (it.args[0] == 45419603L)
75+
it.result = false
76+
}
77+
}
7678

7779
// endregion
7880
}

0 commit comments

Comments
 (0)