Fix libcrypto dependency in 6.0 trees

Change-Id: Ie230ed5f3db38a62305e03e4f9819e4aca816e16
diff --git a/Android.mk b/Android.mk
index 62ef11a..175b69e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -547,7 +547,7 @@
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE := libfusesideload
 LOCAL_SHARED_LIBRARIES := libcutils libc
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
     LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
     LOCAL_SHARED_LIBRARIES += libmincrypttwrp
     LOCAL_CFLAGS += -DUSE_MINCRYPT
diff --git a/minadbd/Android.mk b/minadbd/Android.mk
index ef59945..3d675dd 100644
--- a/minadbd/Android.mk
+++ b/minadbd/Android.mk
@@ -23,7 +23,15 @@
 LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. system/core/adb
 LOCAL_WHOLE_STATIC_LIBRARIES := libadbd
-LOCAL_SHARED_LIBRARIES := libbase liblog libcutils libc libcrypto
+LOCAL_SHARED_LIBRARIES := libbase liblog libcutils libc
+
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
+    LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
+    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
+    LOCAL_CFLAGS += -DUSE_MINCRYPT
+else
+    LOCAL_SHARED_LIBRARIES += libcrypto
+endif
 
 include $(BUILD_SHARED_LIBRARY)