Merge "surfaceflinger: clear HWC layers in Layer::onRemoved" into oc-dev
am: e256ecb511

Change-Id: I3d46760b868a0b1f4db95b8ba8de4f434292ebc9
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index b43b30d..d9cc6ed 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -296,6 +296,9 @@
     }
 
     mSurfaceFlingerConsumer->abandon();
+
+    clearHwcLayers();
+
     for (const auto& child : mCurrentChildren) {
         child->onRemoved();
     }