summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/SettingsManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 1380a5e..3c3f90d 100644
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -146,8 +146,9 @@ public class SettingsManager implements ListMenu.SettingsListener {
CaptureModule.MONO_ID = i;
mIsMonoCameraPresent = true;
}
- int facing = characteristics.get(CameraCharacteristics.LENS_FACING);
- if (facing == CameraCharacteristics.LENS_FACING_FRONT) {
+ Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);
+ if (facing != null &&
+ facing.intValue() == CameraCharacteristics.LENS_FACING_FRONT) {
CaptureModule.FRONT_ID = i;
mIsFrontCameraPresent = true;
}