添加data与sdcard两种应用数据测试。

This commit is contained in:
2026-01-31 20:07:56 +08:00
parent 3f924b004c
commit 530316b976
3 changed files with 14 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Sat Jan 31 11:44:12 GMT 2026 #Sat Jan 31 12:06:15 GMT 2026
stageCount=12 stageCount=12
libraryProject=libappbase libraryProject=libappbase
baseVersion=15.15 baseVersion=15.15
publishVersion=15.15.11 publishVersion=15.15.11
buildCount=26 buildCount=27
baseBetaVersion=15.15.12 baseBetaVersion=15.15.12

View File

@@ -54,12 +54,15 @@ public class MainActivity extends Activity {
} }
void initTestData() { void initTestData() {
TestBean bean = new TestBean(); TestBean bean1 = new TestBean();
bean.setTestNum1(456); bean1.setTestNum1(456);
TestBean.saveBeanToFile(getFilesDir().getAbsolutePath() + getDataFilesTestBeanPath(), bean); TestBean.saveBeanToFile(getFilesDir().getAbsolutePath() + getTestBeanRelativePath(), bean1);
TestBean bean2 = new TestBean();
bean2.setTestNum1(789);
TestBean.saveBeanToFile(getExternalFilesDir(null).getAbsolutePath() + getTestBeanRelativePath(), bean2);
} }
String getDataFilesTestBeanPath() { String getTestBeanRelativePath() {
return "/BaseBaen/"+TestBean.class.getName()+".json"; return "/BaseBaen/"+TestBean.class.getName()+".json";
} }
@@ -173,12 +176,12 @@ public class MainActivity extends Activity {
HashMap<String, String> dataFileMap = new HashMap<>(); HashMap<String, String> dataFileMap = new HashMap<>();
// 存入文件key=唯一标识value=应用外部文件目录下的相对路径与原addSdcardFile参数一致 // 存入文件key=唯一标识value=应用外部文件目录下的相对路径与原addSdcardFile参数一致
dataFileMap.put(TestBean.class.getName() + ".json", dataFileMap.put(TestBean.class.getName() + ".json",
getDataFilesTestBeanPath()); getTestBeanRelativePath());
// 1. 构建SDCard目录待备份文件Map与BackupUtils的SdcardMap泛型一致String-String // 1. 构建SDCard目录待备份文件Map与BackupUtils的SdcardMap泛型一致String-String
HashMap<String, String> sdcardFileMap = new HashMap<>(); HashMap<String, String> sdcardFileMap = new HashMap<>();
// 存入文件key=唯一标识value=应用外部文件目录下的相对路径与原addSdcardFile参数一致 // 存入文件key=唯一标识value=应用外部文件目录下的相对路径与原addSdcardFile参数一致
sdcardFileMap.put("cc.winboll.studio.libappbase.LogUtilsClassTAGBean_List.json", sdcardFileMap.put(TestBean.class.getName() + ".json",
"/BaseBean/cc.winboll.studio.libappbase.LogUtilsClassTAGBean_List.json"); getTestBeanRelativePath());
// 2. 构建Intent指定跳转到FTPBackupsActivity // 2. 构建Intent指定跳转到FTPBackupsActivity
Intent ftpBackupsIntent = new Intent(getApplicationContext(), FTPBackupsActivity.class); Intent ftpBackupsIntent = new Intent(getApplicationContext(), FTPBackupsActivity.class);

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Sat Jan 31 11:44:12 GMT 2026 #Sat Jan 31 12:06:15 GMT 2026
stageCount=12 stageCount=12
libraryProject=libappbase libraryProject=libappbase
baseVersion=15.15 baseVersion=15.15
publishVersion=15.15.11 publishVersion=15.15.11
buildCount=26 buildCount=27
baseBetaVersion=15.15.12 baseBetaVersion=15.15.12