Frameworks/base: Wall Werror in libs/androidfw

Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor
some code.

Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp
index 589211f..4b3382e 100644
--- a/libs/androidfw/Asset.cpp
+++ b/libs/androidfw/Asset.cpp
@@ -45,6 +45,8 @@
 # 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 @@
         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 @@
         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);
+    }
 }
 
 /*