summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2012-06-13 15:00:23 +0800
committerAngus Kong <shkong@google.com>2012-06-13 18:15:11 +0800
commit3ae6814e3017ea25a57a0f885579022c4faf4e84 (patch)
tree560ac6eb343ff8f5da9351339818ac14477b1224 /src/com/android/camera/VideoCamera.java
parent1461b5333aab31faee65272d64c2ac7f9809d4d0 (diff)
downloadLegacyCamera-3ae6814e3017ea25a57a0f885579022c4faf4e84.zip
LegacyCamera-3ae6814e3017ea25a57a0f885579022c4faf4e84.tar.gz
LegacyCamera-3ae6814e3017ea25a57a0f885579022c4faf4e84.tar.bz2
Fix NPE when only front cameras are available.
bug:6643208 Change-Id: Ie4eef4a671091cd9557d1c51ab5c3919b6b30652
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index e93fbca..b2626ed 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -1481,8 +1481,7 @@ public class VideoCamera extends ActivityBase
.setOnMenuItemClickListener(new OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
CameraSettings.writePreferredCameraId(mPreferences,
- ((mCameraId == mFrontCameraId)
- ? mBackCameraId : mFrontCameraId));
+ (mCameraId + 1) % mNumberOfCameras);
onSharedPreferenceChanged();
return true;
}