Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
remove usage of deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 15, 2024
1 parent 0267845 commit 53383e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fun sharedExtensionPatch(
hooks.forEach { it.fingerprint() }

execute { context ->
if (context.classByType(EXTENSION_CLASS_DESCRIPTOR) == null) {
if (context.classBy { EXTENSION_CLASS_DESCRIPTOR in it.type } == null) {
throw PatchException(
"Shared extension has not been merged yet. This patch can not succeed without merging it.",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val hideCastButtonPatch = bytecodePatch(
SwitchPreference("revanced_hide_cast_button"),
)

val buttonClass = context.classByType("MediaRouteButton")
val buttonClass = context.classBy { "MediaRouteButton" in it.type }
?: throw PatchException("MediaRouteButton class not found.")

buttonClass.mutableClass.methods.find { it.name == "setVisibility" }?.addInstructions(
Expand Down

0 comments on commit 53383e1

Please sign in to comment.