Skip to content

Commit 21b5c07

Browse files
authored
chore: Merge branch dev to main (#314)
2 parents 4c1c34a + 5024204 commit 21b5c07

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [20.0.2-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v20.0.1...v20.0.2-dev.1) (2024-10-15)
2+
3+
4+
### Bug Fixes
5+
6+
* Make it work on Android 12 and lower by using existing APIs ([#312](https://github.com/ReVanced/revanced-patcher/issues/312)) ([a44802e](https://github.com/ReVanced/revanced-patcher/commit/a44802ef4ebf59ae47213854ba761c81dadc51f3))
7+
18
## [20.0.1](https://github.com/ReVanced/revanced-patcher/compare/v20.0.0...v20.0.1) (2024-10-13)
29

310

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
org.gradle.parallel = true
22
org.gradle.caching = true
3-
version = 20.0.1
3+
version = 20.0.2-dev.1

src/main/kotlin/app/revanced/patcher/patch/BytecodePatchContext.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,16 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
6262
* Merge the extensions for this set of patches.
6363
*/
6464
internal fun Set<Patch<*>>.mergeExtensions() {
65-
// Lookup map for fast checking if a class exists by its type.
65+
// Lookup map to check if a class exists by its type quickly.
6666
val classesByType = mutableMapOf<String, ClassDef>().apply {
6767
classes.forEach { classDef -> put(classDef.type, classDef) }
6868
}
6969

7070
forEachRecursively { patch ->
71-
if (patch is BytecodePatch && patch.extension != null) {
71+
if (patch !is BytecodePatch) return@forEachRecursively
7272

73-
val extension = patch.extension.readAllBytes()
74-
75-
RawDexIO.readRawDexFile(extension, 0, null).classes.forEach { classDef ->
73+
patch.extension?.use { extensionStream ->
74+
RawDexIO.readRawDexFile(extensionStream, 0, null).classes.forEach { classDef ->
7675
val existingClass = classesByType[classDef.type] ?: run {
7776
logger.fine("Adding class \"$classDef\"")
7877

0 commit comments

Comments
 (0)