am 7abbbc68: Merge "Add TEMP_FAILURE_RETRY to ZipUtils"

* commit '7abbbc680d03dd8e50a709f89b78ace6b81154b0':
  Add TEMP_FAILURE_RETRY to ZipUtils
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index a4da92f..16bac8f 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -196,12 +196,6 @@
     coveredRegionScreen = coveredRegion;
 }
 
-void LayerBase::setVisibleNonTransparentRegion(const Region&
-        visibleNonTransparentRegion) {
-    // always called from main thread
-    this->visibleNonTransparentRegion = visibleNonTransparentRegion;
-}
-
 uint32_t LayerBase::doTransaction(uint32_t flags)
 {
     const Layer::State& front(drawingState());
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index 94d074a..c547a40 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -63,7 +63,6 @@
             Region      visibleRegionScreen;
             Region      transparentRegionScreen;
             Region      coveredRegionScreen;
-            Region      visibleNonTransparentRegion;
             int32_t     sequence;
             
             struct Geometry {
@@ -99,7 +98,7 @@
             bool setSize(uint32_t w, uint32_t h);
             bool setAlpha(uint8_t alpha);
             bool setMatrix(const layer_state_t::matrix22_t& matrix);
-            bool setTransparentRegionHint(const Region& transparent);
+            bool setTransparentRegionHint(const Region& opaque);
             bool setFlags(uint8_t flags, uint8_t mask);
             bool setCrop(const Rect& crop);
             
@@ -160,13 +159,6 @@
     virtual void setCoveredRegion(const Region& coveredRegion);
 
     /**
-     * setVisibleNonTransparentRegion - called when the visible and
-     * non-transparent region changes.
-     */
-    virtual void setVisibleNonTransparentRegion(const Region&
-            visibleNonTransparentRegion);
-
-    /**
      * validateVisibility - cache a bunch of things
      */
     virtual void validateVisibility(const Transform& globalTransform);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 859db58..51fcce4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -620,16 +620,6 @@
          */
         Region coveredRegion;
 
-        /*
-         * transparentRegion: area of a surface that is hinted to be completely
-         * transparent. This is only used to tell when the layer has no visible
-         * non-transparent regions and can be removed from the layer list. It
-         * does not affect the visibleRegion of this layer or any layers
-         * beneath it. The hint may not be correct if apps don't respect the
-         * SurfaceView restrictions (which, sadly, some don't).
-         */
-        Region transparentRegion;
-
 
         // handle hidden surfaces by setting the visible region to empty
         if (CC_LIKELY(!(s.flags & ISurfaceComposer::eLayerHidden) && s.alpha)) {
@@ -640,7 +630,7 @@
             if (!visibleRegion.isEmpty()) {
                 // Remove the transparent area from the visible region
                 if (translucent) {
-                    transparentRegion = layer->transparentRegionScreen;
+                    visibleRegion.subtractSelf(layer->transparentRegionScreen);
                 }
 
                 // compute the opaque region
@@ -699,8 +689,6 @@
         // Store the visible region is screen space
         layer->setVisibleRegion(visibleRegion);
         layer->setCoveredRegion(coveredRegion);
-        layer->setVisibleNonTransparentRegion(
-                visibleRegion.subtract(transparentRegion));
 
         // If a secure layer is partially visible, lock-down the screen!
         if (layer->isSecure() && !visibleRegion.isEmpty()) {
@@ -752,7 +740,7 @@
             mVisibleLayersSortedByZ.clear();
             mVisibleLayersSortedByZ.setCapacity(count);
             for (size_t i=0 ; i<count ; i++) {
-                if (!currentLayers[i]->visibleNonTransparentRegion.isEmpty())
+                if (!currentLayers[i]->visibleRegionScreen.isEmpty())
                     mVisibleLayersSortedByZ.add(currentLayers[i]);
             }