Improve handling of settings storage and android secure
Change-Id: I8af92543c2f0c201e7220267c417d74e4561038d
This commit is contained in:
+12
-13
@@ -78,14 +78,11 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
|
||||
if (partition->Process_Fstab_Line(line, Display_Error)) {
|
||||
if (!Found_Settings_Storage && partition->Is_Settings_Storage) {
|
||||
Found_Settings_Storage = true;
|
||||
Partitions.push_back(partition);
|
||||
DataManager::SetValue("tw_settings_path", partition->Storage_Path);
|
||||
DataManager::SetValue("tw_storage_path", partition->Storage_Path);
|
||||
LOGINFO("Settings storage is '%s'\n", partition->Storage_Path.c_str());
|
||||
Setup_Settings_Storage_Partition(partition);
|
||||
} else {
|
||||
partition->Is_Settings_Storage = false;
|
||||
Partitions.push_back(partition);
|
||||
}
|
||||
Partitions.push_back(partition);
|
||||
} else {
|
||||
delete partition;
|
||||
}
|
||||
@@ -95,14 +92,7 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
|
||||
std::vector<TWPartition*>::iterator iter;
|
||||
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
|
||||
if ((*iter)->Is_Storage) {
|
||||
(*iter)->Is_Settings_Storage = true;
|
||||
#ifndef RECOVERY_SDCARD_ON_DATA
|
||||
(*iter)->Setup_AndSec();
|
||||
#endif
|
||||
Found_Settings_Storage = true;
|
||||
DataManager::SetValue("tw_settings_path", (*iter)->Storage_Path);
|
||||
DataManager::SetValue("tw_storage_path", (*iter)->Storage_Path);
|
||||
LOGINFO("Settings storage is '%s'\n", (*iter)->Storage_Path.c_str());
|
||||
Setup_Settings_Storage_Partition((*iter));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -148,6 +138,15 @@ int TWPartitionManager::Write_Fstab(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void TWPartitionManager::Setup_Settings_Storage_Partition(TWPartition* Part) {
|
||||
#ifndef RECOVERY_SDCARD_ON_DATA
|
||||
Part->Setup_AndSec();
|
||||
#endif
|
||||
DataManager::SetValue("tw_settings_path", Part->Storage_Path);
|
||||
DataManager::SetValue("tw_storage_path", Part->Storage_Path);
|
||||
LOGINFO("Settings storage is '%s'\n", Part->Storage_Path.c_str());
|
||||
}
|
||||
|
||||
void TWPartitionManager::Output_Partition_Logging(void) {
|
||||
std::vector<TWPartition*>::iterator iter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user