summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-05-12 21:31:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-12 21:31:28 +0000
commit2cba81032e2d671c410eb87eeec202cffc971931 (patch)
tree12b276f811b617e79bc27ed6a57cf34346ed6949
parent71fd9329263fb98d1aa1a1ad5452849119d73f9c (diff)
parent9181b9f4bb53af203c090eff6d1af67d1f7c8770 (diff)
downloadframeworks_av-2cba81032e2d671c410eb87eeec202cffc971931.zip
frameworks_av-2cba81032e2d671c410eb87eeec202cffc971931.tar.gz
frameworks_av-2cba81032e2d671c410eb87eeec202cffc971931.tar.bz2
Merge "Camera: Don't enable log spew by default for eng build"
-rw-r--r--camera/Android.mk5
-rw-r--r--camera/VendorTagDescriptor.cpp7
2 files changed, 4 insertions, 8 deletions
diff --git a/camera/Android.mk b/camera/Android.mk
index 18800b4..5774b6f 100644
--- a/camera/Android.mk
+++ b/camera/Android.mk
@@ -52,11 +52,6 @@ LOCAL_C_INCLUDES += \
system/media/camera/include \
system/media/private/camera/include
-## Enable asserts for 'eng' builds
-ifeq ($(TARGET_BUILD_VARIANT),eng)
-LOCAL_CFLAGS += -UNDEBUG
-endif
-
LOCAL_MODULE:= libcamera_client
include $(BUILD_SHARED_LIBRARY)
diff --git a/camera/VendorTagDescriptor.cpp b/camera/VendorTagDescriptor.cpp
index ba24fcb..59dce91 100644
--- a/camera/VendorTagDescriptor.cpp
+++ b/camera/VendorTagDescriptor.cpp
@@ -120,7 +120,7 @@ status_t VendorTagDescriptor::createDescriptorFromOps(const vendor_tag_ops_t* vO
// Set up tag to section index map
ssize_t index = sections.indexOf(sectionString);
- assert(index >= 0);
+ LOG_ALWAYS_FATAL_IF(index < 0, "index %zd must be non-negative", index);
desc->mTagToSectionMap.add(tag, static_cast<uint32_t>(index));
// Set up reverse mapping
@@ -217,7 +217,8 @@ status_t VendorTagDescriptor::createFromParcel(const Parcel* parcel,
__FUNCTION__, sectionCount, (maxSectionIndex + 1));
return BAD_VALUE;
}
- assert(desc->mSections.setCapacity(sectionCount) > 0);
+ LOG_ALWAYS_FATAL_IF(desc->mSections.setCapacity(sectionCount) <= 0,
+ "Vector capacity must be positive");
for (size_t i = 0; i < sectionCount; ++i) {
String8 sectionName = parcel->readString8();
if (sectionName.isEmpty()) {
@@ -228,7 +229,7 @@ status_t VendorTagDescriptor::createFromParcel(const Parcel* parcel,
}
}
- assert(tagCount == allTags.size());
+ LOG_ALWAYS_FATAL_IF(tagCount != allTags.size(), "tagCount must be the same as allTags size");
// Set up reverse mapping
for (size_t i = 0; i < static_cast<size_t>(tagCount); ++i) {
uint32_t tag = allTags[i];