File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/main/java/com/radzivon/bartoshyk/avif/coder Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ afterEvaluate {
42
42
create<MavenPublication >(" mavenJava" ) {
43
43
groupId = " com.github.awxkee"
44
44
artifactId = " avif-coder"
45
- version = " 1.6.4 "
45
+ version = " 2.0.1 "
46
46
from(components[" release" ])
47
47
// artifact("androidSourcesJar")
48
48
}
Original file line number Diff line number Diff line change 28
28
29
29
package com.radzivon.bartoshyk.avif.coder
30
30
31
+ import android.annotation.SuppressLint
31
32
import android.graphics.Bitmap
33
+ import android.os.Build
32
34
import android.util.Size
33
35
import androidx.annotation.Keep
34
36
import java.io.Closeable
@@ -43,8 +45,15 @@ import java.nio.ByteBuffer
43
45
* @throws Exception - All functions in this class may throw if something goes wrong
44
46
*/
45
47
@Keep
48
+ @SuppressLint(" ObsoleteSdkInt" )
46
49
class AvifAnimatedDecoder : Closeable {
47
50
51
+ init {
52
+ if (Build .VERSION .SDK_INT >= 24 ) {
53
+ System .loadLibrary(" coder" )
54
+ }
55
+ }
56
+
48
57
constructor (source: ByteArray ) {
49
58
nativeController = createControllerFromByteArray(source)
50
59
}
You can’t perform that action at this time.
0 commit comments