OSDN Git Service

Fix 6341866 ANR in com.google.android.gallery3d due to com.android.gallery3d.ui.TileI...
authorRay Chen <raychen@google.com>
Wed, 2 May 2012 07:31:38 +0000 (15:31 +0800)
committerRay Chen <raychen@google.com>
Wed, 2 May 2012 07:31:38 +0000 (15:31 +0800)
commit6fc8d72ce0814a70c74be71fb9d0775b8d7ca768
tree2b7c3f54e4516b0b93f4e823a0cd6b14a31bfe9a
parent814360ae97d59e333440076b5517fff0c6be5ca9
Fix 6341866 ANR in com.google.android.gallery3d due to com.android.gallery3d.ui.TileImageViewAdapter.setScreenNail

RegionDecoder is run in a lower priority thread but it uses the same lock as setScreenNail while decoding, so a priority inversion causes this ANR.
The change tries to separate the lock so setScreenNail doesn't have to wait on the decoding process so the ANR could be avoided.

Change-Id: I02cc26fa0535adaa57cdcf94b819970e179311d1
b:6341866
src/com/android/gallery3d/ui/TileImageViewAdapter.java