diff options
author | Angus Kong <shkong@google.com> | 2012-06-13 15:00:23 +0800 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2012-06-13 18:15:11 +0800 |
commit | 3ae6814e3017ea25a57a0f885579022c4faf4e84 (patch) | |
tree | 560ac6eb343ff8f5da9351339818ac14477b1224 /src/com/android/camera/VideoCamera.java | |
parent | 1461b5333aab31faee65272d64c2ac7f9809d4d0 (diff) | |
download | LegacyCamera-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-x | src/com/android/camera/VideoCamera.java | 3 |
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; } |