hikey: gralloc: Treble changes

This patch provides gralloc changes that are needed
to work with FULL_TREBLE enabled

Credit for this patch goes to Vishal Bhoj <vishal.bhoj@linaro.org>
who basically was the original author and magician
who got things working.

I've only refactored and split up his changes to help
with the submissions.

Change-Id: I567bce33f7eb476dd38bbbe3a9a07c01b5c395f6
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index 7f682fc..8c41842 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -23,11 +23,8 @@
 include $(CLEAR_VARS)
 LOCAL_PRELINK_MODULE := false
 
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 21 && echo OK),OK)
-	LOCAL_MODULE_RELATIVE_PATH := hw
-else
-	LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-endif
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_VENDOR_MODULE := true
 
 MALI_DDK_TEST_PATH := hardware/arm/