#TODO(jpawlowski): heavily depends on Android,
# "src/btif_avrcp_audio_track.cpp",
"src/btif_config.c",
+ "src/btif_config_transcode.cpp",
"src/btif_core.c",
"src/btif_debug.c",
"src/btif_debug_btsnoop.c",
*/
//#define LOG_NDEBUG 0
+#define LOG_TAG "bt_btif_avrcp_audio_track"
+
#include "btif_avrcp_audio_track.h"
#include <media/AudioTrack.h>
#include "osi/include/config.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
-
-/**
- * TODO(apanicke): cutils/properties.h is only being used to pull-in runtime
- * settings on Android. Remove this conditional include once we have a generic
- * way to obtain system properties.
- */
-#if !defined(OS_GENERIC)
-#include <cutils/properties.h>
-#endif /* !defined(OS_GENERIC) */
+#include "osi/include/properties.h"
// TODO(armansito): Find a better way than searching by a hardcoded path.
#if defined(OS_GENERIC)
config = config_new(CONFIG_FILE_PATH);
btif_config_source = ORIGINAL;
if (!config) {
- LOG_WARN("%s unable to load config file: %s; using backup.",
+ LOG_WARN(LOG_TAG, "%s unable to load config file: %s; using backup.",
__func__, CONFIG_FILE_PATH);
config = config_new(CONFIG_BACKUP_PATH);
btif_config_source = BACKUP;
}
if (!config) {
- LOG_WARN("%s unable to load backup; attempting to transcode legacy file.", __func__);
+ LOG_WARN(LOG_TAG, "%s unable to load backup; attempting to transcode legacy file.", __func__);
config = btif_config_transcode(CONFIG_LEGACY_FILE_PATH);
btif_config_source = LEGACY;
}
if (!config) {
- LOG_ERROR("%s unable to transcode legacy file; creating empty config.", __func__);
+ LOG_ERROR(LOG_TAG, "%s unable to transcode legacy file; creating empty config.", __func__);
config = config_new_empty();
btif_config_source = NEW_FILE;
}
if (!config) {
- LOG_ERROR("%s unable to allocate a config object.", __func__);
+ LOG_ERROR(LOG_TAG, "%s unable to allocate a config object.", __func__);
goto error;
}
static bool is_factory_reset(void) {
char factory_reset[PROPERTY_VALUE_MAX] = {0};
- property_get("persist.bluetooth.factoryreset", factory_reset, "false");
+ osi_property_get("persist.bluetooth.factoryreset", factory_reset, "false");
return strncmp(factory_reset, "true", 4) == 0;
}
static void delete_config_files(void) {
remove(CONFIG_FILE_PATH);
remove(CONFIG_BACKUP_PATH);
- property_set("persist.bluetooth.factoryreset", "false");
+ osi_property_set("persist.bluetooth.factoryreset", "false");
}
XMLDocument document;
int error = document.LoadFile(xml_filename);
if (error != XML_SUCCESS) {
- LOG_ERROR("%s unable to load XML file '%s': %d", __func__, xml_filename, error);
+ LOG_ERROR(LOG_TAG, "%s unable to load XML file '%s': %d", __func__, xml_filename, error);
return NULL;
}
XMLElement *rootElement = document.RootElement();
if (!rootElement) {
- LOG_ERROR("%s unable to find root element; assuming corrupted config file.", __func__);
+ LOG_ERROR(LOG_TAG, "%s unable to find root element; assuming corrupted config file.", __func__);
return NULL;
}
config_t *config = config_new_empty();
if (!config) {
- LOG_ERROR("%s unable to allocate config object.", __func__);
+ LOG_ERROR(LOG_TAG, "%s unable to allocate config object.", __func__);
return NULL;
}
"base/metrics/histogram.cc",
"base/metrics/histogram_samples.cc",
"base/metrics/histogram_snapshot_manager.cc",
+ "base/metrics/persistent_histogram_allocator.cc",
+ "base/metrics/persistent_memory_allocator.cc",
+ "base/metrics/persistent_sample_map.cc",
"base/metrics/sample_map.cc",
"base/metrics/sample_vector.cc",
"base/metrics/sparse_histogram.cc",
"base/process/process_metrics_linux.cc",
"base/process/process_metrics_posix.cc",
"base/process/process_posix.cc",
- "base/profiler/alternate_timer.cc",
"base/profiler/scoped_profile.cc",
"base/profiler/scoped_tracker.cc",
"base/profiler/tracked_time.cc",
"base/trace_event/memory_dump_session_state.cc",
"base/trace_event/process_memory_dump.cc",
"base/trace_event/process_memory_maps.cc",
- "base/trace_event/process_memory_maps_dump_provider.cc",
"base/trace_event/process_memory_totals.cc",
- "base/trace_event/process_memory_totals_dump_provider.cc",
"base/trace_event/trace_buffer.cc",
"base/trace_event/trace_config.cc",
"base/trace_event/trace_event_argument.cc",
#include "device/include/classic/peer.h"
#include <assert.h>
-#include <cutils/log.h>
#include <pthread.h>
#include <stdbool.h>
pthread_mutex_init(&commands_pending_response_lock, NULL);
- // TODO(armansito): cutils/properties.h is only being used to pull-in runtime
- // settings on Android. Remove this conditional include once we have a generic
- // way to obtain system properties. For now, always use the default timeout on
- // non-Android builds.
+ // For now, always use the default timeout on non-Android builds.
period_ms_t startup_timeout_ms = DEFAULT_STARTUP_TIMEOUT_MS;
// Grab the override startup timeout ms, if present.
#include <base/files/scoped_file.h>
#include <base/logging.h>
-// For system properties
-// TODO(icoolidge): abstraction or non-cutils stub.
-#if !defined(OS_GENERIC)
-#include <cutils/properties.h>
-#endif // !defined(OS_GENERIC)
-
+#include "osi/include/properties.h"
#include "service/daemon.h"
#include "service/switches.h"