Skip to content

Commit

Permalink
Check if surface holder is null in initializeRecorder. do not merge
Browse files Browse the repository at this point in the history
If shutter button is pressed before surface changed,
surface holder can be null. Recording should be ignored.

bug:3187885
Change-Id: I61406f3c44342db28f0ebeddc788d2d1d621fc1b
  • Loading branch information
Wu-cheng Li committed Nov 12, 2010
1 parent 6f86a07 commit becd4ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/android/camera/VideoCamera.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -931,6 +931,11 @@ private void initializeRecorder() {
// If the mCameraDevice is null, then this activity is going to finish // If the mCameraDevice is null, then this activity is going to finish
if (mCameraDevice == null) return; if (mCameraDevice == null) return;


if (mSurfaceHolder == null) {
Log.v(TAG, "Surface holder is null. Wait for surface changed.");
return;
}

Intent intent = getIntent(); Intent intent = getIntent();
Bundle myExtras = intent.getExtras(); Bundle myExtras = intent.getExtras();


Expand Down

0 comments on commit becd4ed

Please sign in to comment.