fix [3123221] Video sticks playing back upside down following orientation switch

the overlay wasn't reconfigured when the screen-orientation changed. It was
only done when a parameter of the surface itself changed.

Change-Id: I0ca0925bf58ded4c91ab89d12cb1fe4d1477c96c
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp
index 87cabed..ccaad51 100644
--- a/services/surfaceflinger/LayerBuffer.cpp
+++ b/services/surfaceflinger/LayerBuffer.cpp
@@ -132,6 +132,14 @@
     LayerBase::unlockPageFlip(planeTransform, outDirtyRegion);    
 }
 
+void LayerBuffer::validateVisibility(const Transform& globalTransform)
+{
+    sp<Source> source(getSource());
+    if (source != 0)
+        source->onvalidateVisibility(globalTransform);
+    LayerBase::validateVisibility(globalTransform);
+}
+
 void LayerBuffer::drawForSreenShot() const
 {
     const DisplayHardware& hw(graphicPlane(0).displayHardware());
@@ -641,6 +649,11 @@
     }
 }
 
+void LayerBuffer::OverlaySource::onvalidateVisibility(const Transform&)
+{
+    mVisibilityChanged = true;
+}
+
 void LayerBuffer::OverlaySource::onVisibilityResolved(
         const Transform& planeTransform)
 {