[Scummvm-git-logs] scummvm master -> 42991838c58d0a257c6bebc339c38b99b7a7b575

antoniou79 noreply at scummvm.org
Mon Mar 27 11:12:24 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
42991838c5 ANDROID: Comments on Android storage


Commit: 42991838c58d0a257c6bebc339c38b99b7a7b575
    https://github.com/scummvm/scummvm/commit/42991838c58d0a257c6bebc339c38b99b7a7b575
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2023-03-27T14:12:09+03:00

Commit Message:
ANDROID: Comments on Android storage

And a minor comment fix

Changed paths:
    backends/fs/android/android-saf-fs.cpp
    backends/platform/android/org/scummvm/scummvm/ExternalStorage.java


diff --git a/backends/fs/android/android-saf-fs.cpp b/backends/fs/android/android-saf-fs.cpp
index c46c91491c2..53690874fa2 100644
--- a/backends/fs/android/android-saf-fs.cpp
+++ b/backends/fs/android/android-saf-fs.cpp
@@ -808,7 +808,7 @@ void AddSAFFakeNode::makeProxySAF() const {
 		return;
 	}
 
-	// I18N: This may be displayed in the Android UI used to add a Sotrage Attach Framework authorization
+	// I18N: This may be displayed in the Android UI used to add a Storage Attach Framework authorization
 	jobject saftree = JNI::getNewSAFTree(true, true, "", _("Choose a new folder"));
 	if (!saftree) {
 		return;
diff --git a/backends/platform/android/org/scummvm/scummvm/ExternalStorage.java b/backends/platform/android/org/scummvm/scummvm/ExternalStorage.java
index 58a4173a809..1ba69238b51 100644
--- a/backends/platform/android/org/scummvm/scummvm/ExternalStorage.java
+++ b/backends/platform/android/org/scummvm/scummvm/ExternalStorage.java
@@ -26,10 +26,24 @@ import android.os.Build;
 public class ExternalStorage {
 	public static final String SD_CARD = "sdCard";
 	public static final String EXTERNAL_SD_CARD = "externalSdCard";
-	public static final String DATA_DIRECTORY = "ScummVM data";
-	public static final String DATA_DIRECTORY_INT = "ScummVM data (Int)";
-	public static final String DATA_DIRECTORY_EXT = "ScummVM data (Ext)";
 
+	// User data is an system wide folder (typically, but maybe not always, "/data/") where apps can store data in their own subfolder.
+	// While this folder does exists in newer Android OS versions it is most likely not *directly* usable.
+	public static final String DATA_DIRECTORY = "User data (System Wide)";
+
+	// Internal App Data folder is a folder that is guaranteed to always be available for access.
+	// Only the app (here ScummVM) can write and read under this folder.
+	// It is used to store configuration file(s), log file(s), the default saved games folder, the default icons folder, and distribution data files.
+	// The folder's contents are kept kept upon upgrading to a compatible newer version of the app.
+	// It is wiped when downgrading, uninstalling or explicitly cleaning the application's data from the Android System Apps menu options.
+	// The storage for this folder is assigned from internal device storage (ie. not external physical SD Card).
+	public static final String DATA_DIRECTORY_INT = "ScummVM data (Internal)";
+
+	// External App Data folder is a folder that is NOT guaranteed to always be available for access.
+	// Only the app (here ScummVM) can write under this folder, but other apps have read access to the folder's contents.
+	// The folder's contents are kept upon upgrading to a compatible newer version of the app.
+	// It is wiped when downgrading, uninstalling or explicitly cleaning the application's data from the Android System Apps menu options.
+	public static final String DATA_DIRECTORY_EXT = "ScummVM data (External)";
 
 	// Find candidate removable sd card paths
 	// Code reference: https://stackoverflow.com/a/54411385
@@ -463,8 +477,10 @@ public class ExternalStorage {
 				map.add(Environment.getDataDirectory().getAbsolutePath());
 			}
 		}
+
 		map.add(DATA_DIRECTORY_INT);
 		map.add(ctx.getFilesDir().getPath());
+
 		map.add(DATA_DIRECTORY_EXT);
 		if (ctx.getExternalFilesDir(null) != null) {
 			map.add(ctx.getExternalFilesDir(null).getPath());




More information about the Scummvm-git-logs mailing list