generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(YouTube - Downloads): Use new task context (#2841)
- Loading branch information
1 parent
f24adf7
commit 6d88cb4
Showing
14 changed files
with
142 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...es/youtube/interaction/downloads/fingerprints/DownloadActionCommandResolverFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package app.revanced.patches.youtube.interaction.downloads.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
|
||
/** | ||
* Resolves to the class found in [DownloadActionCommandResolverParentFingerprint]. | ||
*/ | ||
internal object DownloadActionCommandResolverFingerprint : MethodFingerprint( | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
returnType = "V", | ||
parameters = listOf("L", "Ljava/util/Map;") | ||
) |
17 changes: 17 additions & 0 deletions
17
...tube/interaction/downloads/fingerprints/DownloadActionCommandResolverParentFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package app.revanced.patches.youtube.interaction.downloads.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.util.patch.LiteralValueFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
|
||
internal object DownloadActionCommandResolverParentFingerprint : LiteralValueFingerprint( | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
returnType = "V", | ||
parameters = listOf("L", "L"), | ||
strings = listOf( | ||
// Strings are not unique and found in other methods. | ||
"com.google.android.libraries.youtube.logging.interaction_logger", | ||
"Unknown command" | ||
), | ||
literalSupplier = { 16 } | ||
) |
7 changes: 0 additions & 7 deletions
7
...ced/patches/youtube/interaction/downloads/fingerprints/DownloadButtonActionFingerprint.kt
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...es/youtube/interaction/downloads/fingerprints/LegacyDownloadCommandResolverFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package app.revanced.patches.youtube.interaction.downloads.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
/** | ||
* For spoofing to older versions. Also called if download playlist is pressed for any version. | ||
*/ | ||
internal object LegacyDownloadCommandResolverFingerprint : MethodFingerprint( | ||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, | ||
returnType = "V", | ||
parameters = listOf("Ljava/lang/String;", "Ljava/lang/String;", "L", "L"), | ||
strings = listOf(""), | ||
opcodes = listOf( | ||
Opcode.MOVE_OBJECT_FROM16, | ||
Opcode.MOVE_OBJECT_FROM16, | ||
Opcode.NEW_INSTANCE, | ||
Opcode.INVOKE_DIRECT, | ||
Opcode.IGET_OBJECT, | ||
Opcode.IF_NEZ, | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...atches/youtube/misc/playeroverlay/fingerprint/PlayerOverlaysOnFinishInflateFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
package app.revanced.patches.youtube.misc.playeroverlay.fingerprint | ||
|
||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
|
||
internal object PlayerOverlaysOnFinishInflateFingerprint : MethodFingerprint( | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
returnType = "V", | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.definingClass.endsWith("YouTubePlayerOverlaysLayout;") && methodDef.name == "onFinishInflate" | ||
} | ||
methodDef.definingClass.endsWith("/YouTubePlayerOverlaysLayout;") | ||
&& methodDef.name == "onFinishInflate" | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters