diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2014-11-21 17:55:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-21 17:55:13 +0000 |
commit | 6b6d8a79ef821541a7687ed924959369f73fc977 (patch) | |
tree | 1678ee92f9ee7e1f9c87498852c45a567c7c9122 | |
parent | 2fd47f8cfe314dd9d01f401408b70ad8d443518b (diff) | |
parent | ffa3e71e47215b68fe4ae0b7a3f976db648d63d3 (diff) | |
download | frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.zip frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.tar.gz frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.tar.bz2 |
am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev
* commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3':
Camera2: Fix CameraParameters parse segfault.
-rw-r--r-- | camera/CameraParameters.cpp | 5 | ||||
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 25d632d..e5e4e90 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -488,6 +488,11 @@ void CameraParameters::getSupportedPreviewFormats(Vector<int>& formats) const { const char* supportedPreviewFormats = get(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS); + if (supportedPreviewFormats == NULL) { + ALOGW("%s: No supported preview formats.", __FUNCTION__); + return; + } + String8 fmtStr(supportedPreviewFormats); char* prevFmts = fmtStr.lockBuffer(fmtStr.size()); diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 4229538..1232c32 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -850,6 +850,7 @@ status_t CameraService::connectFinishUnsafe(const sp<BasicClient>& client, const sp<IBinder>& remoteCallback) { status_t status = client->initialize(mModule); if (status != OK) { + ALOGE("%s: Could not initialize client from HAL module.", __FUNCTION__); return status; } if (remoteCallback != NULL) { |