forked from inotia00/revanced-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into revanced-extended
- Loading branch information
Showing
108 changed files
with
2,522 additions
and
779 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
org.gradle.parallel = true | ||
org.gradle.caching = true | ||
kotlin.code.style = official | ||
version = 4.14.2 | ||
version = 4.15.1 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
20 changes: 0 additions & 20 deletions
20
...n/app/revanced/patches/music/flyoutmenu/components/fingerprints/DialogSolidFingerprint.kt
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
...n/app/revanced/patches/music/flyoutmenu/components/fingerprints/ScreenWidthFingerprint.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,11 @@ | ||
package app.revanced.patches.music.flyoutmenu.components.fingerprints | ||
|
||
import app.revanced.util.fingerprint.LiteralValueFingerprint | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
internal object ScreenWidthFingerprint : LiteralValueFingerprint( | ||
returnType = "Z", | ||
parameters = listOf("L"), | ||
opcodes = listOf(Opcode.IF_LT), | ||
literalSupplier = { 600 }, | ||
) |
22 changes: 22 additions & 0 deletions
22
...revanced/patches/music/flyoutmenu/components/fingerprints/ScreenWidthParentFingerprint.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,22 @@ | ||
package app.revanced.patches.music.flyoutmenu.components.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import app.revanced.util.getReference | ||
import app.revanced.util.indexOfFirstInstructionReversed | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference | ||
|
||
internal object ScreenWidthParentFingerprint : MethodFingerprint( | ||
returnType = "Landroid/graphics/Bitmap;", | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, | ||
parameters = listOf("Landroid/app/Activity;", "I"), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.indexOfFirstInstructionReversed { | ||
opcode == Opcode.INVOKE_VIRTUAL && | ||
getReference<MethodReference>()?.name == "destroyDrawingCache" | ||
} >= 0 | ||
} | ||
) | ||
|
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
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
45 changes: 45 additions & 0 deletions
45
...tlin/app/revanced/patches/music/utils/returnyoutubeusername/ReturnYouTubeUsernamePatch.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,45 @@ | ||
package app.revanced.patches.music.utils.returnyoutubeusername | ||
|
||
import app.revanced.patcher.data.BytecodeContext | ||
import app.revanced.patches.music.utils.compatibility.Constants.COMPATIBLE_PACKAGE | ||
import app.revanced.patches.music.utils.settings.CategoryType | ||
import app.revanced.patches.music.utils.settings.SettingsPatch | ||
import app.revanced.patches.shared.returnyoutubeusername.BaseReturnYouTubeUsernamePatch | ||
import app.revanced.util.patch.BaseBytecodePatch | ||
|
||
@Suppress("unused") | ||
object ReturnYouTubeUsernamePatch : BaseBytecodePatch( | ||
name = "Return YouTube Username", | ||
description = "Adds an option to replace YouTube handles with usernames in comments using YouTube Data API v3.", | ||
dependencies = setOf( | ||
BaseReturnYouTubeUsernamePatch::class, | ||
SettingsPatch::class, | ||
), | ||
compatiblePackages = COMPATIBLE_PACKAGE, | ||
use = false | ||
) { | ||
override fun execute(context: BytecodeContext) { | ||
|
||
SettingsPatch.addSwitchPreference( | ||
CategoryType.RETURN_YOUTUBE_USERNAME, | ||
"revanced_return_youtube_username_enabled", | ||
"false" | ||
) | ||
SettingsPatch.addPreferenceWithIntent( | ||
CategoryType.RETURN_YOUTUBE_USERNAME, | ||
"revanced_return_youtube_username_display_format", | ||
"revanced_return_youtube_username_enabled" | ||
) | ||
SettingsPatch.addPreferenceWithIntent( | ||
CategoryType.RETURN_YOUTUBE_USERNAME, | ||
"revanced_return_youtube_username_youtube_data_api_v3_developer_key", | ||
"revanced_return_youtube_username_enabled" | ||
) | ||
if (SettingsPatch.upward0627) { | ||
SettingsPatch.addPreferenceWithIntent( | ||
CategoryType.RETURN_YOUTUBE_USERNAME, | ||
"revanced_return_youtube_username_youtube_data_api_v3_about" | ||
) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.