hwc: Handle layers marked as PROTECTED flag as secure

- All secure layers are marked with GRALLOC_USAGE_PROTECTED,
  irrespective of L1/L3, which should not fallback to GPU.
- In HWC, treat this layer as secure so that any fallbacks
  will be avoided.

Change-Id: I399740bfb5910f3fda4c4f395e2f7b49ea8619a9
Crs-fixed: 842071
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 03c6341..4fec80c 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -1196,7 +1196,8 @@
         ctx->listStats[dpy].yuvIndices[i] = -1;
         ctx->listStats[dpy].yuv4k2kIndices[i] = -1;
 
-        if (isSecureBuffer(hnd)) {
+        if (isSecureBuffer(hnd) || isProtectedBuffer(hnd)) {
+            // Protected Buffer must be treated as Secure Layer
             ctx->listStats[dpy].isSecurePresent = true;
             if(not isYuvBuffer(hnd)) {
                 // cache secureRGB layer parameters like we cache for YUV layers