Remove unreachable code now that we no longer cache protected buffers

Test: atest com.google.android.media.gts.WidevineDashPolicyTests
Bug: 183391755
Change-Id: Ie13098d4f4b55d4a6b354d0a6596d8ff0ceb7358
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.cpp b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
index 540e36a..c5ad64e 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
@@ -513,14 +513,9 @@
     }
     ATRACE_CALL();
 
-    // We need to switch the currently bound context if the buffer is protected but the current
-    // context is not. The current state must then be restored after the buffer is cached.
-    const bool protectedContextState = mInProtectedContext;
-    if (!useProtectedContext(protectedContextState || isProtectedBuffer)) {
-        ALOGE("Attempting to cache a buffer into a different context than what is currently bound");
-        return;
-    }
-
+    // If we were to support caching protected buffers then we will need to switch the currently
+    // bound context if we are not already using the protected context (and subsequently switch
+    // back after the buffer is cached).
     auto grContext = getActiveGrContext();
     auto& cache = mInProtectedContext ? mProtectedTextureCache : mTextureCache;
 
@@ -534,8 +529,6 @@
                                                                isRenderable);
         cache.insert({buffer->getId(), imageTextureRef});
     }
-    // restore the original state of the protected context if necessary
-    useProtectedContext(protectedContextState);
 }
 
 void SkiaGLRenderEngine::unmapExternalTextureBuffer(const sp<GraphicBuffer>& buffer) {