Merge branch 'github/fork/obXfuse/amznmusic_crashupload' into 'dev'
feat(Amazon Music): Add `Prevent log upload` See merge request ReVanced/revanced-patches!6858
This commit is contained in:
commit
1d3fe4ceb9
3 changed files with 41 additions and 0 deletions
|
|
@ -165,6 +165,10 @@ public final class app/revanced/patches/amazon/DeepLinkingPatchKt {
|
|||
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 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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue