Skip to content

Commit 56301d5

Browse files
committed
Bump to minSdk 9 since that is the min for the support library now.
1 parent 519779d commit 56301d5

9 files changed

Lines changed: 18 additions & 20 deletions

File tree

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ android:
77
components:
88
- platform-tools
99
- tools
10-
- build-tools-24.0.1
10+
- build-tools-24.0.2
1111
- android-24
1212
- extra-android-m2repository
1313

1414
before_script:
1515
- chmod +x gradlew
1616

17-
#Ignore the fabric step, since we do not have a legit API key for Fabric
1817
script: "./gradlew build"

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion "24.0.1"
5+
buildToolsVersion "24.0.2"
66

77
defaultConfig {
88
applicationId "com.commit451.nativestackblur.sample"
9-
minSdkVersion 8
9+
minSdkVersion 9
1010
targetSdkVersion 24
1111
versionCode 1
1212
versionName "1.0"
@@ -24,7 +24,7 @@ android {
2424

2525
dependencies {
2626
compile fileTree(include: ['*.jar'], dir: 'libs')
27-
compile 'com.android.support:appcompat-v7:24.1.1'
27+
compile 'com.android.support:appcompat-v7:24.2.0'
2828
compile 'com.squareup.picasso:picasso:2.5.2'
2929
compile project(':nativestackblur')
3030
}

app/src/main/java/com/commit451/nativestackblur/sample/BlurTransformation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.squareup.picasso.Transformation;
77

88
/**
9-
* Created by John on 9/10/15.
9+
* Example usage with Picasso
1010
*/
1111
public class BlurTransformation implements Transformation {
1212

app/src/main/java/com/commit451/nativestackblur/sample/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected void onCreate(Bundle savedInstanceState) {
2323

2424
Picasso.with(this)
2525
.load("http://www.androidcentral.com/sites/androidcentral.com/files/styles/large/public/article_images/2014/10/lollipop-statue-2.jpg?itok=RC1ovcEz")
26-
.transform(new BlurTransformation(5))
26+
.transform(new BlurTransformation(8))
2727
.into(mBlurredImage);
2828
}
2929
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.1.2'
9-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
8+
classpath 'com.android.tools.build:gradle:2.1.3'
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Aug 15 08:53:35 CDT 2016
1+
#Tue Sep 06 10:43:19 CDT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

nativestackblur/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion "24.0.1"
5+
buildToolsVersion "24.0.2"
66

77
defaultConfig {
8-
minSdkVersion 8
8+
minSdkVersion 9
99
targetSdkVersion 24
1010
versionCode 100
1111
versionName "1.0"

nativestackblur/src/main/java/com/commit451/nativestackblur/NativeStackBlur.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
/**
88
* Processes bitmaps using native StackBlur library
9-
* Created by John on 9/10/15.
109
*/
1110
public class NativeStackBlur {
1211

1312
/**
14-
* Process the bitmap natively
13+
* Blur the bitmap natively, synchronously.
1514
* @param bitmap the bitmap to apply blur to
1615
* @param radius the radius of the blur
1716
* @return a blurred bitmap

nativestackblur/src/main/java/com/enrique/stackblur/NativeBlurProcess.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
*/
1313
public class NativeBlurProcess {
1414

15-
static final int EXECUTOR_THREADS = Runtime.getRuntime().availableProcessors();
16-
static final ExecutorService EXECUTOR = Executors.newFixedThreadPool(EXECUTOR_THREADS);
15+
private static final int EXECUTOR_THREADS = Runtime.getRuntime().availableProcessors();
16+
private static final ExecutorService EXECUTOR = Executors.newFixedThreadPool(EXECUTOR_THREADS);
17+
//May look like an error, but it will resolve when compiling and finds the .so
1718
private static native void functionToBlur(Bitmap bitmapOut, int radius, int threadCount, int threadIndex, int round);
1819

1920
static {
@@ -25,8 +26,8 @@ public Bitmap blur(Bitmap original, float radius) {
2526

2627
int cores = EXECUTOR_THREADS;
2728

28-
ArrayList<NativeTask> horizontal = new ArrayList<NativeTask>(cores);
29-
ArrayList<NativeTask> vertical = new ArrayList<NativeTask>(cores);
29+
ArrayList<NativeTask> horizontal = new ArrayList<>(cores);
30+
ArrayList<NativeTask> vertical = new ArrayList<>(cores);
3031
for (int i = 0; i < cores; i++) {
3132
horizontal.add(new NativeTask(bitmapOut, (int) radius, cores, i, 1));
3233
vertical.add(new NativeTask(bitmapOut, (int) radius, cores, i, 2));
@@ -66,6 +67,5 @@ public Void call() throws Exception {
6667
functionToBlur(_bitmapOut, _radius, _totalCores, _coreIndex, _round);
6768
return null;
6869
}
69-
7070
}
7171
}

0 commit comments

Comments
 (0)