summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoUI.java
diff options
context:
space:
mode:
authorRaghu DP <dp.raghu@codeaurora.org>2013-11-12 12:25:44 +0530
committerRaghu DP <dp.raghu@codeaurora.org>2013-11-12 13:04:00 +0530
commit42a1f1fc90c819f0a116b9781b674d39a3ecbd22 (patch)
tree1b3218b8929e3fbd8899aeb044121d3f701d3c1d /src/com/android/camera/PhotoUI.java
parentd3c1bbb509400203e0752f0231a08c9175f8b5b8 (diff)
downloadandroid_packages_apps_Snap-42a1f1fc90c819f0a116b9781b674d39a3ecbd22.tar.gz
android_packages_apps_Snap-42a1f1fc90c819f0a116b9781b674d39a3ecbd22.tar.bz2
android_packages_apps_Snap-42a1f1fc90c819f0a116b9781b674d39a3ecbd22.zip
Camera: Checking for null before creating bitmap
We dont get bitmap data when image is captured in raw format. So downsample of the captured image, which is bitmap will be null. Added null check for bitmap before calling createBitmap function. Change-Id: I9261218bbb27a9a7671f62fec72885eed1376912 CRs-Fixed: 573544
Diffstat (limited to 'src/com/android/camera/PhotoUI.java')
-rw-r--r--src/com/android/camera/PhotoUI.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 1d4751b6b..66db1d08b 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -160,7 +160,7 @@ public class PhotoUI implements PieListener,
protected Bitmap doInBackground(Void... params) {
// Decode image in background.
Bitmap bitmap = CameraUtil.downSample(mData, DOWN_SAMPLE_FACTOR);
- if (mOrientation != 0 || mMirror) {
+ if ((mOrientation != 0 || mMirror) && (bitmap != null)) {
Matrix m = new Matrix();
m.preRotate(mOrientation);
if (mMirror) {