Skip to content

Instantly share code, notes, and snippets.

@DavidTPate
Created February 13, 2013 04:49
Show Gist options
  • Save DavidTPate/4942381 to your computer and use it in GitHub Desktop.
Save DavidTPate/4942381 to your computer and use it in GitHub Desktop.
private Camera.ErrorCallback getErrorCallback() {
if (mErrorCallback == null) {
mErrorCallback = new Camera.ErrorCallback() {
@Override
public void onError(int error, Camera camera) {
if (error == Camera.CAMERA_ERROR_SERVER_DIED) {
deinitialize();
initialize();
}
}
};
}
return mErrorCallback;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment