Adapted to the conventional way to get the SurfaceHolder based on Android samples.