mirror of
https://gitea.winboll.cc/Studio/OriginMaster.git
synced 2026-02-04 10:31:31 +08:00
添加data与sdcard两种应用数据测试。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#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
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.11
|
||||
buildCount=26
|
||||
buildCount=27
|
||||
baseBetaVersion=15.15.12
|
||||
|
||||
@@ -54,12 +54,15 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
|
||||
void initTestData() {
|
||||
TestBean bean = new TestBean();
|
||||
bean.setTestNum1(456);
|
||||
TestBean.saveBeanToFile(getFilesDir().getAbsolutePath() + getDataFilesTestBeanPath(), bean);
|
||||
TestBean bean1 = new TestBean();
|
||||
bean1.setTestNum1(456);
|
||||
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";
|
||||
}
|
||||
|
||||
@@ -173,12 +176,12 @@ public class MainActivity extends Activity {
|
||||
HashMap<String, String> dataFileMap = new HashMap<>();
|
||||
// 存入文件:key=唯一标识,value=应用外部文件目录下的相对路径(与原addSdcardFile参数一致)
|
||||
dataFileMap.put(TestBean.class.getName() + ".json",
|
||||
getDataFilesTestBeanPath());
|
||||
getTestBeanRelativePath());
|
||||
// 1. 构建SDCard目录待备份文件Map(与BackupUtils的SdcardMap泛型一致:String-String)
|
||||
HashMap<String, String> sdcardFileMap = new HashMap<>();
|
||||
// 存入文件:key=唯一标识,value=应用外部文件目录下的相对路径(与原addSdcardFile参数一致)
|
||||
sdcardFileMap.put("cc.winboll.studio.libappbase.LogUtilsClassTAGBean_List.json",
|
||||
"/BaseBean/cc.winboll.studio.libappbase.LogUtilsClassTAGBean_List.json");
|
||||
sdcardFileMap.put(TestBean.class.getName() + ".json",
|
||||
getTestBeanRelativePath());
|
||||
|
||||
// 2. 构建Intent,指定跳转到FTPBackupsActivity
|
||||
Intent ftpBackupsIntent = new Intent(getApplicationContext(), FTPBackupsActivity.class);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#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
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.11
|
||||
buildCount=26
|
||||
buildCount=27
|
||||
baseBetaVersion=15.15.12
|
||||
|
||||
Reference in New Issue
Block a user