diff options
| author | Likai Ding <likaid@codeaurora.org> | 2016-05-09 15:40:19 +0800 |
|---|---|---|
| committer | Steve Kondik <steve@cyngn.com> | 2016-09-26 04:54:49 -0700 |
| commit | b4dd7d56f7e4389daa894554276895dce962cc09 (patch) | |
| tree | 03823b8bd30dc8d3885a9af32a01a963a3db8adf | |
| parent | fbc9d0928516bff8dd55cccdfff585807e84d4b8 (diff) | |
| download | android_packages_apps_Gallery2-b4dd7d56f7e4389daa894554276895dce962cc09.tar.gz android_packages_apps_Gallery2-b4dd7d56f7e4389daa894554276895dce962cc09.tar.bz2 android_packages_apps_Gallery2-b4dd7d56f7e4389daa894554276895dce962cc09.zip | |
Gallery: fix lock/unlock order
Fix lock/unlock order to prevent ANR.
Change-Id: I08cee044f9ba10461a276ab2b8af877f821324f4
CRs-Fixed: 1011429
| -rw-r--r-- | src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java b/src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java index 74be72255..290657ade 100644 --- a/src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java +++ b/src/com/android/gallery3d/ui/PreparePageFadeoutTexture.java @@ -69,12 +69,12 @@ public class PreparePageFadeoutTexture implements OnGLIdleListener { if (task.isCancelled()) return; GLRoot root = activity.getGLRoot(); RawTexture texture = null; - root.unlockRenderThread(); + root.lockRenderThread(); try { root.addOnGLIdleListener(task); texture = task.get(); } finally { - root.lockRenderThread(); + root.unlockRenderThread(); } if (texture == null) { |
