From f519d8845d0f8b884bf3c594bb0753e918e670b8 Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Tue, 13 Sep 2011 03:11:17 +0800 Subject: Fix NPE in video capture intent mode. bug:5297312 Change-Id: Ib4efd8fb181f28611e1800aedc757eef07cb1538 --- src/com/android/camera/VideoCamera.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index d3f0f8e..73ba11f 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -1541,7 +1541,7 @@ public class VideoCamera extends ActivityBase private void showRecordingUI(boolean recording) { if (recording) { - mThumbnailView.setEnabled(false); + if (mThumbnailView != null) mThumbnailView.setEnabled(false); mShutterButton.setBackgroundResource(R.drawable.btn_shutter_video_recording); mRecordingTimeView.setText(""); mRecordingTimeView.setVisibility(View.VISIBLE); @@ -1555,7 +1555,7 @@ public class VideoCamera extends ActivityBase } } } else { - mThumbnailView.setEnabled(true); + if (mThumbnailView != null) mThumbnailView.setEnabled(true); mShutterButton.setBackgroundResource(R.drawable.btn_shutter_video); mRecordingTimeView.setVisibility(View.GONE); if (mReviewControl != null) mReviewControl.setVisibility(View.VISIBLE); -- cgit v1.1