Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot
d4b0a598cb chore(release): 2.197.0-dev.3 [skip ci]
# [2.197.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.197.0-dev.2...v2.197.0-dev.3) (2023-11-17)

### Features

* **Android Widgets (Material U):** Remove `Unlock paid widgets` patch ([#3286](https://github.com/ReVanced/revanced-patches/issues/3286)) ([eda326f](eda326f5e5))
2023-11-17 19:44:01 +00:00
1fexd
eda326f5e5 feat(Android Widgets (Material U)): Remove Unlock paid widgets patch (#3286) 2023-11-17 20:41:45 +01:00
LisoUseInAIKyrios
ba34d2e28f build: fix other typo 2023-11-17 20:43:13 +02:00
LisoUseInAIKyrios
b298ff3093 chore: fix typo 2023-11-17 19:42:10 +02:00
11 changed files with 9 additions and 86 deletions

View File

@@ -1,3 +1,10 @@
# [2.197.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.197.0-dev.2...v2.197.0-dev.3) (2023-11-17)
### Features
* **Android Widgets (Material U):** Remove `Unlock paid widgets` patch ([#3286](https://github.com/ReVanced/revanced-patches/issues/3286)) ([b44da1c](https://github.com/ReVanced/revanced-patches/commit/b44da1c7018c88d30be0849569837b4e17c68e0f))
# [2.197.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.197.0-dev.1...v2.197.0-dev.2) (2023-11-17)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.197.0-dev.2
version = 2.197.0-dev.3

File diff suppressed because one or more lines are too long

View File

@@ -1,52 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock
import app.revanced.extensions.exception
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.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.twelvewidgets.unlock.fingerprints.*
@Patch(
name = "Unlock paid widgets",
description = "Unlocks paid widgets of the app",
compatiblePackages = [CompatiblePackage("com.dci.dev.androidtwelvewidgets")]
)
@Suppress("unused")
object UnlockPaidWidgetsPatch : BytecodePatch(
setOf(
AgendaDaysWidgetUnlockFingerprint,
CalendarBigWidgetUnlockFingerprint,
CalendarWideDayEventsWidgetUnlockFingerprint,
CalendarWideTimelineWidgetUnlockFingerprint,
ScreentimeSmallWidgetUnlockFingerprint,
WeatherWidgetUnlockFingerprint
)
) {
override fun execute(context: BytecodeContext) {
listOf(
AgendaDaysWidgetUnlockFingerprint,
CalendarBigWidgetUnlockFingerprint,
CalendarWideDayEventsWidgetUnlockFingerprint,
CalendarWideTimelineWidgetUnlockFingerprint,
ScreentimeSmallWidgetUnlockFingerprint,
WeatherWidgetUnlockFingerprint
).map { fingerprint ->
fingerprint.result?.mutableMethod ?: throw fingerprint.exception
}.forEach { method ->
method.apply {
removeInstructions(4, 3)
addInstructions(
implementation?.instructions?.size!!,
"""
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
return-object v0
"""
)
}
}
}
}

View File

@@ -1,3 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object AgendaDaysWidgetUnlockFingerprint : MethodUnlockFingerprint("AgendaDaysWidgetConfigureActivity")

View File

@@ -1,3 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object CalendarBigWidgetUnlockFingerprint : MethodUnlockFingerprint("CalendarBigWidgetConfigureActivity")

View File

@@ -1,4 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object CalendarWideDayEventsWidgetUnlockFingerprint :
MethodUnlockFingerprint("CalendarWideDayEventsWidgetConfigureActivity")

View File

@@ -1,4 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object CalendarWideTimelineWidgetUnlockFingerprint :
MethodUnlockFingerprint("CalendarWideTimelineWidgetConfigureActivity")

View File

@@ -1,12 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
abstract class MethodUnlockFingerprint(private val className: String) : MethodFingerprint(
"L",
strings = listOf("binding.addButton"),
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("/$className;")
}
)

View File

@@ -1,3 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object ScreentimeSmallWidgetUnlockFingerprint : MethodUnlockFingerprint("ScreentimeSmallWidgetConfigureActivity")

View File

@@ -1,3 +0,0 @@
package app.revanced.patches.twelvewidgets.unlock.fingerprints
object WeatherWidgetUnlockFingerprint : MethodUnlockFingerprint("WeatherWidgetConfigureActivity")