OSDN Git Service

fix [2164183] sometimes device just wants to stay asleep
authorMathias Agopian <mathias@google.com>
Thu, 8 Oct 2009 00:58:29 +0000 (17:58 -0700)
committerMathias Agopian <mathias@google.com>
Thu, 8 Oct 2009 00:58:29 +0000 (17:58 -0700)
When switching rapidily orientation back and forth, surfaces end-up
acquiring the freeze-lock when the first orientation change happens,
but never release it because by the time the 2nd orientation change
comes in, the surface size is back to its original size and
doesn't appear to have resized.

we now always release the freeze-lock when we receive a buffer of the
expected size.

libs/surfaceflinger/Layer.cpp

index 2a3e667..7fd5434 100644 (file)
@@ -454,10 +454,10 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
 
             // recompute visible region
             recomputeVisibleRegions = true;
-
-            // we now have the correct size, unfreeze the screen
-            mFreezeLock.clear();
         }
+
+        // we now have the correct size, unfreeze the screen
+        mFreezeLock.clear();
     }
 
     if (lcblk->getQueuedCount()) {