Adjust initCheck to compare against OK instead

Bug: 216478685
Test: HardwareBufferTest#testInvalidUsage
Change-Id: Ibf6c92a54bbe5127ffe60fcf3fa20b9237cde7b1
This commit is contained in:
John Reck 2022-01-26 19:06:40 -05:00
parent 4237251574
commit 56eb27e049

View File

@ -85,7 +85,7 @@ static jlong android_hardware_HardwareBuffer_create(JNIEnv* env, jobject clazz,
sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers,
grallocUsage, std::string("HardwareBuffer pid [") + std::to_string(getpid()) +"]");
status_t error = buffer->initCheck();
if (error < 0) {
if (error != OK) {
if (kDebugGraphicBuffer) {
ALOGW("createGraphicBuffer() failed in HardwareBuffer.create()");
}