jni: Adjust for libui gralloc flags change

Change-Id: I94b95fba5e6234a07d2beba1d6f487842399367f
Bug: b/33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
This commit is contained in:
Chris Forbes
2017-04-20 11:58:45 -07:00
parent 9e55fcbdc2
commit f2c44a3735
2 changed files with 3 additions and 1 deletions

View File

@@ -234,6 +234,7 @@ LOCAL_STATIC_LIBRARIES := \
libseccomp_policy \
libselinux \
libcrypto \
libgrallocusage \
LOCAL_SHARED_LIBRARIES := \
libmemtrack \

View File

@@ -34,6 +34,7 @@
#include <private/gui/ComposerService.h>
#include <hardware/gralloc1.h>
#include <grallocusage/GrallocUsageConversion.h>
#include "core_jni_helpers.h"
@@ -85,7 +86,7 @@ static jlong android_hardware_HardwareBuffer_create(JNIEnv* env, jobject clazz,
&producerUsage, &consumerUsage, usage, 0);
sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers,
producerUsage, consumerUsage,
android_convertGralloc1To0Usage(producerUsage, consumerUsage),
std::string("HardwareBuffer pid [") + std::to_string(getpid()) +"]");
status_t error = buffer->initCheck();
if (error < 0) {