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 '4c593010dddc6d2972bab87b30bd1b11987a09e1':
  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-16 09:48:26 -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) {