audioid: fix for stlport dependency
- Drop stlport dependency
- Use String8 instead of char* for audio
event vectors
Change-Id: I4415a8c014ca785716d5390a0c43a1ba41cd037f
diff --git a/audiod/AudioDaemon.cpp b/audiod/AudioDaemon.cpp
index b4857c4..2c9b5d0 100644
--- a/audiod/AudioDaemon.cpp
+++ b/audiod/AudioDaemon.cpp
@@ -1,5 +1,5 @@
/* AudioDaemon.cpp
-Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -125,6 +125,7 @@
struct dirent* in_file;
int fd;
String8 path;
+ String8 d_name;
if ((dp = opendir(events_dir)) == NULL) {
ALOGE("Cannot open switch directory to get list of audio events %s", events_dir);
@@ -148,8 +149,9 @@
if (fd == -1) {
ALOGE("Open %s failed : %s", path.string(), strerror(errno));
} else {
- mAudioEvents.push_back(std::make_pair(in_file->d_name, fd));
- mAudioEventsStatus.push_back(std::make_pair(in_file->d_name, 0));
+ d_name = in_file->d_name;
+ mAudioEvents.push_back(std::make_pair(d_name, fd));
+ mAudioEventsStatus.push_back(std::make_pair(d_name, 0));
ALOGD("event status mAudioEventsStatus= %s",
mAudioEventsStatus[0].first.string());
}