Loading system/btif/src/btif_config.c +14 −8 Original line number Diff line number Diff line Loading @@ -43,9 +43,11 @@ #if defined(OS_GENERIC) static const char *CONFIG_FILE_PATH = "bt_config.conf"; static const char *CONFIG_BACKUP_PATH = "bt_config.bak"; static const char *CONFIG_LEGACY_FILE_PATH = "bt_config.xml"; #else // !defined(OS_GENERIC) static const char *CONFIG_FILE_PATH = "/data/misc/bluedroid/bt_config.conf"; static const char *CONFIG_BACKUP_PATH = "/data/misc/bluedroid/bt_config.bak"; static const char *CONFIG_LEGACY_FILE_PATH = "/data/misc/bluedroid/bt_config.xml"; #endif // defined(OS_GENERIC) static const period_ms_t CONFIG_SETTLE_PERIOD_MS = 3000; Loading Loading @@ -104,15 +106,19 @@ static future_t *init(void) { LOG_WARN("%s unable to load config file: %s; using backup.", __func__, CONFIG_FILE_PATH); config = config_new(CONFIG_BACKUP_PATH); } if (!config) { LOG_WARN("%s unable to load backup; attempting to transcode legacy file.", __func__); config = btif_config_transcode(CONFIG_LEGACY_FILE_PATH); } if (!config) { LOG_ERROR("%s unable to load backup; creating empty config.", __func__); LOG_ERROR("%s unable to transcode legacy file; creating empty config.", __func__); config = config_new_empty(); } if (!config) { LOG_ERROR("%s unable to allocate a config object.", __func__); goto error; } } } btif_config_devcache_cleanup(); Loading Loading
system/btif/src/btif_config.c +14 −8 Original line number Diff line number Diff line Loading @@ -43,9 +43,11 @@ #if defined(OS_GENERIC) static const char *CONFIG_FILE_PATH = "bt_config.conf"; static const char *CONFIG_BACKUP_PATH = "bt_config.bak"; static const char *CONFIG_LEGACY_FILE_PATH = "bt_config.xml"; #else // !defined(OS_GENERIC) static const char *CONFIG_FILE_PATH = "/data/misc/bluedroid/bt_config.conf"; static const char *CONFIG_BACKUP_PATH = "/data/misc/bluedroid/bt_config.bak"; static const char *CONFIG_LEGACY_FILE_PATH = "/data/misc/bluedroid/bt_config.xml"; #endif // defined(OS_GENERIC) static const period_ms_t CONFIG_SETTLE_PERIOD_MS = 3000; Loading Loading @@ -104,15 +106,19 @@ static future_t *init(void) { LOG_WARN("%s unable to load config file: %s; using backup.", __func__, CONFIG_FILE_PATH); config = config_new(CONFIG_BACKUP_PATH); } if (!config) { LOG_WARN("%s unable to load backup; attempting to transcode legacy file.", __func__); config = btif_config_transcode(CONFIG_LEGACY_FILE_PATH); } if (!config) { LOG_ERROR("%s unable to load backup; creating empty config.", __func__); LOG_ERROR("%s unable to transcode legacy file; creating empty config.", __func__); config = config_new_empty(); } if (!config) { LOG_ERROR("%s unable to allocate a config object.", __func__); goto error; } } } btif_config_devcache_cleanup(); Loading