Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 300af265 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Revert "Speculative fix for createBitmap crash"

Bug: 112551574
Test: make

This reverts commit 023c0fc0.

This was a speculative fix for issue 112551574. Some further digging
revealed that the crash was only occurring in O, b/c it had been fixed
(tracked in issue 63044157). This "fix" and logging are not necessary.

Change-Id: I3a25597d1a38c4acab34fef936283e9a57bae826
parent 309eb41a
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -507,18 +507,9 @@ static jobject doDecode(JNIEnv* env, std::unique_ptr<SkStreamRewindable> stream,
                ninePatchChunk, ninePatchInsets, -1);
    }

    // Speculative fix for b/112551574. It doesn't seem like |b| can be null. If it is, print some
    // info that might be helpful to diagnose.
    Bitmap* b = defaultAllocator.getStorageObjAndReset();
    if (!b) {
        ALOGW("defaultAllocator has no storage object!");
        ALOGW("\tjavaBitmap: %s", (javaBitmap == nullptr ? "null" : "present"));
        ALOGW("\tisHardware: %s", (isHardware ? "true" : "false"));
        ALOGW("\twillScale: %s", (willScale ? "true" : "false"));
        return nullptr;
    }
    // now create the java bitmap
    return bitmap::createBitmap(env, b, bitmapCreateFlags, ninePatchChunk, ninePatchInsets, -1);
    return bitmap::createBitmap(env, defaultAllocator.getStorageObjAndReset(),
            bitmapCreateFlags, ninePatchChunk, ninePatchInsets, -1);
}

static jobject nativeDecodeStream(JNIEnv* env, jobject clazz, jobject is, jbyteArray storage,