Add stub graphics driver package for marlin/sailfish

This empty pre-installed package does nothing, but establishes a
package name and certificate that allow non-empty updated versions to
be installed and trusted by the framework.

Bug: 37902408
Test: Maps, vulkanGears
Change-Id: I1e21b79f62c767785985ccb26bce0930256dc1c9
diff --git a/device-common.mk b/device-common.mk
index 0d67fd2..c276bf4 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -67,7 +67,9 @@
 
 # graphics
 PRODUCT_PROPERTY_OVERRIDES += \
-    ro.opengles.version=196610
+    ro.opengles.version=196610 \
+    ro.gfx.driver.0=com.google.pixel.marlin.gfxdrv
+PRODUCT_PACKAGES += marlin_gfxdrv
 
 # HWUI common settings
 PRODUCT_PROPERTY_OVERRIDES += \
diff --git a/gfxdriver/Android.mk b/gfxdriver/Android.mk
new file mode 100644
index 0000000..376d448
--- /dev/null
+++ b/gfxdriver/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_PACKAGE_NAME := marlin_gfxdrv
+LOCAL_MODULE_OWNER := google
+LOCAL_PROPRIETARY_MODULE := true
+
+include vendor/qcom/gpu/msm8996/version.mk
+LOCAL_ADDITIONAL_DEPENDENCIES := vendor/qcom/gpu/msm8996/version.mk
+
+LOCAL_AAPT_FLAGS := --version-code $(QCOM_MSM8996_GPU_LIBS_VERSION_CODE) --version-name $(QCOM_MSM8996_GPU_LIBS_VERSION_NAME)
+
+include $(BUILD_PACKAGE)
diff --git a/gfxdriver/AndroidManifest.xml b/gfxdriver/AndroidManifest.xml
new file mode 100644
index 0000000..7c4c5ce
--- /dev/null
+++ b/gfxdriver/AndroidManifest.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.google.pixel.marlin.gfxdrv" >
+
+    <application
+        android:label="Pixel 2016 Graphics Driver"
+        android:allowBackup="false"
+        android:hasCode="false"
+        android:extractNativeLibs="false"
+        android:multiArch="true">
+    </application>
+
+</manifest>