summaryrefslogtreecommitdiffstats
path: root/libs/utils/Asset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/utils/Asset.cpp')
-rw-r--r--libs/utils/Asset.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/libs/utils/Asset.cpp b/libs/utils/Asset.cpp
index a18294b..50e701a 100644
--- a/libs/utils/Asset.cpp
+++ b/libs/utils/Asset.cpp
@@ -89,7 +89,7 @@ Asset::Asset(void)
gTail->mNext = this;
gTail = this;
}
- //LOGI("Creating Asset %p #%d\n", this, gCount);
+ //ALOGI("Creating Asset %p #%d\n", this, gCount);
}
Asset::~Asset(void)
@@ -109,7 +109,7 @@ Asset::~Asset(void)
mPrev->mNext = mNext;
}
mNext = mPrev = NULL;
- //LOGI("Destroying Asset in %p #%d\n", this, gCount);
+ //ALOGI("Destroying Asset in %p #%d\n", this, gCount);
}
/*
@@ -210,7 +210,7 @@ Asset::~Asset(void)
offset = ftell(fp);
fclose(fp);
if (!scanResult) {
- LOGD("File '%s' is not in gzip format\n", fileName);
+ ALOGD("File '%s' is not in gzip format\n", fileName);
::close(fd);
return NULL;
}
@@ -327,14 +327,14 @@ off64_t Asset::handleSeek(off64_t offset, int whence, off64_t curPosn, off64_t m
newOffset = maxPosn + offset;
break;
default:
- LOGW("unexpected whence %d\n", whence);
+ ALOGW("unexpected whence %d\n", whence);
// this was happening due to an off64_t size mismatch
assert(false);
return (off64_t) -1;
}
if (newOffset < 0 || newOffset > maxPosn) {
- LOGW("seek out of range: want %ld, end=%ld\n",
+ ALOGW("seek out of range: want %ld, end=%ld\n",
(long) newOffset, (long) maxPosn);
return (off64_t) -1;
}
@@ -384,12 +384,12 @@ status_t _FileAsset::openChunk(const char* fileName, int fd, off64_t offset, siz
fileLength = lseek64(fd, 0, SEEK_END);
if (fileLength == (off64_t) -1) {
// probably a bad file descriptor
- LOGD("failed lseek (errno=%d)\n", errno);
+ ALOGD("failed lseek (errno=%d)\n", errno);
return UNKNOWN_ERROR;
}
if ((off64_t) (offset + length) > fileLength) {
- LOGD("start (%ld) + len (%ld) > end (%ld)\n",
+ ALOGD("start (%ld) + len (%ld) > end (%ld)\n",
(long) offset, (long) length, (long) fileLength);
return BAD_INDEX;
}
@@ -473,7 +473,7 @@ ssize_t _FileAsset::read(void* buf, size_t count)
/* read from the file */
//printf("file read\n");
if (ftell(mFp) != mStart + mOffset) {
- LOGE("Hosed: %ld != %ld+%ld\n",
+ ALOGE("Hosed: %ld != %ld+%ld\n",
ftell(mFp), (long) mStart, (long) mOffset);
assert(false);
}
@@ -581,23 +581,23 @@ const void* _FileAsset::getBuffer(bool wordAligned)
buf = new unsigned char[allocLen];
if (buf == NULL) {
- LOGE("alloc of %ld bytes failed\n", (long) allocLen);
+ ALOGE("alloc of %ld bytes failed\n", (long) allocLen);
return NULL;
}
- LOGV("Asset %p allocating buffer size %d (smaller than threshold)", this, (int)allocLen);
+ ALOGV("Asset %p allocating buffer size %d (smaller than threshold)", this, (int)allocLen);
if (mLength > 0) {
long oldPosn = ftell(mFp);
fseek(mFp, mStart, SEEK_SET);
if (fread(buf, 1, mLength, mFp) != (size_t) mLength) {
- LOGE("failed reading %ld bytes\n", (long) mLength);
+ ALOGE("failed reading %ld bytes\n", (long) mLength);
delete[] buf;
return NULL;
}
fseek(mFp, oldPosn, SEEK_SET);
}
- LOGV(" getBuffer: loaded into buffer\n");
+ ALOGV(" getBuffer: loaded into buffer\n");
mBuf = buf;
return mBuf;
@@ -610,7 +610,7 @@ const void* _FileAsset::getBuffer(bool wordAligned)
return NULL;
}
- LOGV(" getBuffer: mapped\n");
+ ALOGV(" getBuffer: mapped\n");
mMap = map;
if (!wordAligned) {
@@ -648,17 +648,17 @@ const void* _FileAsset::ensureAlignment(FileMap* map)
if ((((size_t)data)&0x3) == 0) {
// We can return this directly if it is aligned on a word
// boundary.
- LOGV("Returning aligned FileAsset %p (%s).", this,
+ ALOGV("Returning aligned FileAsset %p (%s).", this,
getAssetSource());
return data;
}
// If not aligned on a word boundary, then we need to copy it into
// our own buffer.
- LOGV("Copying FileAsset %p (%s) to buffer size %d to make it aligned.", this,
+ ALOGV("Copying FileAsset %p (%s) to buffer size %d to make it aligned.", this,
getAssetSource(), (int)mLength);
unsigned char* buf = new unsigned char[mLength];
if (buf == NULL) {
- LOGE("alloc of %ld bytes failed\n", (long) mLength);
+ ALOGE("alloc of %ld bytes failed\n", (long) mLength);
return NULL;
}
memcpy(buf, data, mLength);
@@ -855,7 +855,7 @@ const void* _CompressedAsset::getBuffer(bool wordAligned)
*/
buf = new unsigned char[mUncompressedLen];
if (buf == NULL) {
- LOGW("alloc %ld bytes failed\n", (long) mUncompressedLen);
+ ALOGW("alloc %ld bytes failed\n", (long) mUncompressedLen);
goto bail;
}