移除通用FTP服务应用数据备份功能
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sat Jan 31 13:02:06 GMT 2026
|
||||
#Wed Mar 25 11:45:40 GMT 2026
|
||||
stageCount=12
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.15
|
||||
publishVersion=15.15.11
|
||||
buildCount=29
|
||||
buildCount=35
|
||||
baseBetaVersion=15.15.12
|
||||
|
||||
@@ -10,16 +10,10 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toolbar;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
import cc.winboll.studio.appbase.model.TestBean;
|
||||
import cc.winboll.studio.libappbase.LogActivity;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.ToastUtils;
|
||||
import cc.winboll.studio.libappbase.activities.FTPBackupsActivity;
|
||||
import cc.winboll.studio.libappbase.dialogs.SFTPBackupsSettingsDialog;
|
||||
import cc.winboll.studio.libappbase.models.SFTPAuthModel;
|
||||
import java.util.HashMap;
|
||||
import android.os.Environment;
|
||||
import java.io.File;
|
||||
import cc.winboll.studio.appbase.model.TestBean;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen<zhangsken@qq.com>
|
||||
@@ -164,36 +158,5 @@ public class MainActivity extends Activity {
|
||||
Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class);
|
||||
startActivity(aboutIntent);
|
||||
}
|
||||
|
||||
public void onFTPBackupsActivity(View view) {
|
||||
LogUtils.d(TAG, "onFTPBackupsActivity() 调用");
|
||||
SFTPBackupsSettingsDialog dlg = new SFTPBackupsSettingsDialog(this);
|
||||
SFTPAuthModel authModel = SFTPBackupsSettingsDialog.getSFTPAuthModelFromSP(this);
|
||||
if (authModel == null) {
|
||||
dlg.show();
|
||||
} else {
|
||||
// 1. 构建应用Data目录待备份文件Map
|
||||
HashMap<String, String> dataFileMap = new HashMap<>();
|
||||
// 存入文件:key=唯一标识,value=应用Data目录下的相对路径
|
||||
dataFileMap.put(TestBean.class.getName() + ".json",
|
||||
getTestBeanRelativePath());
|
||||
// 构建SDCard目录待备份文件Map(与BackupUtils的SdcardMap泛型一致:String-String)
|
||||
HashMap<String, String> sdcardFileMap = new HashMap<>();
|
||||
// 存入文件:key=唯一标识,value=应用专属外部文件目录下的相对路径
|
||||
sdcardFileMap.put(TestBean.class.getName() + ".json",
|
||||
getTestBeanRelativePath());
|
||||
|
||||
// 2. 构建Intent,指定跳转到FTPBackupsActivity
|
||||
Intent ftpBackupsIntent = new Intent(getApplicationContext(), FTPBackupsActivity.class);
|
||||
// 3. 序列化传递Map参数(使用FTPBackupsActivity中定义的常量,避免硬编码)
|
||||
ftpBackupsIntent.putExtra(FTPBackupsActivity.EXTRA_DATA_DIR_FILE_MAP, dataFileMap);
|
||||
ftpBackupsIntent.putExtra(FTPBackupsActivity.EXTRA_SDCARD_DIR_FILE_MAP, sdcardFileMap);
|
||||
// 传递FTP上传目标目录参数,路径为/WinBoLLStudio/APPBackups/WinBoLL
|
||||
ftpBackupsIntent.putExtra(FTPBackupsActivity.EXTRA_FTP_TARGET_DIR, "/WinBoLLStudio/APPBackups/WinBoLL");
|
||||
|
||||
// 4. 启动Activity,参数自动透传
|
||||
startActivity(ftpBackupsIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,18 +59,6 @@
|
||||
android:onClick="onToastUtilsTest"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="FTP应用备份"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="#81C7F5"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onFTPBackupsActivity"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user