Handle DISPLAY_DECORATION

I90543850d57323be485a0fa8562f4e965aed28ab in hardware/interfaces
introduces the new Composition type, DISPLAY_DECORATION. Handle this
case when looking at Composition.

Bug: 193170859
Test: TODO
Change-Id: Ic5d5881dbbbaa348bf5ba39c5f8a4fca7b7170b4
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index e6bcec8..94ad6c3 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -539,6 +539,7 @@
             break;
         case Composition::CURSOR:
         case Composition::DEVICE:
+        case Composition::DISPLAY_DECORATION:
             writeBufferStateToHWC(hwcLayer, outputIndependentState, skipLayer);
             break;
         case Composition::INVALID:
@@ -684,6 +685,7 @@
 
         case Composition::DEVICE:
         case Composition::SOLID_COLOR:
+        case Composition::DISPLAY_DECORATION:
             result = (to == Composition::CLIENT);
             break;
 
diff --git a/services/surfaceflinger/CompositionEngine/src/planner/Predictor.cpp b/services/surfaceflinger/CompositionEngine/src/planner/Predictor.cpp
index 074673e..2d53583 100644
--- a/services/surfaceflinger/CompositionEngine/src/planner/Predictor.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/planner/Predictor.cpp
@@ -114,6 +114,10 @@
                 plan.addLayerType(
                         aidl::android::hardware::graphics::composer3::Composition::SOLID_COLOR);
                 continue;
+            case 'A':
+                plan.addLayerType(aidl::android::hardware::graphics::composer3::Composition::
+                                          DISPLAY_DECORATION);
+                continue;
             default:
                 return std::nullopt;
         }
@@ -143,6 +147,10 @@
             case aidl::android::hardware::graphics::composer3::Composition::SOLID_COLOR:
                 result.append("S");
                 break;
+            case aidl::android::hardware::graphics::composer3::Composition::DISPLAY_DECORATION:
+                // A for "Alpha", since the decoration is an alpha layer.
+                result.append("A");
+                break;
         }
     }
     return result;