OSDN Git Service

Avoid crashing in unlockCanvasAndPost
authorAndy McFadden <fadden@android.com>
Tue, 20 Aug 2013 17:05:51 +0000 (10:05 -0700)
committerAndy McFadden <fadden@android.com>
Tue, 20 Aug 2013 18:23:17 +0000 (11:23 -0700)
commited55c8db1c0d47492423fc54f4b0dd5cd585e593
treebdb2642fabb49dafe2e7102629a9a45b46fa8c3f
parent58514937628dfcf3b2949e4cbc45d5526ecb8019
Avoid crashing in unlockCanvasAndPost

It's possible to update the native surface pointer while the
surface is locked (via lockCanvas).  This leads to a surprise when
the surface is unlocked.  Avoid the surprise by tracking the
locked surface separately.

Bug 10289713

Change-Id: I84346c952be859bbd91ceae7df07b91dabe0948e
core/java/android/view/Surface.java
core/jni/android_view_Surface.cpp