Add is protected bit into dumpsys.

The bit is there forever, we just never dump it in dumpsys.

BUG: 130749718
Test: adb shell dumpsys SurfaceFlinger shows the protected bit.
Change-Id: I09c1bb94f178c8d3d50ab4e5163000c8c95d0fa2
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 1527c34..b6323a2 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1898,6 +1898,7 @@
 
         layerInfo->set_is_opaque(isOpaque(state));
         layerInfo->set_invalidate(contentDirty);
+        layerInfo->set_is_protected(isProtected());
 
         // XXX (b/79210409) mCurrentDataSpace is not protected
         layerInfo->set_dataspace(
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
index 7288232..d3381e5 100644
--- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp
+++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -299,6 +299,7 @@
 
     StringAppendF(&result, "crop=%s, ", crop.to_string().c_str());
     StringAppendF(&result, "cornerRadius=%f, ", cornerRadius);
+    StringAppendF(&result, "isProtected=%1d, ", isProtected);
     StringAppendF(&result, "isOpaque=%1d, invalidate=%1d, ", isOpaque, invalidate);
     StringAppendF(&result, "dataspace=%s, ", dataspace.c_str());
     StringAppendF(&result, "defaultPixelFormat=%s, ", pixelFormat.c_str());