Skip to content

Commit

Permalink
Merge pull request #117 from wasabeef/fix-release-rs
Browse files Browse the repository at this point in the history
Revert how to the RenderScript destroy.
  • Loading branch information
wasabeef committed Dec 13, 2021
2 parents 7b4713d + 2a2a8da commit a36d5a9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
7 changes: 1 addition & 6 deletions blurry/src/main/java/jp/wasabeef/blurry/Blur.java
Expand Up @@ -6,7 +6,6 @@
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.os.Build;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RSRuntimeException;
Expand Down Expand Up @@ -95,11 +94,7 @@ private static Bitmap rs(Context context, Bitmap bitmap, int radius) throws RSRu
output.copyTo(bitmap);
} finally {
if (rs != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
RenderScript.releaseAllContexts();
} else {
rs.destroy();
}
rs.destroy();
}
if (input != null) {
input.destroy();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -10,7 +10,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-beta04'
classpath 'com.android.tools.build:gradle:7.1.0-beta04'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// TODO: Close JCenter on May 1st https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Expand Up @@ -3,7 +3,6 @@ org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.caching=true
android.enableBuildCache=true
android.useAndroidX=true
android.enableJetifier=false
android.enableR8.fullMode=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit a36d5a9

Please sign in to comment.