diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-05-19 17:05:18 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-05-19 18:09:59 +0800 |
commit | e2eebff5a84e6981d81d0a9ac28322867099b295 (patch) | |
tree | 84a40896c595120827ee800bb13c4a34fc4e4f89 /src | |
parent | ad087c6ac9709b565b091e0f12d815346e788ce3 (diff) | |
download | LegacyCamera-e2eebff5a84e6981d81d0a9ac28322867099b295.zip LegacyCamera-e2eebff5a84e6981d81d0a9ac28322867099b295.tar.gz LegacyCamera-e2eebff5a84e6981d81d0a9ac28322867099b295.tar.bz2 |
Fix NPE in capture intent of phone UI.
bug:4454373
Change-Id: Icaeba621e619d826f91b6bf73a0f57e4fc520fa5
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 9 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 67ac246..5ae43da 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1011,11 +1011,10 @@ public class Camera extends ActivityBase implements View.OnClickListener, if (mIsImageCaptureIntent) { setupCaptureParams(); - View reviewControl = findViewById(R.id.review_control); - reviewControl.setVisibility(View.VISIBLE); - reviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this); - reviewControl.findViewById(R.id.btn_retake).setOnClickListener(this); - reviewControl.findViewById(R.id.btn_done).setOnClickListener(this); + findViewById(R.id.review_control).setVisibility(View.VISIBLE); + findViewById(R.id.btn_cancel).setOnClickListener(this); + findViewById(R.id.btn_retake).setOnClickListener(this); + findViewById(R.id.btn_done).setOnClickListener(this); } else { mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch); mSwitcher.setVisibility(View.VISIBLE); diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index f51a370..ec279cc 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -371,10 +371,10 @@ public class VideoCamera extends ActivityBase mReviewControl = findViewById(R.id.review_control); mReviewControl.setVisibility(View.VISIBLE); - mReviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this); - mReviewControl.findViewById(R.id.btn_done).setOnClickListener(this); + findViewById(R.id.btn_cancel).setOnClickListener(this); + findViewById(R.id.btn_done).setOnClickListener(this); findViewById(R.id.btn_play).setOnClickListener(this); - View retake = mReviewControl.findViewById(R.id.btn_retake); + View retake = findViewById(R.id.btn_retake); retake.setOnClickListener(this); if (retake instanceof ImageView) { ((ImageView) retake).setImageResource(R.drawable.btn_ic_review_retake_video); |