build(Needs bump): Bump dependencies (#2946)
Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: aAbed <aabedhkhan@gmail.com> Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
This commit is contained in:
co-authored by
Ushie
aAbed
CnC-Robert
parent
fe3a6fd4a4
commit
8c8dff9078
+12
-17
@@ -1,23 +1,23 @@
|
||||
package app.revanced.patches.songpal.badge.patch
|
||||
package app.revanced.patches.songpal.badge
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.songpal.badge.fingerprints.CreateTabsFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Remove badge tab")
|
||||
@Description("Removes the badge tab from the activity tab.")
|
||||
@BadgeCompatibility
|
||||
class BadgeTabPatch : BytecodePatch(
|
||||
listOf(CreateTabsFingerprint)
|
||||
) {
|
||||
@Patch(
|
||||
name = "Remove badge tab",
|
||||
description = "Removes the badge tab from the activity tab.",
|
||||
compatiblePackages = [CompatiblePackage("com.sony.songpal.mdr")]
|
||||
)
|
||||
object BadgeTabPatch : BytecodePatch(setOf(CreateTabsFingerprint)) {
|
||||
const val ACTIVITY_TAB_DESCRIPTOR = "Ljp/co/sony/vim/framework/ui/yourheadphones/YhContract\$Tab;"
|
||||
private val arrayTabs = listOf("Log", "HealthCare")
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
CreateTabsFingerprint.result?.mutableMethod?.apply {
|
||||
removeInstructions(0, 2)
|
||||
@@ -52,9 +52,4 @@ class BadgeTabPatch : BytecodePatch(
|
||||
|
||||
} ?: throw CreateTabsFingerprint.exception
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val ACTIVITY_TAB_DESCRIPTOR = "Ljp/co/sony/vim/framework/ui/yourheadphones/YhContract\$Tab;"
|
||||
val arrayTabs = listOf("Log", "HealthCare")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package app.revanced.patches.songpal.badge
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint
|
||||
|
||||
@Patch(
|
||||
name = "Remove notification badge",
|
||||
description = "Removes the red notification badge from the activity tab.",
|
||||
compatiblePackages = [CompatiblePackage("com.sony.songpal.mdr")]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object RemoveNotificationBadgePatch : BytecodePatch(setOf(ShowNotificationFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ShowNotificationFingerprint.result?.mutableMethod?.addInstructions(0, "return-void")
|
||||
?: throw ShowNotificationFingerprint.exception
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.songpal.badge.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.sony.songpal.mdr")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class BadgeCompatibility
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.songpal.badge.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.songpal.badge.patch.BadgeTabPatch
|
||||
import app.revanced.patches.songpal.badge.BadgeTabPatch
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package app.revanced.patches.songpal.badge.patch
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility
|
||||
import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Remove notification badge")
|
||||
@Description("Removes the red notification badge from the activity tab.")
|
||||
@BadgeCompatibility
|
||||
class RemoveNotificationBadgePatch : BytecodePatch(
|
||||
listOf(ShowNotificationFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ShowNotificationFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructions(0, "return-void")
|
||||
} ?: throw ShowNotificationFingerprint.exception
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user