调整应用初始化时的默认相册路径

This commit is contained in:
2026-04-25 05:57:46 +08:00
parent 2f14443624
commit ecad4a7913
3 changed files with 5 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Apr 25 05:49:42 HKT 2026
#Sat Apr 25 05:55:13 CST 2026
stageCount=1
libraryProject=
baseVersion=15.0
publishVersion=15.0.0
buildCount=0
buildCount=1
baseBetaVersion=15.0.1

View File

@@ -138,9 +138,9 @@ public class MainActivity extends AppCompatActivity {
LogUtils.d(TAG, "baseFolder: " + baseFolder.getAbsolutePath() + ", exists=" + baseFolder.exists());
if (!baseFolder.exists() || !baseFolder.isDirectory()) {
folderPath = Environment.getExternalStorageDirectory() + "/DCIM";
folderPath = Preferences.getDefaultPath();
baseFolder = new File(folderPath);
LogUtils.d(TAG, "try DCIM: " + baseFolder.getAbsolutePath() + ", exists=" + baseFolder.exists());
LogUtils.d(TAG, "try default: " + baseFolder.getAbsolutePath() + ", exists=" + baseFolder.exists());
if (!baseFolder.exists()) {
folderPath = Environment.getExternalStorageDirectory() + "/Pictures";
baseFolder = new File(folderPath);

View File

@@ -8,7 +8,7 @@ public class Preferences {
public static final String TAG = "Preferences";
private static final String PREF_NAME = "gallery_prefs";
private static final String KEY_FOLDER_PATH = "folder_path";
private static final String DEFAULT_PATH = "/storage/emulated/0/DCIM";
private static final String DEFAULT_PATH = "/storage/emulated/0/Pictures/Gallery/owner";
public static String getDefaultPath() {
return DEFAULT_PATH;