am a962ef29: am 4c593010: Merge "Followup to a bug fix. Addtion of synchronized to the methods triggers an API change. Per council advice, pushing synch block into the function body." into ics-mr1

* commit 'a962ef2993099e6c5db3809a7e829e43c8cf084a':
  Followup to a bug fix. Addtion of synchronized to the methods triggers an API change. Per council advice, pushing synch block into the function body.
This commit is contained in:
Alex Sakhartchouk
2011-11-17 04:08:30 -08:00
committed by Android Git Automerger

View File

@@ -77,10 +77,12 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
public synchronized void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return
if (mRS != null) {
mRS.setSurface(null, 0, 0);
public void surfaceDestroyed(SurfaceHolder holder) {
synchronized (this) {
// Surface will be destroyed when we return
if (mRS != null) {
mRS.setSurface(null, 0, 0);
}
}
}
@@ -88,9 +90,11 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
public synchronized void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
if (mRS != null) {
mRS.setSurface(holder, w, h);
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
synchronized (this) {
if (mRS != null) {
mRS.setSurface(holder, w, h);
}
}
}
@@ -125,9 +129,11 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
return rs;
}
public synchronized void destroyRenderScriptGL() {
mRS.destroy();
mRS = null;
public void destroyRenderScriptGL() {
synchronized (this) {
mRS.destroy();
mRS = null;
}
}
public void setRenderScriptGL(RenderScriptGL rs) {