Copy over updated NDK APIs and follow other API changes.

Change-Id: Ifec95268c9ade21963eea13357ec2f56fd7968c2
This commit is contained in:
Dianne Hackborn
2010-07-13 17:51:26 -07:00
parent 52705bb02c
commit 98b2c359c2
7 changed files with 88 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ import android.view.SurfaceHolder;
* Demonstrates how to take over the Surface from a window to do direct
* drawing to it (without going through the view hierarchy).
*/
public class WindowSurface extends Activity implements SurfaceHolder.Callback {
public class WindowSurface extends Activity implements SurfaceHolder.Callback2 {
DrawingThread mDrawingThread;
@Override
@@ -76,6 +76,9 @@ public class WindowSurface extends Activity implements SurfaceHolder.Callback {
// new sizes from the canvas.
}
public void surfaceRedrawNeeded(SurfaceHolder holder) {
}
public void surfaceDestroyed(SurfaceHolder holder) {
// We need to tell the drawing thread to stop, and block until
// it has done so.