From b8dc7bc582ee4acd9d6c1379701a002c5ddbe323 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 1 Oct 2014 19:07:51 -0700 Subject: Frameworks/base: Fix more aapt issues Change-Id: I6da7dc674e9f9e3b0886a3cfd1e3194d6b5ac948 --- tools/aapt/Command.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tools/aapt/Command.cpp') diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index f8633112c018..7e7d3465bbbc 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -196,11 +196,16 @@ int doList(Bundle* bundle) goto bail; } - const ResTable& res = assets.getResources(false); -#ifndef HAVE_ANDROID_OS - printf("\nResource table:\n"); - res.print(false); +#ifdef HAVE_ANDROID_OS + static const bool kHaveAndroidOs = true; +#else + static const bool kHaveAndroidOs = false; #endif + const ResTable& res = assets.getResources(false); + if (!kHaveAndroidOs) { + printf("\nResource table:\n"); + res.print(false); + } Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml", Asset::ACCESS_BUFFER); -- cgit v1.2.3-59-g8ed1b