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

Commit a3e1d7b4 authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai
Browse files

SurfaceTexture: setConsumerIsProtected

When in a protected context, SurfaceTexture should call
setConsumerIsProtected Instead of setting consumer usage bits to
indicate the producer that the consumer can handle protected content.

Bug: 35726763
Test: videoplayer-nodrm-protected.apk and videoplayer-drm-protected.apk
both works.

Change-Id: I0028c040e727691e1e42226c0b66de075fe5515d
parent ba9b2ce2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -286,9 +286,7 @@ static void SurfaceTexture_init(JNIEnv* env, jobject thiz, jboolean isDetached,
            createProcessUniqueId()));

    // If the current context is protected, inform the producer.
    if (isProtectedContext()) {
        consumer->setConsumerUsageBits(GRALLOC_USAGE_PROTECTED);
    }
    consumer->setConsumerIsProtected(isProtectedContext());

    SurfaceTexture_setSurfaceTexture(env, thiz, surfaceTexture);
    SurfaceTexture_setProducer(env, thiz, producer);