Get rid of dependency on core from linux build (1/2)

When building bluetooth stack for linux, don't include dependencies from
core.

Test: build with ninja and mma
Change-Id: I02aeb178327c9f6c0414cc37624aecc58fb0876e
diff --git a/README.md b/README.md
index 23a45b2..712aa28 100644
--- a/README.md
+++ b/README.md
@@ -79,7 +79,6 @@
 
 ```sh
 cd ~/fluoride
-git clone https://android.googlesource.com/platform/system/core
 git clone https://android.googlesource.com/platform/hardware/libhardware
 ```
 
@@ -100,7 +99,6 @@
 # See "gn args <out_dir> --list" for available build arguments.
 
 libhw_include_path = "/home/job/fluoride/libhardware/include"
-core_include_path = "/home/job/fluoride/core/include"
 ```
 
 Then generate your build files by calling
diff --git a/build/BUILD.gn b/build/BUILD.gn
index 601a750..c86e407 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -17,7 +17,6 @@
 declare_args() {
   # Include path for hardware/bluetooth.h
   libhw_include_path = ""
-  core_include_path = ""
 }
 
 config("default_include_dirs") {
@@ -25,11 +24,8 @@
   # been removed.
   assert(libhw_include_path != "",
          "libhardware_include_path build argument wasn't provided.")
-  assert(core_include_path != "",
-         "core_include_path build argument wasn't provided.")
   include_dirs = [
     libhw_include_path,
-    core_include_path,
   ]
 }
 
@@ -66,6 +62,11 @@
     "EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
     "KERNEL_MISSING_CLOCK_BOOTTIME_ALARM=TRUE",
 
+    # This is a macro to that can be used by android hardware/libhardware
+    # to not include dependencies on core project. This is a temporary
+    # workaround until we get rid of dependency on hardware.
+    "_HW_DONT_INCLUDE_CORE_=1",
+
     # This is a macro to that can be used by source code to detect if the
     # current build is done by GN or via Android.mk. This is a temporary
     # workaround until we can remove all Android-specific dependencies.
diff --git a/utils/src/bt_utils.cc b/utils/src/bt_utils.cc
index 4797233..a524edf 100644
--- a/utils/src/bt_utils.cc
+++ b/utils/src/bt_utils.cc
@@ -36,8 +36,13 @@
 #include <sys/resource.h>
 #include <unistd.h>
 
+#ifdef OS_GENERIC
+#define ANDROID_PRIORITY_AUDIO -16
+#define ANDROID_PRIORITY_URGENT_AUDIO -19
+#else
 #include <utils/ThreadDefs.h>
 #include <cutils/sched_policy.h>
+#endif
 
 #include "bt_types.h"
 #include "btcore/include/module.h"