Exclude MTP implementation from simulator build

Change-Id: I93364c74c26ba6e2bf6b08f1bd82802b966c8dfb
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/media/jni/android_media_MtpServer.cpp b/media/jni/android_media_MtpServer.cpp
index 0883527..eddad57 100644
--- a/media/jni/android_media_MtpServer.cpp
+++ b/media/jni/android_media_MtpServer.cpp
@@ -42,6 +42,8 @@
 
 // ----------------------------------------------------------------------------
 
+#ifdef HAVE_ANDROID_OS
+
 static bool ExceptionCheck(void* env)
 {
     return ((JNIEnv *)env)->ExceptionCheck();
@@ -111,9 +113,12 @@
     }
 };
 
+#endif // HAVE_ANDROID_OS
+
 static void
 android_media_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jstring storagePath)
 {
+#ifdef HAVE_ANDROID_OS
     LOGD("setup\n");
 
     MtpDatabase* database = getMtpDatabase(env, javaDatabase);
@@ -123,6 +128,7 @@
     env->SetIntField(thiz, field_context, (int)thread);
 
     env->ReleaseStringUTFChars(storagePath, storagePathStr);
+#endif
 }
 
 static void
@@ -135,42 +141,50 @@
 static void
 android_media_MtpServer_start(JNIEnv *env, jobject thiz)
 {
+#ifdef HAVE_ANDROID_OS
     LOGD("start\n");
     MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
     thread->run("MtpThread");
+#endif // HAVE_ANDROID_OS
 }
 
 static void
 android_media_MtpServer_stop(JNIEnv *env, jobject thiz)
 {
+#ifdef HAVE_ANDROID_OS
     LOGD("stop\n");
     MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
     if (thread) {
         thread->setDone();
         env->SetIntField(thiz, field_context, 0);
     }
+#endif
 }
 
 static void
 android_media_MtpServer_send_object_added(JNIEnv *env, jobject thiz, jint handle)
 {
+#ifdef HAVE_ANDROID_OS
     LOGD("send_object_added %d\n", handle);
     MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
     if (thread)
         thread->sendObjectAdded(handle);
     else
         LOGE("sendObjectAdded called while disconnected\n");
+#endif
 }
 
 static void
 android_media_MtpServer_send_object_removed(JNIEnv *env, jobject thiz, jint handle)
 {
+#ifdef HAVE_ANDROID_OS
     LOGD("send_object_removed %d\n", handle);
     MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
     if (thread)
         thread->sendObjectRemoved(handle);
     else
         LOGE("sendObjectRemoved called while disconnected\n");
+#endif
 }
 
 // ----------------------------------------------------------------------------