diff options
Diffstat (limited to 'data.cpp')
-rw-r--r-- | data.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -50,6 +50,7 @@ #include "find_file.hpp" #include "set_metadata.h" #include <cutils/properties.h> +#include "gui/gui.hpp" #define DEVID_MAX 64 #define HWID_MAX 32 @@ -229,7 +230,7 @@ void DataManager::get_device_id(void) { } strcpy(device_id, "serialno"); - LOGERR("=> device id not found, using '%s'\n", device_id); + LOGINFO("=> device id not found, using '%s'\n", device_id); mConstValues.insert(make_pair("device_id", device_id)); return; } @@ -616,8 +617,10 @@ void DataManager::SetBackupFolder() } } } else { - if (PartitionManager.Fstab_Processed() != 0) - LOGERR("Storage partition '%s' not found\n", str.c_str()); + if (PartitionManager.Fstab_Processed() != 0) { + LOGINFO("Storage partition '%s' not found\n", str.c_str()); + gui_err("unable_locate_storage=Unable to locate storage device."); + } } } @@ -890,6 +893,8 @@ void DataManager::SetDefaultValues() #endif mValues.insert(make_pair("tw_mount_system_ro", make_pair("2", 1))); mValues.insert(make_pair("tw_never_show_system_ro_page", make_pair("0", 1))); + mValues.insert(make_pair("tw_language", make_pair(EXPAND(TW_DEFAULT_LANGUAGE), 1))); + LOGINFO("LANG: %s\n", EXPAND(TW_DEFAULT_LANGUAGE)); pthread_mutex_unlock(&m_valuesLock); } @@ -1033,7 +1038,7 @@ void DataManager::Output_Version(void) } FILE *fp = fopen(Path.c_str(), "w"); if (fp == NULL) { - LOGERR("Unable to open '%s'.\n", Path.c_str()); + gui_msg(Msg(msg::kError, "error_opening_strerr=Error opening: '{1}' ({2})")(Path)(strerror(errno))); return; } strcpy(version, TW_VERSION_STR); @@ -1069,7 +1074,7 @@ void DataManager::ReadSettingsFile(void) { usleep(500000); if (!PartitionManager.Mount_Settings_Storage(false)) - LOGERR("Unable to mount %s when trying to read settings file.\n", settings_file); + gui_msg(Msg(msg::kError, "unable_to_mount=Unable to mount {1}")(settings_file)); } mkdir(mkdir_path, 0777); |