mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-30 14:44:33 +02:00
fix(YouTube - Copy video URL): Support A/B player layout
This commit is contained in:
parent
15a8848cca
commit
0f42574b7f
@ -1348,6 +1348,7 @@ public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPat
|
|||||||
public static final fun is_19_32_or_greater ()Z
|
public static final fun is_19_32_or_greater ()Z
|
||||||
public static final fun is_19_33_or_greater ()Z
|
public static final fun is_19_33_or_greater ()Z
|
||||||
public static final fun is_19_34_or_greater ()Z
|
public static final fun is_19_34_or_greater ()Z
|
||||||
|
public static final fun is_19_35_or_greater ()Z
|
||||||
public static final fun is_19_36_or_greater ()Z
|
public static final fun is_19_36_or_greater ()Z
|
||||||
public static final fun is_19_41_or_greater ()Z
|
public static final fun is_19_41_or_greater ()Z
|
||||||
public static final fun is_19_43_or_greater ()Z
|
public static final fun is_19_43_or_greater ()Z
|
||||||
|
@ -46,3 +46,11 @@ internal val controlsOverlayVisibilityFingerprint = fingerprint {
|
|||||||
returns("V")
|
returns("V")
|
||||||
parameters("Z", "Z")
|
parameters("Z", "Z")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val playerControlsExploderFeatureFlagFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("Z")
|
||||||
|
parameters()
|
||||||
|
literal { 45643739L }
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|||||||
import app.revanced.patches.shared.misc.mapping.get
|
import app.revanced.patches.shared.misc.mapping.get
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_19_35_or_greater
|
||||||
import app.revanced.util.*
|
import app.revanced.util.*
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
@ -217,6 +218,7 @@ val playerControlsPatch = bytecodePatch(
|
|||||||
val playerTopControlsInflateMatch by playerTopControlsInflateFingerprint()
|
val playerTopControlsInflateMatch by playerTopControlsInflateFingerprint()
|
||||||
val overlayViewInflateMatch by overlayViewInflateFingerprint()
|
val overlayViewInflateMatch by overlayViewInflateFingerprint()
|
||||||
val playerControlsExtensionHookMatch by playerControlsExtensionHookFingerprint()
|
val playerControlsExtensionHookMatch by playerControlsExtensionHookFingerprint()
|
||||||
|
val playerControlsExploderFeatureFlagMatch by playerControlsExploderFeatureFlagFingerprint()
|
||||||
|
|
||||||
execute { context ->
|
execute { context ->
|
||||||
fun MutableMethod.indexOfFirstViewInflateOrThrow() =
|
fun MutableMethod.indexOfFirstViewInflateOrThrow() =
|
||||||
@ -269,5 +271,13 @@ val playerControlsPatch = bytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
visibilityImmediateMethod = playerControlsExtensionHookMatch.mutableMethod
|
visibilityImmediateMethod = playerControlsExtensionHookMatch.mutableMethod
|
||||||
|
|
||||||
|
// A/B test for a slightly different overlay controls,
|
||||||
|
// that uses layout file youtube_video_exploder_controls_bottom_ui_container.xml
|
||||||
|
// The change to support this is simple and only requires adding buttons to both layout files,
|
||||||
|
// but for now force this different layout off since it's still an experimental test.
|
||||||
|
if (is_19_35_or_greater) {
|
||||||
|
playerControlsExploderFeatureFlagMatch.mutableMethod.returnEarly()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ var is_19_33_or_greater = false
|
|||||||
private set
|
private set
|
||||||
var is_19_34_or_greater = false
|
var is_19_34_or_greater = false
|
||||||
private set
|
private set
|
||||||
|
var is_19_35_or_greater = false
|
||||||
|
private set
|
||||||
var is_19_36_or_greater = false
|
var is_19_36_or_greater = false
|
||||||
private set
|
private set
|
||||||
var is_19_41_or_greater = false
|
var is_19_41_or_greater = false
|
||||||
@ -62,6 +64,7 @@ val versionCheckPatch = resourcePatch(
|
|||||||
is_19_32_or_greater = 243199000 <= playStoreServicesVersion
|
is_19_32_or_greater = 243199000 <= playStoreServicesVersion
|
||||||
is_19_33_or_greater = 243405000 <= playStoreServicesVersion
|
is_19_33_or_greater = 243405000 <= playStoreServicesVersion
|
||||||
is_19_34_or_greater = 243499000 <= playStoreServicesVersion
|
is_19_34_or_greater = 243499000 <= playStoreServicesVersion
|
||||||
|
is_19_35_or_greater = 243605000 <= playStoreServicesVersion
|
||||||
is_19_36_or_greater = 243705000 <= playStoreServicesVersion
|
is_19_36_or_greater = 243705000 <= playStoreServicesVersion
|
||||||
is_19_41_or_greater = 244305000 <= playStoreServicesVersion
|
is_19_41_or_greater = 244305000 <= playStoreServicesVersion
|
||||||
is_19_43_or_greater = 244405000 <= playStoreServicesVersion
|
is_19_43_or_greater = 244405000 <= playStoreServicesVersion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user