diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-07 15:11:38 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-07 15:11:38 -0700 |
commit | a26301351c28e820f6c2346ebd07265cfed14c8b (patch) | |
tree | c106877f8a4db39e71e6a143824bf2e3f223976b /src/com/android/camera | |
parent | a458dfa30e157b95e7c77afbdddd84832cb4b121 (diff) | |
parent | 3a76a2e916cd5c99b2d9d6e2ecf33d7bb6c27058 (diff) | |
download | android_packages_apps_Snap-a26301351c28e820f6c2346ebd07265cfed14c8b.tar.gz android_packages_apps_Snap-a26301351c28e820f6c2346ebd07265cfed14c8b.tar.bz2 android_packages_apps_Snap-a26301351c28e820f6c2346ebd07265cfed14c8b.zip |
Merge "Fix two monkey issues" into camera-SnapdragonCamera.lnx.2.0
Diffstat (limited to 'src/com/android/camera')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 4 | ||||
-rwxr-xr-x | src/com/android/camera/SettingsManager.java | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index f8e1b8d9a..7bfee3041 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4631,7 +4631,7 @@ public class CaptureModule implements CameraModule, PhotoController, } } else { // is pause or stopRecord - if (!(mMediaRecorderPausing && mStopRecPending)) { + if (!(mMediaRecorderPausing && mStopRecPending) && (mCurrentSession != null)) { mCurrentSession.stopRepeating(); try { mVideoRequestBuilder.set(CaptureModule.recording_end_stream, (byte) 0x01); @@ -4655,7 +4655,7 @@ public class CaptureModule implements CameraModule, PhotoController, } // set preview - if (captureRequestBuilder != null) { + if (captureRequestBuilder != null && (mCurrentSession != null)) { if (mCurrentSession instanceof CameraConstrainedHighSpeedCaptureSession) { List requestList = CameraUtil.createHighSpeedRequestList(captureRequestBuilder.build()); mCurrentSession.setRepeatingBurst(requestList, diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java index bdb7bcc2e..7640cb53b 100755 --- a/src/com/android/camera/SettingsManager.java +++ b/src/com/android/camera/SettingsManager.java @@ -1381,13 +1381,17 @@ public class SettingsManager implements ListMenu.SettingsListener { } private List<String> getSupportedWhiteBalanceModes(int cameraId) { - int[] whiteBalanceModes = mCharacteristics.get(cameraId).get(CameraCharacteristics - .CONTROL_AWB_AVAILABLE_MODES); - List<String> modes = new ArrayList<>(); - for (int mode : whiteBalanceModes) { - modes.add("" + mode); + try { + int[] whiteBalanceModes = mCharacteristics.get(cameraId).get(CameraCharacteristics + .CONTROL_AWB_AVAILABLE_MODES); + List<String> modes = new ArrayList<>(); + for (int mode : whiteBalanceModes) { + modes.add("" + mode); + } + return modes; + } catch (IndexOutOfBoundsException e) { + return null; } - return modes; } private List<String> getSupportedSceneModes(int cameraId) { |