Skip to content

Commit

Permalink
Fix local backups in Android 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Barashkov committed May 26, 2020
1 parent bec6d62 commit 0166e70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ android {
applicationId "com.handydev.financier"
minSdkVersion 21
targetSdkVersion 29
versionCode 205
versionName "2.0.5"
versionCode 206
versionName "2.0.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ private void generateBackup(OutputStream outputStream) throws Exception {
public static File getBackupFolder(Context context) {
String path = MyPreferences.getDatabaseBackupFolder(context);
File file = new File(path);
file.mkdirs();
if (file.isDirectory() && file.canWrite()) {
return file;
} else {
file = Export.DEFAULT_EXPORT_PATH;
file.mkdirs();
return file;
}
file = Export.DEFAULT_EXPORT_PATH;
file.mkdirs();
return file;
}

public static File getBackupFile(Context context, String backupFileName) {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:theme="@style/AppTheme">

<receiver
Expand Down
1 change: 1 addition & 0 deletions app/src/main/assets/whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<p><b>2.0.6</b></p>
<p>
[*] White on white in transaction templates.<br/>
[*] Fix local backup on Android 10.<br/>
</p>

<p><b>2.0.5</b></p>
Expand Down

0 comments on commit 0166e70

Please sign in to comment.