Skip to content

Commit 512537f

Browse files
committed
Bumping down the minSDK to 26 for use with the ChameleonMiniLiveDebugger
1 parent 5cf1f88 commit 512537f

3 files changed

Lines changed: 21 additions & 30 deletions

File tree

AndroidFilePickerLightLibrary/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ android {
2929
buildToolsVersion "30.0.0"
3030

3131
defaultConfig {
32-
minSdkVersion 29
32+
minSdkVersion 26
3333
targetSdkVersion 30
34-
versionCode 7
35-
versionName "1.0.6"
34+
versionCode 8
35+
versionName "1.0.7"
3636
}
3737

3838
compileOptions {

AndroidFilePickerLightLibrary/src/main/java/com/maxieds/androidfilepickerlightlibrary/FileChooserBuilder.java

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -487,31 +487,22 @@ public static List<String> handleActivityResult(Activity activityInst, int reque
487487
if(activityInst == null || data == null) {
488488
throw new FileChooserException.CommunicateNoDataException();
489489
}
490-
switch(requestCode) {
491-
case ACTIVITY_CODE_SELECT_FILE_ONLY:
492-
case ACTIVITY_CODE_SELECT_DIRECTORY_ONLY:
493-
case ACTIVITY_CODE_SELECT_MULTIPLE_FILES:
494-
if(resultCode == RESULT_OK) {
495-
List<String> selectedDataItems = data.getStringArrayListExtra(FileChooserBuilder.FILE_PICKER_INTENT_DATA_PAYLOAD_KEY);
496-
finishActivityResultHandler(activityInst);
497-
try { // A short pause to give the calling Activity time to resume form at the top of the display:
498-
Thread.sleep(250);
499-
} catch(InterruptedException ie) {}
500-
return selectedDataItems;
501-
}
502-
else if(resultCode == RESULT_CANCELED) {
503-
try {
504-
String getExitErrorMsg = data.getStringExtra(FILE_PICKER_EXCEPTION_MESSAGE_KEY);
505-
finishActivityResultHandler(activityInst);
506-
throw FileChooserException.getExceptionForExitCause(data.getStringExtra(FILE_PICKER_EXCEPTION_CAUSE_KEY), getExitErrorMsg);
507-
} catch (NullPointerException npe) {
508-
npe.printStackTrace();
509-
}
510-
}
511-
break;
512-
default:
513-
break;
514-
490+
if(resultCode == RESULT_OK) {
491+
List<String> selectedDataItems = data.getStringArrayListExtra(FileChooserBuilder.FILE_PICKER_INTENT_DATA_PAYLOAD_KEY);
492+
finishActivityResultHandler(activityInst);
493+
try { // A short pause to give the calling Activity time to resume form at the top of the display:
494+
Thread.sleep(250);
495+
} catch(InterruptedException ie) {}
496+
return selectedDataItems;
497+
}
498+
else if(resultCode == RESULT_CANCELED) {
499+
try {
500+
String getExitErrorMsg = data.getStringExtra(FILE_PICKER_EXCEPTION_MESSAGE_KEY);
501+
finishActivityResultHandler(activityInst);
502+
throw FileChooserException.getExceptionForExitCause(data.getStringExtra(FILE_PICKER_EXCEPTION_CAUSE_KEY), getExitErrorMsg);
503+
} catch (NullPointerException npe) {
504+
npe.printStackTrace();
505+
}
515506
}
516507
FileChooserException.AndroidFilePickerLightException resultNotOKException = new FileChooserException.GenericRuntimeErrorException();
517508
resultNotOKException.packageDataItemsFromIntent(data);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ configuration:
6262
```bash
6363
android {
6464
defaultConfig {
65-
minSdkVersion 29
65+
minSdkVersion 26
6666
}
6767
compileOptions {
6868
sourceCompatibility JavaVersion.VERSION_1_8
@@ -73,7 +73,7 @@ dependencies {
7373
// FOR the most recent build:
7474
implementation 'com.github.maxieds:AndroidFilePickerLight:master-SNAPSHOT'
7575
// -- OR: for the latest release:
76-
implementation 'com.github.maxieds:AndroidFilePickerLight:release-v6'
76+
implementation 'com.github.maxieds:AndroidFilePickerLight:release-v7'
7777
}
7878
allprojects {
7979
repositories {

0 commit comments

Comments
 (0)