title: Android camera preview is not resumed after Pause
body: <p>I successfully created a camera surface view, and it works when the app is started/restarted. But it just shows a black screen, after I pause the game and resume it (pressing home screen). Am I missing something here?</p>
  
  <p>Here's the code for the surface (which is created from a Main Activity:</p>
  
  <pre><code>public class CameraView extends SurfaceView implements SurfaceHolder.Callback{
  
  static Camera camera = null;
  Surface camSurface;
  String TAG = "CameraView";
  static SurfaceHolder mHolder;
  
  public CameraView(Context context) {
      super(context);
      getHolder().addCallback(this);
      getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
      // TODO Auto-generated constructor stub
  }
  
  @Override
  public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void surfaceCreated(SurfaceHolder arg0) {
      // TODO Auto-generated method stub
  
      Log.e(TAG, "Camera view created");
  
      mHolder = getHolder();
  
      if(camera == null){
          camera = Camera.open();
      }
  
      if(camera == null){
          Log.e(TAG, "Null camera");
      }
  
      try {
          camera.setPreviewDisplay(getHolder());
      } catch (IOException e) {
          // TODO Auto-generated catch block
          camera.release();
          camera = null;
          e.printStackTrace();
      }
  
  }
  
  @Override
  public void surfaceDestroyed(SurfaceHolder arg0) {
      // TODO Auto-generated method stub
      synchronized(mHolder){
          if(camera!=null){
              camera.stopPreview();
              camera.release();
              camera = null;
          }
      }
  }
  }
  </code></pre>