From 34ca3353abf3e6bdaab4abb7d5b996421500f3e0 Mon Sep 17 00:00:00 2001
From: jrun <darwinskernel@gmail.com>
Date: Fri, 28 Feb 2020 12:33:24 -0500
Subject: [PATCH] android

---
 aconfigure                        |  3 ---
 aconfigure.ac                     |  3 ---
 pjlib/include/pj/config_site.h    | 11 +++++++++++
 pjlib/src/pj/os_timestamp_posix.c |  2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/aconfigure b/aconfigure
index 51b01a2..2d606ba 100755
--- a/aconfigure
+++ b/aconfigure
@@ -5958,9 +5958,6 @@ case $target in
 	esac
 	# UUID
 	case $target in
-	  *android*)
-	  	ac_os_objs="$ac_os_objs guid_android.o"
-	  	;;
 	  *)
 		if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then
 			ac_os_objs="$ac_os_objs guid_uuid.o"
diff --git a/aconfigure.ac b/aconfigure.ac
index 954b815..f254a30 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -492,9 +492,6 @@ case $target in
 	esac
 	# UUID
 	case $target in
-	  *android*)
-	  	ac_os_objs="$ac_os_objs guid_android.o"
-	  	;;
 	  *)
 		if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then
 			ac_os_objs="$ac_os_objs guid_uuid.o"
diff --git a/pjlib/include/pj/config_site.h b/pjlib/include/pj/config_site.h
index 7b8ea25..333dfc2 100644
--- a/pjlib/include/pj/config_site.h
+++ b/pjlib/include/pj/config_site.h
@@ -24,3 +24,14 @@
 /* Set permanent permissions on the TURN
    server for all peer candidates */
 #define PJ_ICE_ST_USE_TURN_PERMANENT_PERM       PJ_TRUE
+
+/*
+ * ANDROID settings.
+ */
+#undef  PJ_ANDROID
+#define PJ_ANDROID                              0
+#undef  PJ_JNI_HAS_JNI_ONLOAD
+#define PJ_JNI_HAS_JNI_ONLOAD                   0
+#undef  PJMEDIA_HAS_G722_CODEC
+#define PJMEDIA_HAS_G722_CODEC                  1
+#define PJMEDIA_VID_DEV_INFO_FMT_CNT            128
\ No newline at end of file
diff --git a/pjlib/src/pj/os_timestamp_posix.c b/pjlib/src/pj/os_timestamp_posix.c
index 0aed8c4..1ec156b 100644
--- a/pjlib/src/pj/os_timestamp_posix.c
+++ b/pjlib/src/pj/os_timestamp_posix.c
@@ -203,7 +203,7 @@ PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
     return PJ_SUCCESS;
 }
 
-#elif defined(__ANDROID__)
+#elif defined(PJ_ANDROID) && PJ_ANDROID
 
 #include <errno.h>
 #include <time.h>
