Skip to content

Commit

Permalink
Target API 27
Browse files Browse the repository at this point in the history
Unfortunately this increases minimum SDK from 11 to 14. Number of affected
devices is well under 0.1%.
  • Loading branch information
phcoder committed Jul 27, 2018
1 parent 3b07d5b commit 3e198c0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions app-pro/build.gradle
Expand Up @@ -22,13 +22,13 @@ import java.util.regex.Pattern
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.maskyn.fileeditorpro"
minSdkVersion 11
targetSdkVersion 24
minSdkVersion 14
targetSdkVersion 27
versionCode 47
versionName "1.19"
}
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Expand Up @@ -42,12 +42,12 @@ repositories {


android {
compileSdkVersion 24
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.maskyn.fileeditor"
minSdkVersion 11
targetSdkVersion 24
minSdkVersion 14
targetSdkVersion 27
versionCode 47
versionName "1.19"
}
Expand Down
6 changes: 3 additions & 3 deletions libraries/FloatingActionButton/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
minSdkVersion 7
targetSdkVersion 22
targetSdkVersion 27
versionName "1.0"
versionCode 1
}
Expand Down
8 changes: 4 additions & 4 deletions libraries/sharedCode/build.gradle
Expand Up @@ -26,12 +26,12 @@ android {
disable 'MissingTranslation', 'ExtraTranslation'
}

compileSdkVersion 24
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
minSdkVersion 11
targetSdkVersion 24
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -66,7 +66,7 @@ dependencies {
compile('com.android.support:appcompat-v7:22.+') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.android.support:support-v4:24.+'
compile 'com.android.support:support-v4:27.+'
compile 'com.github.gabrielemariotti.changeloglib:library:+'
compile 'commons-io:commons-io:2.4'
compile 'com.android.support:support-annotations:+'
Expand Down
Expand Up @@ -80,6 +80,7 @@

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -1427,7 +1428,12 @@ public void onButtonAccessoryViewClicked(String text) {
public void onEdittextDialogEnded(String result, String hint, EditTextDialog.Actions action) {

if (Device.hasKitKatApi() && TextUtils.isEmpty(greatUri.getFilePath())) {
Uri newUri = DocumentsContract.renameDocument(getContentResolver(), greatUri.getUri(), result);
Uri newUri = null;
try {
DocumentsContract.renameDocument(getContentResolver(), greatUri.getUri(), result);
} catch (FileNotFoundException e) {
newUri = null;
}
// if everything is ok
if (newUri != null) {

Expand Down

0 comments on commit 3e198c0

Please sign in to comment.