diff options
| author | Andreas Gampe <agampe@google.com> | 2014-11-07 15:03:46 -0800 |
|---|---|---|
| committer | Andreas Gampe <agampe@google.com> | 2014-11-07 15:14:02 -0800 |
| commit | dc9c109af815100d497184e6dadebceed7f3bf1d (patch) | |
| tree | 51bb2aa4ff78b0ebcdbe1cc474c76dd2d38d7a37 /libs/androidfw/AssetManager.cpp | |
| parent | 9a0aa553ad9f6657cbbf0a182566c481e191e6b7 (diff) | |
| parent | 487ae9b8dc3e08c1a830d519a801a07cd59c8f2b (diff) | |
| download | frameworks_base-dc9c109af815100d497184e6dadebceed7f3bf1d.zip frameworks_base-dc9c109af815100d497184e6dadebceed7f3bf1d.tar.gz frameworks_base-dc9c109af815100d497184e6dadebceed7f3bf1d.tar.bz2 | |
resolved conflicts for merge of 487ae9b8 to lmp-mr1-dev-plus-aosp
Change-Id: I395f184d885a7ef30aa113ab01fcaacc94243008
Diffstat (limited to 'libs/androidfw/AssetManager.cpp')
| -rw-r--r-- | libs/androidfw/AssetManager.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp index de6a33c..e5c5b10 100644 --- a/libs/androidfw/AssetManager.cpp +++ b/libs/androidfw/AssetManager.cpp @@ -64,6 +64,8 @@ using namespace android; +static const bool kIsDebug = false; + /* * Names for default app, locale, and vendor. We might want to change * these to be an actual locale, e.g. always use en-US as the default. @@ -152,15 +154,19 @@ AssetManager::AssetManager(CacheMode cacheMode) mResources(NULL), mConfig(new ResTable_config), mCacheMode(cacheMode), mCacheValid(false) { - int count = android_atomic_inc(&gCount)+1; - //ALOGI("Creating AssetManager %p #%d\n", this, count); + int count = android_atomic_inc(&gCount) + 1; + if (kIsDebug) { + ALOGI("Creating AssetManager %p #%d\n", this, count); + } memset(mConfig, 0, sizeof(ResTable_config)); } AssetManager::~AssetManager(void) { int count = android_atomic_dec(&gCount); - //ALOGI("Destroying AssetManager in %p #%d\n", this, count); + if (kIsDebug) { + ALOGI("Destroying AssetManager in %p #%d\n", this, count); + } delete mConfig; delete mResources; @@ -1864,7 +1870,9 @@ AssetManager::SharedZip::SharedZip(const String8& path, time_t modWhen) : mPath(path), mZipFile(NULL), mModWhen(modWhen), mResourceTableAsset(NULL), mResourceTable(NULL) { - //ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath); + if (kIsDebug) { + ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath); + } ALOGV("+++ opening zip '%s'\n", mPath.string()); mZipFile = ZipFileRO::open(mPath.string()); if (mZipFile == NULL) { @@ -1958,7 +1966,9 @@ bool AssetManager::SharedZip::getOverlay(size_t idx, asset_path* out) const AssetManager::SharedZip::~SharedZip() { - //ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath); + if (kIsDebug) { + ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath); + } if (mResourceTable != NULL) { delete mResourceTable; } |
