Skip to content

Commit

Permalink
fix: keep binary compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Dec 17, 2024
1 parent 1f95287 commit 01d275d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public static void setOpenNextShortFullscreen(@Nullable Boolean forceFullScreen)
* Changed by 'Open videos fullscreen' patch,
* as this class is also used by 'Open Shorts in regular player' patch.
*/
private static boolean fullScreenPatchIncluded() {
return false; // Modified by patches
private static boolean isFullScreenPatchIncluded() {
return false; // Modified by patches.
}

/**
Expand All @@ -32,7 +32,7 @@ public static boolean openVideoFullscreenPortrait(boolean original) {
return openFullscreen;
}

if (!fullScreenPatchIncluded()) {
if (!isFullScreenPatchIncluded()) {
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions patches/api/patches.api
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,10 @@ public final class app/revanced/patches/youtube/layout/player/background/PlayerC
public static final fun getPlayerControlsBackgroundPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
}

public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenFullscreenVideosKt {
public static final fun getOpenVideosFullscreen ()Lapp/revanced/patcher/patch/BytecodePatch;
}

public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatchKt {
public static final fun getOpenVideosFullscreenPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ internal val openVideosFullscreenHookPatchExtensionFingerprint = fingerprint {
returns("Z")
parameters()
custom { methodDef, classDef ->
methodDef.name == "fullScreenPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
methodDef.name == "isFullScreenPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.revanced.patches.youtube.layout.player.fullscreen

import app.revanced.patcher.patch.bytecodePatch

@Suppress("unused")
@Deprecated("Renamed to openVideosFullscreenPatch", ReplaceWith("openVideosFullscreenPatch"))
val openVideosFullscreen = bytecodePatch{
dependsOn(openVideosFullscreenPatch)
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ val openVideosFullscreenPatch = bytecodePatch(
SwitchPreference("revanced_open_videos_fullscreen_portrait")
)
}
}
}

0 comments on commit 01d275d

Please sign in to comment.