diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-10-09 12:52:16 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2012-10-09 12:59:16 -0700 |
commit | a3ee047fd8e2a63253f70346925c3ffd069dfc99 (patch) | |
tree | 8950934448e5467c89e0f93f645d36677d856056 /services/camera/libcameraservice | |
parent | 2458d482c4822c6f9e6274f5bd12b6aea095a9cd (diff) | |
download | frameworks_av-a3ee047fd8e2a63253f70346925c3ffd069dfc99.zip frameworks_av-a3ee047fd8e2a63253f70346925c3ffd069dfc99.tar.gz frameworks_av-a3ee047fd8e2a63253f70346925c3ffd069dfc99.tar.bz2 |
Camera2: Fix uninitialized parameters.
Some parameters were not being set to default values, causing strange
flakiness in any app that wasn't calling setParameters. This includes
many CTS tests.
Bug: 6970468
Change-Id: If91635afc000e23862e7b039292a55349274c5ee
Diffstat (limited to 'services/camera/libcameraservice')
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp index 199e525..05494d3 100644 --- a/services/camera/libcameraservice/camera2/Parameters.cpp +++ b/services/camera/libcameraservice/camera2/Parameters.cpp @@ -271,6 +271,10 @@ status_t Parameters::initialize(const CameraMetadata *info) { jpegRotation); gpsEnabled = false; + gpsCoordinates[0] = 0.0; + gpsCoordinates[1] = 0.0; + gpsCoordinates[2] = 0.0; + gpsTimestamp = 0; gpsProcessingMethod = "unknown"; // GPS fields in CameraParameters are not set by implementation @@ -742,12 +746,14 @@ status_t Parameters::initialize(const CameraMetadata *info) { params.set(CameraParameters::KEY_VIDEO_FRAME_FORMAT, CameraParameters::PIXEL_FORMAT_ANDROID_OPAQUE); + recordingHint = false; params.set(CameraParameters::KEY_RECORDING_HINT, CameraParameters::FALSE); params.set(CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED, CameraParameters::TRUE); + videoStabilization = false; params.set(CameraParameters::KEY_VIDEO_STABILIZATION, CameraParameters::FALSE); @@ -772,10 +778,12 @@ status_t Parameters::initialize(const CameraMetadata *info) { enableFocusMoveMessages = false; afTriggerCounter = 1; currentAfTriggerId = -1; + afInMotion = false; precaptureTriggerCounter = 1; previewCallbackFlags = 0; + previewCallbackOneShot = false; char value[PROPERTY_VALUE_MAX]; property_get("camera.disable_zsl_mode", value, "0"); |