Move TaskRunner and SynchronizedQueue to details

Bug: 36433220
Test: compiles
Test: hidl_test
Test: libhidl_test
Change-Id: Ia48bf9abba293f177ec2f6cfab49da5422a59b82
diff --git a/base/TaskRunner.cpp b/base/TaskRunner.cpp
index 2f7d89c..78add4c 100644
--- a/base/TaskRunner.cpp
+++ b/base/TaskRunner.cpp
@@ -19,6 +19,7 @@
 
 namespace android {
 namespace hardware {
+namespace details {
 
 TaskRunner::TaskRunner() {
     bool *running = mRunning = new bool();
@@ -43,6 +44,7 @@
     });
 }
 
+} // namespace details
 } // namespace hardware
 } // namespace android
 
diff --git a/base/include/hidl/SynchronizedQueue.h b/base/include/hidl/SynchronizedQueue.h
index 80123ba..1813130 100644
--- a/base/include/hidl/SynchronizedQueue.h
+++ b/base/include/hidl/SynchronizedQueue.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_SYNCHRONIZED_QUEUE_H
-#define ANDROID_SYNCHRONIZED_QUEUE_H
+#ifndef ANDROID_HIDL_SYNCHRONIZED_QUEUE_H
+#define ANDROID_HIDL_SYNCHRONIZED_QUEUE_H
 
 #include <condition_variable>
 #include <mutex>
@@ -24,6 +24,7 @@
 
 namespace android {
 namespace hardware {
+namespace details {
 /* Threadsafe queue.
  */
 template <typename T>
@@ -100,7 +101,8 @@
     mQueueLimit = limit;
 }
 
+} // namespace details
 } // namespace hardware
 } // namespace android
 
-#endif
+#endif // ANDROID_HIDL_SYNCHRONIZED_QUEUE_H
diff --git a/base/include/hidl/TaskRunner.h b/base/include/hidl/TaskRunner.h
index bc9087f..7d340c7 100644
--- a/base/include/hidl/TaskRunner.h
+++ b/base/include/hidl/TaskRunner.h
@@ -13,14 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_TASK_RUNNER_H
-#define ANDROID_TASK_RUNNER_H
+#ifndef ANDROID_HIDL_TASK_RUNNER_H
+#define ANDROID_HIDL_TASK_RUNNER_H
 
 #include "SynchronizedQueue.h"
 #include <thread>
 
 namespace android {
 namespace hardware {
+namespace details {
 
 /*
  * A background infinite loop that runs the Tasks push()'ed.
@@ -62,7 +63,8 @@
     std::thread *mThread;
 };
 
+} // namespace details
 } // namespace hardware
 } // namespace android
 
-#endif // ANDROID_TASK_RUNNER_H
+#endif // ANDROID_HIDL_TASK_RUNNER_H
diff --git a/test_main.cpp b/test_main.cpp
index 7ff8ae3..308a8cc 100644
--- a/test_main.cpp
+++ b/test_main.cpp
@@ -255,7 +255,7 @@
 }
 
 TEST_F(LibHidlTest, TaskRunnerTest) {
-    using android::hardware::TaskRunner;
+    using android::hardware::details::TaskRunner;
     TaskRunner tr;
     bool flag = false;
     tr.push([&] {