mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 13:41:03 +00:00
Compare commits
4 Commits
v2.175.0-d
...
v2.175.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d67e6175c1 | ||
|
|
34844281f5 | ||
|
|
c13ba26234 | ||
|
|
d0ee0de0ca |
36
CHANGELOG.md
36
CHANGELOG.md
@@ -1,3 +1,39 @@
|
|||||||
|
# [2.175.0](https://github.com/revanced/revanced-patches/compare/v2.174.0...v2.175.0) (2023-05-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **settings:** sort setting preferences using lowercase ([#2312](https://github.com/revanced/revanced-patches/issues/2312)) ([2743a95](https://github.com/revanced/revanced-patches/commit/2743a95b417a6023799035e30631e7b3a68bcc45))
|
||||||
|
* **spoof-wifi-connection:** use updated instruction indices ([#2199](https://github.com/revanced/revanced-patches/issues/2199)) ([76fb700](https://github.com/revanced/revanced-patches/commit/76fb700884dae5b71a57f9530fad9d4a98ba0af0))
|
||||||
|
* **youtube/downloads:** rename patch to `external-downloads` ([#2274](https://github.com/revanced/revanced-patches/issues/2274)) ([4480911](https://github.com/revanced/revanced-patches/commit/4480911e0b056f2148616a0c2af6b4ab7c482c3b))
|
||||||
|
* **youtube/hide-info-cards:** fix hide-info-cards setting does not work ([#2246](https://github.com/revanced/revanced-patches/issues/2246)) ([72773ac](https://github.com/revanced/revanced-patches/commit/72773ac56987753fac6c0087d048b4378a3dd360))
|
||||||
|
* **youtube/hide-player-buttons:** fix previous/next button showing if previous video exists ([#2261](https://github.com/revanced/revanced-patches/issues/2261)) ([91d1aab](https://github.com/revanced/revanced-patches/commit/91d1aabd32be1607019bc443fb06284ca3343e9d))
|
||||||
|
* **youtube/hide-shorts-components:** clarify settings switch ([#2276](https://github.com/revanced/revanced-patches/issues/2276)) ([3e6d052](https://github.com/revanced/revanced-patches/commit/3e6d0528b287ded401dacdcea698d4ec97b926ee))
|
||||||
|
* **youtube/integrations:** fix playback of embedded videos ([#2304](https://github.com/revanced/revanced-patches/issues/2304)) ([1dffbaf](https://github.com/revanced/revanced-patches/commit/1dffbaf0aa73f0f703516648d5cd935000fa2770))
|
||||||
|
* **youtube/remember-video-quality:** fix typo in video resolutions ([#2323](https://github.com/revanced/revanced-patches/issues/2323)) ([a99cef8](https://github.com/revanced/revanced-patches/commit/a99cef87b40b67a5feb97999fb4f2925ea80b42e))
|
||||||
|
* **youtube/remove-player-controls-background:** use correct patch name and description ([8732a84](https://github.com/revanced/revanced-patches/commit/8732a84422087fca7e9e1635a0b1d8d2cbf034f4))
|
||||||
|
* **youtube/theme:** use dynamic background color for custom splash screen ([#2319](https://github.com/revanced/revanced-patches/issues/2319)) ([28594f3](https://github.com/revanced/revanced-patches/commit/28594f3eeaf99fa32ee57214ebbc4342529c6694))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **nfctoolsse:** add `unlock-pro` patch ([#2272](https://github.com/revanced/revanced-patches/issues/2272)) ([9789ad3](https://github.com/revanced/revanced-patches/commit/9789ad30ff82d9bb99e870dc8053775dc222a010))
|
||||||
|
* **remove-screen-capture-restriction:** remove app constraint ([#2260](https://github.com/revanced/revanced-patches/issues/2260)) ([49ce47c](https://github.com/revanced/revanced-patches/commit/49ce47c3eed6a1626674d0f60ae0fdbe349e804b))
|
||||||
|
* **scbeasy:** add `remove-debugging-detection` patch ([#2287](https://github.com/revanced/revanced-patches/issues/2287)) ([53d91e3](https://github.com/revanced/revanced-patches/commit/53d91e32183663b0aa70994cc4e1d8ae5eb8c8e4))
|
||||||
|
* **tiktok:** remove compatibility version constraints ([#2306](https://github.com/revanced/revanced-patches/issues/2306)) ([a12c4bb](https://github.com/revanced/revanced-patches/commit/a12c4bb1610234d19b4ac86cd57bb09335566b68))
|
||||||
|
* **youtube/general-ads:** merge `hide-get-premium` patch into `general-ads` patch ([5195dd8](https://github.com/revanced/revanced-patches/commit/5195dd8936d63c482dbcb2cd0e7e9aab3c75954e))
|
||||||
|
* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#2252](https://github.com/revanced/revanced-patches/issues/2252)) ([0f07bf4](https://github.com/revanced/revanced-patches/commit/0f07bf467a4aa06c9bcdf60a2498d88eea8c1429))
|
||||||
|
* **youtube/hide-shorts-components:** hide channel bar & sound button ([749c83d](https://github.com/revanced/revanced-patches/commit/749c83d068c2201ed6f29047d5428d1072924960))
|
||||||
|
* **youtube/hide-shorts-components:** hide shorts info panel ([#2278](https://github.com/revanced/revanced-patches/issues/2278)) ([a5b323d](https://github.com/revanced/revanced-patches/commit/a5b323d1d9e5b175c93f0b29732eb1123b83bab7))
|
||||||
|
* **youtube/navigation-buttons:** use a better preference screen title ([5d7772b](https://github.com/revanced/revanced-patches/commit/5d7772be942c72e05644eca3f68d2bd6b9762d26))
|
||||||
|
|
||||||
|
# [2.175.0-dev.16](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.15...v2.175.0-dev.16) (2023-05-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **spoof-wifi-connection:** use updated instruction indices ([#2199](https://github.com/revanced/revanced-patches/issues/2199)) ([76fb700](https://github.com/revanced/revanced-patches/commit/76fb700884dae5b71a57f9530fad9d4a98ba0af0))
|
||||||
|
|
||||||
# [2.175.0-dev.15](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.14...v2.175.0-dev.15) (2023-05-30)
|
# [2.175.0-dev.15](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.14...v2.175.0-dev.15) (2023-05-30)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.175.0-dev.15
|
version = 2.175.0
|
||||||
|
|||||||
@@ -21,39 +21,44 @@ internal abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch()
|
|||||||
|
|
||||||
abstract fun transform(mutableMethod: MutableMethod, entry: T)
|
abstract fun transform(mutableMethod: MutableMethod, entry: T)
|
||||||
|
|
||||||
|
// Returns the patch indices as a Sequence, which will execute lazily.
|
||||||
|
private fun findPatchIndices(classDef: ClassDef, method: Method): Sequence<T>? {
|
||||||
|
return method.implementation?.instructions?.asSequence()?.withIndex()?.mapNotNull { (index, instruction) ->
|
||||||
|
filterMap(classDef, method, instruction, index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
// Find all instructions
|
// Find all methods to patch
|
||||||
buildMap {
|
buildMap {
|
||||||
context.classes.forEach { classDef ->
|
context.classes.forEach { classDef ->
|
||||||
classDef.methods.let { methods ->
|
val methods = buildList {
|
||||||
buildMap methodList@{
|
classDef.methods.forEach { method ->
|
||||||
methods.forEach methods@{ method ->
|
// Since the Sequence executes lazily,
|
||||||
with(method.implementation?.instructions ?: return@methods) {
|
// using any() results in only calling
|
||||||
ArrayDeque<T>().also { patchIndices ->
|
// filterMap until the first index has been found.
|
||||||
this.forEachIndexed { index, instruction ->
|
val patchIndices = findPatchIndices(classDef, method)
|
||||||
val result = filterMap(classDef, method, instruction, index)
|
|
||||||
if (result != null) {
|
if (patchIndices?.any() == true) {
|
||||||
patchIndices.add(result)
|
add(method)
|
||||||
}
|
|
||||||
}
|
|
||||||
}.also { if (it.isEmpty()) return@methods }.let { patches ->
|
|
||||||
put(method, patches)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.also { if (it.isEmpty()) return@forEach }.let { methodPatches ->
|
}
|
||||||
put(classDef, methodPatches)
|
|
||||||
|
if (methods.isNotEmpty()) {
|
||||||
|
put(classDef, methods)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.forEach { (classDef, methods) ->
|
}.forEach { (classDef, methods) ->
|
||||||
// And finally transform the instructions...
|
// And finally transform the methods...
|
||||||
with(context.proxy(classDef).mutableClass) {
|
val mutableClass = context.proxy(classDef).mutableClass
|
||||||
methods.forEach { (method, patches) ->
|
|
||||||
val mutableMethod = findMutableMethodOf(method)
|
methods.map(mutableClass::findMutableMethodOf).forEach methods@{ mutableMethod ->
|
||||||
while (!patches.isEmpty()) {
|
val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque())
|
||||||
transform(mutableMethod, patches.removeLast())
|
?: return@methods
|
||||||
}
|
|
||||||
|
while (!patchIndices.isEmpty()) {
|
||||||
|
transform(mutableMethod, patchIndices.removeLast())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user