From 2204f0bf56af53b588a01701b8cf9cd05b1b3ff9 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 21 Oct 2014 23:04:54 -0700 Subject: Frameworks/base: Wall Werror in libs/androidfw Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor some code. Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd --- libs/androidfw/Asset.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libs/androidfw/Asset.cpp') diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp index 589211fa60b8..4b3382e4fc5d 100644 --- a/libs/androidfw/Asset.cpp +++ b/libs/androidfw/Asset.cpp @@ -45,6 +45,8 @@ using namespace android; # define O_BINARY 0 #endif +static const bool kIsDebug = false; + static Mutex gAssetLock; static int32_t gCount = 0; static Asset* gHead = NULL; @@ -89,7 +91,9 @@ Asset::Asset(void) gTail->mNext = this; gTail = this; } - //ALOGI("Creating Asset %p #%d\n", this, gCount); + if (kIsDebug) { + ALOGI("Creating Asset %p #%d\n", this, gCount); + } } Asset::~Asset(void) @@ -109,7 +113,9 @@ Asset::~Asset(void) mPrev->mNext = mNext; } mNext = mPrev = NULL; - //ALOGI("Destroying Asset in %p #%d\n", this, gCount); + if (kIsDebug) { + ALOGI("Destroying Asset in %p #%d\n", this, gCount); + } } /* -- cgit v1.2.3-59-g8ed1b