File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
src/main/kotlin/app/revanced/patcher/patch Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change
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
+
1
8
## [ 20.0.1] ( https://github.com/ReVanced/revanced-patcher/compare/v20.0.0...v20.0.1 ) (2024-10-13)
2
9
3
10
Original file line number Diff line number Diff line change 1
1
org.gradle.parallel = true
2
2
org.gradle.caching = true
3
- version = 20.0.1
3
+ version = 20.0.2-dev. 1
Original file line number Diff line number Diff line change @@ -62,17 +62,16 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
62
62
* Merge the extensions for this set of patches.
63
63
*/
64
64
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 .
66
66
val classesByType = mutableMapOf<String , ClassDef >().apply {
67
67
classes.forEach { classDef -> put(classDef.type, classDef) }
68
68
}
69
69
70
70
forEachRecursively { patch ->
71
- if (patch is BytecodePatch && patch.extension != null ) {
71
+ if (patch ! is BytecodePatch ) return @forEachRecursively
72
72
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 ->
76
75
val existingClass = classesByType[classDef.type] ? : run {
77
76
logger.fine(" Adding class \" $classDef \" " )
78
77
You can’t perform that action at this time.
0 commit comments