Skip to content

Commit

Permalink
Fixed issue 15
Browse files Browse the repository at this point in the history
  • Loading branch information
jrvansuita committed Feb 11, 2017
1 parent 737779d commit ae008ba
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ private boolean isValidProviders() {
if (validProviders == null) {
validProviders = true;

if (onClick == null) {
showCamera = EPickType.CAMERA.inside(setup.getPickTypes()) && resolver.isCamerasAvailable() && !resolver.wasCameraPermissionDeniedForever();
showGallery = EPickType.GALLERY.inside(setup.getPickTypes());
}
showCamera = EPickType.CAMERA.inside(setup.getPickTypes()) && ((onClick == null) || (resolver.isCamerasAvailable() && !resolver.wasCameraPermissionDeniedForever()));
showGallery = EPickType.GALLERY.inside(setup.getPickTypes());

if (!(showCamera || showGallery)) {
Error e = new Error(getString(R.string.no_providers));
Expand Down Expand Up @@ -251,7 +249,6 @@ protected boolean launchSystemDialog() {
}



protected PickImageBaseDialog setOnPickResult(IPickResult onPickResult) {
this.onPickResult = onPickResult;
return this;
Expand Down

0 comments on commit ae008ba

Please sign in to comment.