Pull ROM info from build.prop for backup names
Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
This commit is contained in:
committed by
Gerrit Code Review
parent
893136dc45
commit
b21cc64ca8
+23
-2
@@ -701,6 +701,27 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (function == "appenddatetobackupname")
|
||||
{
|
||||
operation_start("AppendDateToBackupName");
|
||||
string Backup_Name;
|
||||
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
|
||||
Backup_Name += TWFunc::Get_Current_Date();
|
||||
if (Backup_Name.size() > MAX_BACKUP_NAME_LEN)
|
||||
Backup_Name.resize(MAX_BACKUP_NAME_LEN);
|
||||
DataManager::SetValue(TW_BACKUP_NAME, Backup_Name);
|
||||
operation_end(0, simulate);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (function == "generatebackupname")
|
||||
{
|
||||
operation_start("GenerateBackupName");
|
||||
TWFunc::Auto_Generate_Backup_Name();
|
||||
operation_end(0, simulate);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (isThreaded)
|
||||
{
|
||||
if (function == "fileexists")
|
||||
@@ -893,14 +914,14 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
|
||||
if (arg == "backup") {
|
||||
string Backup_Name;
|
||||
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
|
||||
if (Backup_Name == "(Current Date)" || Backup_Name == "0" || Backup_Name == "(" || PartitionManager.Check_Backup_Name(true) == 0) {
|
||||
if (Backup_Name == "(Auto Generate)" || Backup_Name == "(Current Date)" || Backup_Name == "0" || Backup_Name == "(" || PartitionManager.Check_Backup_Name(true) == 0) {
|
||||
ret = PartitionManager.Run_Backup();
|
||||
}
|
||||
else {
|
||||
operation_end(1, simulate);
|
||||
return -1;
|
||||
}
|
||||
DataManager::SetValue(TW_BACKUP_NAME, "(Current Date)");
|
||||
DataManager::SetValue(TW_BACKUP_NAME, "(Auto Generate)");
|
||||
} else if (arg == "restore") {
|
||||
string Restore_Name;
|
||||
DataManager::GetValue("tw_restore", Restore_Name);
|
||||
|
||||
Reference in New Issue
Block a user