Revert "Fix build on older APIs, take 2"

This reverts commit c99f7d48bac368d8fd02f347e87ad576e33f1945.

Reason for revert: build break

Change-Id: I21c47880a0647342075aee628cfe301b9920899c
diff --git a/Android.mk b/Android.mk
index 9235b63..240c657 100644
--- a/Android.mk
+++ b/Android.mk
@@ -72,6 +72,7 @@
 GOLDFISH_OPENGL_SHOULD_BUILD := true
 
 EMUGL_COMMON_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
+EMUGL_COMMON_CFLAGS += -DPLATFORM_VERSION=$(PLATFORM_VERSION)
 
 ifeq (O, $(PLATFORM_VERSION_CODENAME))
 EMUGL_COMMON_CFLAGS += -DGOLDFISH_HIDL_GRALLOC
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp
index 0f41f45..e448a96 100644
--- a/system/gralloc/gralloc.cpp
+++ b/system/gralloc/gralloc.cpp
@@ -1553,10 +1553,10 @@
         lock: gralloc_lock,
         unlock: gralloc_unlock,
         perform: NULL,
-#if PLATFORM_SDK_VERSION >= 28 // In Q, we want to specify these, but SDK version is not 29 yet. do not merge this to P
+#if PLATFORM_VERSION > 9 // In Q, we want to specify these, but SDK version is not 29 yet.
         validateBufferSize: NULL,
         getTransportSize: NULL,
-#endif // PLATFORM_VERSION > 28
+#endif // PLATFORM_VERSION > 9
 #if PLATFORM_SDK_VERSION >= 18
         lock_ycbcr: gralloc_lock_ycbcr,
 #endif // PLATFORM_SDK_VERSION >= 18