From 8f2d50521653f24c2a5e77b627dc015c7fbd656a Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 7 Oct 2009 17:58:29 -0700 Subject: fix [2164183] sometimes device just wants to stay asleep 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/surfaceflinger/Layer.cpp') diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp index 2a3e6677e7..7fd5434d05 100644 --- a/libs/surfaceflinger/Layer.cpp +++ b/libs/surfaceflinger/Layer.cpp @@ -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()) { -- cgit v1.2.3-59-g8ed1b