refactor(amazonmusic): use fingerprints.kt file for matching
This commit is contained in:
parent
2d7cf86bfd
commit
dfdd86aa7a
4 changed files with 41 additions and 20 deletions
|
|
@ -153,6 +153,10 @@ public final class app/revanced/patches/amazon/DeepLinkingPatchKt {
|
||||||
public static final fun getAlwaysAllowDeepLinkingPatch ()Lapp/revanced/patcher/patch/Patch;
|
public static final fun getAlwaysAllowDeepLinkingPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/amazonmusic/privacy/PreventUploadLogsPatchKt {
|
||||||
|
public static final fun getPreventUploadLogsPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
|
public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
|
||||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/Patch;
|
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package app.revanced.patches.amazonmusic.privacy
|
||||||
|
|
||||||
|
import app.revanced.patcher.gettingFirstClassDefDeclaratively
|
||||||
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
|
import app.revanced.patcher.name
|
||||||
|
import app.revanced.patcher.type
|
||||||
|
|
||||||
|
internal val BytecodePatchContext.pendingCrashLogsClass by gettingFirstClassDefDeclaratively {
|
||||||
|
type("Lcom/amazon/mp3/det/PendingCrashLogs;")
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val BytecodePatchContext.uploadLogAfterCrashMethod by gettingFirstMethodDeclaratively {
|
||||||
|
name("uploadLogAfterCrash")
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val BytecodePatchContext.uploadPendingCrashLogsIfRequiredMethod by gettingFirstMethodDeclaratively {
|
||||||
|
name("uploadPendingCrashLogsIfRequired")
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package app.revanced.patches.amazonmusic.privacy
|
||||||
|
|
||||||
|
import app.revanced.patcher.firstMethod
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.util.returnEarly
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val preventUploadLogsPatch = bytecodePatch(
|
||||||
|
name = "Prevent log upload",
|
||||||
|
description = "Avoid uploading logs when the application crashes.",
|
||||||
|
) {
|
||||||
|
compatibleWith("com.amazon.mp3")
|
||||||
|
|
||||||
|
apply {
|
||||||
|
pendingCrashLogsClass.firstMethod(uploadLogAfterCrashMethod).returnEarly()
|
||||||
|
pendingCrashLogsClass.firstMethod(uploadPendingCrashLogsIfRequiredMethod).returnEarly()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
package app.revanced.patches.amznmusic.misc.uploadlogs
|
|
||||||
|
|
||||||
import app.revanced.patcher.firstClassDef
|
|
||||||
import app.revanced.patcher.firstMethod
|
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
|
||||||
import app.revanced.util.returnEarly
|
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
val preventUploadLogsPatch = bytecodePatch(
|
|
||||||
name = "Prevent log upload",
|
|
||||||
description = "Avoid uploading logs when the application crashes.",
|
|
||||||
) {
|
|
||||||
compatibleWith("com.amazon.mp3")
|
|
||||||
|
|
||||||
apply {
|
|
||||||
var pendingCrashLogsClass = firstClassDef { type == "Lcom/amazon/mp3/det/PendingCrashLogs;" }
|
|
||||||
pendingCrashLogsClass.firstMethod { name == "uploadLogAfterCrash" }.returnEarly()
|
|
||||||
pendingCrashLogsClass.firstMethod { name == "uploadPendingCrashLogsIfRequired" }.returnEarly()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue