Don't call property_get when building for the host.

Accessing system properties only makes sense on the target, not
on the host.

This change is needed to remove host support for properties.

Change-Id: If456f265cf112f14dd142e17814fc07baa3d8a3b
diff --git a/rsContext.cpp b/rsContext.cpp
index bb2808e..2ec58c3 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -33,7 +33,7 @@
 #include <string.h>
 #include <dlfcn.h>
 
-#ifndef RS_SERVER
+#if !defined(RS_SERVER) && defined(HAVE_ANDROID_OS)
 #include <cutils/properties.h>
 #endif
 
@@ -204,7 +204,7 @@
 #endif
 
 static uint32_t getProp(const char *str) {
-#ifndef RS_SERVER
+#if !defined(RS_SERVER) && defined(HAVE_ANDROID_OS)
     char buf[PROPERTY_VALUE_MAX];
     property_get(str, buf, "0");
     return atoi(buf);
diff --git a/rsFont.cpp b/rsFont.cpp
index 3665a3d..958ecb5 100644
--- a/rsFont.cpp
+++ b/rsFont.cpp
@@ -20,7 +20,9 @@
 #include "rsFont.h"
 #include "rsProgramFragment.h"
 #include "rsMesh.h"
+#ifdef HAVE_ANDROID_OS
 #include <cutils/properties.h>
+#endif
 
 #ifndef ANDROID_RS_SERIALIZE
 #include <ft2build.h>
@@ -337,27 +339,31 @@
     mLibrary = NULL;
 #endif //ANDROID_RS_SERIALIZE
 
+    float gamma = DEFAULT_TEXT_GAMMA;
+    int32_t blackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD;
+    int32_t whiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD;
+
+#ifdef HAVE_ANDROID_OS
     // Get the renderer properties
     char property[PROPERTY_VALUE_MAX];
 
     // Get the gamma
-    float gamma = DEFAULT_TEXT_GAMMA;
     if (property_get(PROPERTY_TEXT_GAMMA, property, NULL) > 0) {
         gamma = atof(property);
     }
 
     // Get the black gamma threshold
-    int32_t blackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD;
     if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, NULL) > 0) {
         blackThreshold = atoi(property);
     }
-    mBlackThreshold = (float)(blackThreshold) / 255.0f;
 
     // Get the white gamma threshold
-    int32_t whiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD;
     if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, NULL) > 0) {
         whiteThreshold = atoi(property);
     }
+#endif
+
+    mBlackThreshold = (float)(blackThreshold) / 255.0f;
     mWhiteThreshold = (float)(whiteThreshold) / 255.0f;
 
     // Compute the gamma tables