Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02bf0328 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera: Clean up warnings and set -Werror

- Also fix error logging template inconsistency
- Also add a few error handling cases into camera2 NDK
  to deal with previously-ignored error codes

Bug: 27149500
Change-Id: I8f1f4c72252dd48d652f24b595b642199f20c327
parent d56db1d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
	system/media/camera/include \
	frameworks/av/include/camera

LOCAL_CFLAGS += -Werror -Wall -Wextra

LOCAL_MODULE:= libcamera_client

include $(BUILD_SHARED_LIBRARY)
+0 −1
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId,
    ALOGV("%s: connect", __FUNCTION__);
    sp<TCam> c = new TCam(cameraId);
    sp<TCamCallbacks> cl = c;
    status_t status = NO_ERROR;
    const sp<::android::hardware::ICameraService>& cs = getCameraService();

    binder::Status ret;
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ const char *CameraParameters2::getPictureFormat() const

void CameraParameters2::dump() const
{
    ALOGD("dump: mMap.size = %d", mMap.size());
    ALOGD("dump: mMap.size = %zu", mMap.size());
    for (size_t i = 0; i < mMap.size(); i++) {
        String8 k, v;
        k = mMap.keyAt(i);
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ VendorTagDescriptor::~VendorTagDescriptor() {

VendorTagDescriptor::VendorTagDescriptor() :
        mTagCount(0),
        mVendorOps({nullptr}) {
        mVendorOps() {
}

VendorTagDescriptor::VendorTagDescriptor(const VendorTagDescriptor& src) {
+2 −2
Original line number Diff line number Diff line
@@ -80,8 +80,8 @@ status_t OutputConfiguration::readFromParcel(const Parcel* parcel) {
    mRotation = rotation;
    mSurfaceSetID = setID;

    ALOGV("%s: OutputConfiguration: bp = %p, name = %s", __FUNCTION__,
          mGbp.get(), String8(surfaceShim.name).string());
    ALOGV("%s: OutputConfiguration: bp = %p, name = %s, rotation = %d, setId = %d", __FUNCTION__,
            mGbp.get(), String8(surfaceShim.name).string(), mRotation, mSurfaceSetID);

    return err;
}
Loading