Skip to content

Commit

Permalink
post pull request minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur committed Jun 6, 2016
1 parent 4e52c88 commit 679fabf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ For more information, see the [GitHub Wiki](https://github.com/ArthurHub/Android
- [Adding auto-zoom feature to Android-Image-Cropper](https://theartofdev.com/2016/04/25/adding-auto-zoom-feature-to-android-image-cropper/)

## Change log
*2.2.1*

- Fix listeners getting garbage collected bug (thx @TheFinestArtist)

*2.2.0*

- Fix non-straight angle rotation handling.
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}

Expand Down
2 changes: 1 addition & 1 deletion cropper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
ext {
PUBLISH_GROUP_ID = 'com.theartofdev.edmodo'
PUBLISH_ARTIFACT_ID = 'android-image-cropper'
PUBLISH_VERSION = '2.2.0'
PUBLISH_VERSION = '2.2.1'
// gradlew clean build generateRelease
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,9 @@ void onSetImageUriAsyncComplete(BitmapLoadingWorkerTask.Result result) {
mDegreesRotated = result.degreesRotated;
}

if (mOnSetImageUriCompleteListener != null) {
mOnSetImageUriCompleteListener.onSetImageUriComplete(this, result.uri, result.error);
OnSetImageUriCompleteListener listener = mOnSetImageUriCompleteListener;
if (listener != null) {
listener.onSetImageUriComplete(this, result.uri, result.error);
}
}

Expand All @@ -843,12 +844,14 @@ void onImageCroppingAsyncComplete(BitmapCroppingWorkerTask.Result result) {
setProgressBarVisibility();

if (result.isSave) {
if (mOnSaveCroppedImageCompleteListener != null) {
mOnSaveCroppedImageCompleteListener.onSaveCroppedImageComplete(this, result.uri, result.error);
OnSaveCroppedImageCompleteListener listener = mOnSaveCroppedImageCompleteListener;
if (listener != null) {
listener.onSaveCroppedImageComplete(this, result.uri, result.error);
}
} else {
if (mOnGetCroppedImageCompleteListener != null) {
mOnGetCroppedImageCompleteListener.onGetCroppedImageComplete(this, result.bitmap, result.error);
OnGetCroppedImageCompleteListener listener = mOnGetCroppedImageCompleteListener;
if (listener != null) {
listener.onGetCroppedImageComplete(this, result.bitmap, result.error);
}
}
}
Expand Down

0 comments on commit 679fabf

Please sign in to comment.