graphics: make allocator default impl a static library

Convert the default impl into a static library,
android.hardware.graphics.allocator@2.0-passthrough.

Test: boots and VTS
Change-Id: I8ec8b30766462ecb3fb789af7c6dbb3c088ccf57
diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp
index 7964032..f100d96 100644
--- a/graphics/allocator/2.0/default/Android.bp
+++ b/graphics/allocator/2.0/default/Android.bp
@@ -1,10 +1,12 @@
 cc_library_shared {
     name: "android.hardware.graphics.allocator@2.0-impl",
     defaults: ["hidl_defaults"],
-    proprietary: true,
+    vendor: true,
     relative_install_path: "hw",
-    srcs: ["Gralloc.cpp", "Gralloc0Allocator.cpp", "Gralloc1Allocator.cpp"],
-    cppflags: ["-Wall", "-Wextra"],
+    srcs: ["Gralloc.cpp"],
+    static_libs: [
+        "android.hardware.graphics.allocator@2.0-passthrough",
+    ],
     shared_libs: [
         "android.hardware.graphics.allocator@2.0",
         "libbase",
@@ -15,9 +17,6 @@
         "liblog",
         "libutils",
     ],
-    header_libs: [
-        "libgrallocmapperincludes",
-    ],
 }
 
 cc_binary {
diff --git a/graphics/allocator/2.0/utils/passthrough/Android.bp b/graphics/allocator/2.0/utils/passthrough/Android.bp
new file mode 100644
index 0000000..fe70961
--- /dev/null
+++ b/graphics/allocator/2.0/utils/passthrough/Android.bp
@@ -0,0 +1,23 @@
+cc_library_static {
+    name: "android.hardware.graphics.allocator@2.0-passthrough",
+    defaults: ["hidl_defaults"],
+    vendor: true,
+    srcs: [
+        "Gralloc0Allocator.cpp",
+        "Gralloc1Allocator.cpp",
+    ],
+    shared_libs: [
+        "android.hardware.graphics.allocator@2.0",
+        "android.hardware.graphics.mapper@2.0",
+        "libhardware",
+    ],
+    export_shared_lib_headers: [
+        "android.hardware.graphics.allocator@2.0",
+        "android.hardware.graphics.mapper@2.0",
+        "libhardware",
+    ],
+    export_include_dirs: ["."],
+    header_libs: [
+        "libgrallocmapperincludes",
+    ],
+}
diff --git a/graphics/allocator/2.0/default/Gralloc0Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp
similarity index 100%
rename from graphics/allocator/2.0/default/Gralloc0Allocator.cpp
rename to graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp
diff --git a/graphics/allocator/2.0/default/Gralloc0Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h
similarity index 100%
rename from graphics/allocator/2.0/default/Gralloc0Allocator.h
rename to graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h
diff --git a/graphics/allocator/2.0/default/Gralloc1Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp
similarity index 100%
rename from graphics/allocator/2.0/default/Gralloc1Allocator.cpp
rename to graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp
diff --git a/graphics/allocator/2.0/default/Gralloc1Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h
similarity index 100%
rename from graphics/allocator/2.0/default/Gralloc1Allocator.h
rename to graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h