Skip to content

Commit

Permalink
fix backup/restore for Android 13
Browse files Browse the repository at this point in the history
  • Loading branch information
woheller69 committed Jul 31, 2023
1 parent 9e5438f commit b160b46
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion app/src/main/java/org/woheller69/audiometry/Backup.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;

import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
Expand All @@ -24,7 +25,11 @@ public class Backup {
public static boolean checkPermissionStorage (Context context) {
int result = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE);
int result1 = ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE);
return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
return true;
} else {
return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;
}
}

public static void requestPermission(Activity activity) {
Expand Down
3 changes: 2 additions & 1 deletion fastlane/metadata/android/de-DE/changelogs/190.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Beschreibung verbessert
Beschreibung verbessert
Fehlerbehebung
3 changes: 2 additions & 1 deletion fastlane/metadata/android/en-US/changelogs/190.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Improved description
Improved description
Bugfixes

0 comments on commit b160b46

Please sign in to comment.