am 9fc057aa: am 2a1d1917: Merge "docs: move USB installation info into the OEM USB Drivers document because the Google USB Driver is deprecated, so consolidating the USB info makes more sense for the common case of needing an OEM driver A few changes to the device set
* commit '9fc057aab4f08e5a40de665549f48bece0c7bd63':
diff --git a/cmds/keystore/keystore.cpp b/cmds/keystore/keystore.cpp
index 4b4b9b9..05f77e5 100644
--- a/cmds/keystore/keystore.cpp
+++ b/cmds/keystore/keystore.cpp
@@ -133,7 +133,7 @@
const char* randomDevice = "/dev/urandom";
mRandom = ::open(randomDevice, O_RDONLY);
if (mRandom == -1) {
- LOGE("open: %s: %s", randomDevice, strerror(errno));
+ ALOGE("open: %s: %s", randomDevice, strerror(errno));
return false;
}
return true;
@@ -754,11 +754,11 @@
int main(int argc, char* argv[]) {
int controlSocket = android_get_control_socket("keystore");
if (argc < 2) {
- LOGE("A directory must be specified!");
+ ALOGE("A directory must be specified!");
return 1;
}
if (chdir(argv[1]) == -1) {
- LOGE("chdir: %s: %s", argv[1], strerror(errno));
+ ALOGE("chdir: %s: %s", argv[1], strerror(errno));
return 1;
}
@@ -767,7 +767,7 @@
return 1;
}
if (listen(controlSocket, 3) == -1) {
- LOGE("listen: %s", strerror(errno));
+ ALOGE("listen: %s", strerror(errno));
return 1;
}
@@ -785,7 +785,7 @@
socklen_t size = sizeof(cred);
int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size);
if (credResult != 0) {
- LOGW("getsockopt: %s", strerror(errno));
+ ALOGW("getsockopt: %s", strerror(errno));
} else {
int8_t request;
if (recv_code(sock, &request)) {
@@ -796,7 +796,7 @@
} else {
send_code(sock, response);
}
- LOGI("uid: %d action: %c -> %d state: %d -> %d retry: %d",
+ ALOGI("uid: %d action: %c -> %d state: %d -> %d retry: %d",
cred.uid,
request, response,
old_state, keyStore.getState(),
@@ -805,6 +805,6 @@
}
close(sock);
}
- LOGE("accept: %s", strerror(errno));
+ ALOGE("accept: %s", strerror(errno));
return 1;
}
diff --git a/include/binder/CursorWindow.h b/include/binder/CursorWindow.h
index f0284de..8a2979a 100644
--- a/include/binder/CursorWindow.h
+++ b/include/binder/CursorWindow.h
@@ -31,8 +31,8 @@
#else
-#define IF_LOG_WINDOW() IF_LOG(LOG_DEBUG, "CursorWindow")
-#define LOG_WINDOW(...) LOG(LOG_DEBUG, "CursorWindow", __VA_ARGS__)
+#define IF_LOG_WINDOW() IF_ALOG(LOG_DEBUG, "CursorWindow")
+#define LOG_WINDOW(...) ALOG(LOG_DEBUG, "CursorWindow", __VA_ARGS__)
#endif
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index 612ff93..71e5324 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -1277,7 +1277,7 @@
myDelta += requested->screenHeightDp - screenHeightDp;
otherDelta += requested->screenHeightDp - o.screenHeightDp;
}
- //LOGI("Comparing this %dx%d to other %dx%d in %dx%d: myDelta=%d otherDelta=%d",
+ //ALOGI("Comparing this %dx%d to other %dx%d in %dx%d: myDelta=%d otherDelta=%d",
// screenWidthDp, screenHeightDp, o.screenWidthDp, o.screenHeightDp,
// requested->screenWidthDp, requested->screenHeightDp, myDelta, otherDelta);
return (myDelta <= otherDelta);
@@ -1506,11 +1506,11 @@
}
if (screenSizeDp != 0) {
if (screenWidthDp != 0 && screenWidthDp > settings.screenWidthDp) {
- //LOGI("Filtering out width %d in requested %d", screenWidthDp, settings.screenWidthDp);
+ //ALOGI("Filtering out width %d in requested %d", screenWidthDp, settings.screenWidthDp);
return false;
}
if (screenHeightDp != 0 && screenHeightDp > settings.screenHeightDp) {
- //LOGI("Filtering out height %d in requested %d", screenHeightDp, settings.screenHeightDp);
+ //ALOGI("Filtering out height %d in requested %d", screenHeightDp, settings.screenHeightDp);
return false;
}
}
@@ -1530,9 +1530,9 @@
// For compatibility, we count a request for KEYSHIDDEN_NO as also
// matching the more recent KEYSHIDDEN_SOFT. Basically
// KEYSHIDDEN_NO means there is some kind of keyboard available.
- //LOGI("Matching keysHidden: have=%d, config=%d\n", keysHidden, setKeysHidden);
+ //ALOGI("Matching keysHidden: have=%d, config=%d\n", keysHidden, setKeysHidden);
if (keysHidden != KEYSHIDDEN_NO || setKeysHidden != KEYSHIDDEN_SOFT) {
- //LOGI("No match!");
+ //ALOGI("No match!");
return false;
}
}
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 9945f91..e20d8a3 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -89,7 +89,7 @@
// This is a local static rather than a global static,
// to avoid static initializer ordering issues.
static String16 sEmptyDescriptor;
- LOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this);
+ ALOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this);
return sEmptyDescriptor;
}
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index 5de87ec..47a62db 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -24,8 +24,8 @@
#include <stdio.h>
-//#undef LOGV
-//#define LOGV(...) fprintf(stderr, __VA_ARGS__)
+//#undef ALOGV
+//#define ALOGV(...) fprintf(stderr, __VA_ARGS__)
namespace android {
@@ -50,7 +50,7 @@
e.func = func;
if (mObjects.indexOfKey(objectID) >= 0) {
- LOGE("Trying to attach object ID %p to binder ObjectManager %p with object %p, but object ID already in use",
+ ALOGE("Trying to attach object ID %p to binder ObjectManager %p with object %p, but object ID already in use",
objectID, this, object);
return;
}
@@ -73,7 +73,7 @@
void BpBinder::ObjectManager::kill()
{
const size_t N = mObjects.size();
- LOGV("Killing %d objects in manager %p", N, this);
+ ALOGV("Killing %d objects in manager %p", N, this);
for (size_t i=0; i<N; i++) {
const entry_t& e = mObjects.valueAt(i);
if (e.func != NULL) {
@@ -92,7 +92,7 @@
, mObitsSent(0)
, mObituaries(NULL)
{
- LOGV("Creating BpBinder %p handle %d\n", this, mHandle);
+ ALOGV("Creating BpBinder %p handle %d\n", this, mHandle);
extendObjectLifetime(OBJECT_LIFETIME_WEAK);
IPCThreadState::self()->incWeakHandle(handle);
@@ -190,7 +190,7 @@
if (!mObituaries) {
return NO_MEMORY;
}
- LOGV("Requesting death notification: %p handle %d\n", this, mHandle);
+ ALOGV("Requesting death notification: %p handle %d\n", this, mHandle);
getWeakRefs()->incWeak(this);
IPCThreadState* self = IPCThreadState::self();
self->requestDeathNotification(mHandle, this);
@@ -226,7 +226,7 @@
}
mObituaries->removeAt(i);
if (mObituaries->size() == 0) {
- LOGV("Clearing death notification: %p handle %d\n", this, mHandle);
+ ALOGV("Clearing death notification: %p handle %d\n", this, mHandle);
IPCThreadState* self = IPCThreadState::self();
self->clearDeathNotification(mHandle, this);
self->flushCommands();
@@ -242,7 +242,7 @@
void BpBinder::sendObituary()
{
- LOGV("Sending obituary for proxy %p handle %d, mObitsSent=%s\n",
+ ALOGV("Sending obituary for proxy %p handle %d, mObitsSent=%s\n",
this, mHandle, mObitsSent ? "true" : "false");
mAlive = 0;
@@ -251,7 +251,7 @@
mLock.lock();
Vector<Obituary>* obits = mObituaries;
if(obits != NULL) {
- LOGV("Clearing sent death notification: %p handle %d\n", this, mHandle);
+ ALOGV("Clearing sent death notification: %p handle %d\n", this, mHandle);
IPCThreadState* self = IPCThreadState::self();
self->clearDeathNotification(mHandle, this);
self->flushCommands();
@@ -260,7 +260,7 @@
mObitsSent = 1;
mLock.unlock();
- LOGV("Reporting death of proxy %p for %d recipients\n",
+ ALOGV("Reporting death of proxy %p for %d recipients\n",
this, obits ? obits->size() : 0);
if (obits != NULL) {
@@ -276,7 +276,7 @@
void BpBinder::reportOneDeath(const Obituary& obit)
{
sp<DeathRecipient> recipient = obit.recipient.promote();
- LOGV("Reporting death to recipient: %p\n", recipient.get());
+ ALOGV("Reporting death to recipient: %p\n", recipient.get());
if (recipient == NULL) return;
recipient->binderDied(this);
@@ -288,7 +288,7 @@
object_cleanup_func func)
{
AutoMutex _l(mLock);
- LOGV("Attaching object %p to binder %p (manager=%p)", object, this, &mObjects);
+ ALOGV("Attaching object %p to binder %p (manager=%p)", object, this, &mObjects);
mObjects.attach(objectID, object, cleanupCookie, func);
}
@@ -311,7 +311,7 @@
BpBinder::~BpBinder()
{
- LOGV("Destroying BpBinder %p handle %d\n", this, mHandle);
+ ALOGV("Destroying BpBinder %p handle %d\n", this, mHandle);
IPCThreadState* ipc = IPCThreadState::self();
@@ -338,15 +338,15 @@
void BpBinder::onFirstRef()
{
- LOGV("onFirstRef BpBinder %p handle %d\n", this, mHandle);
+ ALOGV("onFirstRef BpBinder %p handle %d\n", this, mHandle);
IPCThreadState* ipc = IPCThreadState::self();
if (ipc) ipc->incStrongHandle(mHandle);
}
void BpBinder::onLastStrongRef(const void* id)
{
- LOGV("onLastStrongRef BpBinder %p handle %d\n", this, mHandle);
- IF_LOGV() {
+ ALOGV("onLastStrongRef BpBinder %p handle %d\n", this, mHandle);
+ IF_ALOGV() {
printRefs();
}
IPCThreadState* ipc = IPCThreadState::self();
@@ -355,7 +355,7 @@
bool BpBinder::onIncStrongAttempted(uint32_t flags, const void* id)
{
- LOGV("onIncStrongAttempted BpBinder %p handle %d\n", this, mHandle);
+ ALOGV("onIncStrongAttempted BpBinder %p handle %d\n", this, mHandle);
IPCThreadState* ipc = IPCThreadState::self();
return ipc ? ipc->attemptIncStrongHandle(mHandle) == NO_ERROR : false;
}
diff --git a/libs/binder/CursorWindow.cpp b/libs/binder/CursorWindow.cpp
index 0733378..a6e5f71 100644
--- a/libs/binder/CursorWindow.cpp
+++ b/libs/binder/CursorWindow.cpp
@@ -150,7 +150,7 @@
uint32_t cur = mHeader->numColumns;
if ((cur > 0 || mHeader->numRows > 0) && cur != numColumns) {
- LOGE("Trying to go from %d columns to %d", cur, numColumns);
+ ALOGE("Trying to go from %d columns to %d", cur, numColumns);
return INVALID_OPERATION;
}
mHeader->numColumns = numColumns;
@@ -209,7 +209,7 @@
uint32_t offset = mHeader->freeOffset + padding;
uint32_t nextFreeOffset = offset + size;
if (nextFreeOffset > mSize) {
- LOGW("Window is full: requested allocation %d bytes, "
+ ALOGW("Window is full: requested allocation %d bytes, "
"free space %d bytes, window size %d bytes",
size, freeSpace(), mSize);
return 0;
@@ -255,14 +255,14 @@
CursorWindow::FieldSlot* CursorWindow::getFieldSlot(uint32_t row, uint32_t column) {
if (row >= mHeader->numRows || column >= mHeader->numColumns) {
- LOGE("Failed to read row %d, column %d from a CursorWindow which "
+ ALOGE("Failed to read row %d, column %d from a CursorWindow which "
"has %d rows, %d columns.",
row, column, mHeader->numRows, mHeader->numColumns);
return NULL;
}
RowSlot* rowSlot = getRowSlot(row);
if (!rowSlot) {
- LOGE("Failed to find rowSlot for row %d.", row);
+ ALOGE("Failed to find rowSlot for row %d.", row);
return NULL;
}
FieldSlot* fieldDir = static_cast<FieldSlot*>(offsetToPtr(rowSlot->offset));
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp
index 1ace8f8..cd2451a 100644
--- a/libs/binder/IMemory.cpp
+++ b/libs/binder/IMemory.cpp
@@ -244,7 +244,7 @@
sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
if (VERBOSE) {
- LOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
+ ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
binder.get(), this, mSize, mHeapId);
CallStack stack;
stack.update();
@@ -298,11 +298,11 @@
uint32_t flags = reply.readInt32();
uint32_t offset = reply.readInt32();
- LOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
asBinder().get(), parcel_fd, size, err, strerror(-err));
int fd = dup( parcel_fd );
- LOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
parcel_fd, size, err, strerror(errno));
int access = PROT_READ;
@@ -315,7 +315,7 @@
mRealHeap = true;
mBase = mmap(0, size, access, MAP_SHARED, fd, offset);
if (mBase == MAP_FAILED) {
- LOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
+ ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
asBinder().get(), size, fd, strerror(errno));
close(fd);
} else {
@@ -393,7 +393,7 @@
void HeapCache::binderDied(const wp<IBinder>& binder)
{
- //LOGD("binderDied binder=%p", binder.unsafe_get());
+ //ALOGD("binderDied binder=%p", binder.unsafe_get());
free_heap(binder);
}
@@ -403,7 +403,7 @@
ssize_t i = mHeapCache.indexOfKey(binder);
if (i>=0) {
heap_info_t& info = mHeapCache.editValueAt(i);
- LOGD_IF(VERBOSE,
+ ALOGD_IF(VERBOSE,
"found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
binder.get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
@@ -415,7 +415,7 @@
heap_info_t info;
info.heap = interface_cast<IMemoryHeap>(binder);
info.count = 1;
- //LOGD("adding binder=%p, heap=%p, count=%d",
+ //ALOGD("adding binder=%p, heap=%p, count=%d",
// binder.get(), info.heap.get(), info.count);
mHeapCache.add(binder, info);
return info.heap;
@@ -436,7 +436,7 @@
heap_info_t& info(mHeapCache.editValueAt(i));
int32_t c = android_atomic_dec(&info.count);
if (c == 1) {
- LOGD_IF(VERBOSE,
+ ALOGD_IF(VERBOSE,
"removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
binder.unsafe_get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
@@ -446,7 +446,7 @@
mHeapCache.removeItemsAt(i);
}
} else {
- LOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
+ ALOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
}
}
}
@@ -468,7 +468,7 @@
for (int i=0 ; i<c ; i++) {
const heap_info_t& info = mHeapCache.valueAt(i);
BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
- LOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
+ ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
mHeapCache.keyAt(i).unsafe_get(),
info.heap.get(), info.count,
h->mHeapId, h->mBase, h->mSize);
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 5d34787..629b899 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -56,12 +56,12 @@
#else
-#define IF_LOG_TRANSACTIONS() IF_LOG(LOG_VERBOSE, "transact")
-#define IF_LOG_COMMANDS() IF_LOG(LOG_VERBOSE, "ipc")
-#define LOG_REMOTEREFS(...) LOG(LOG_DEBUG, "remoterefs", __VA_ARGS__)
-#define IF_LOG_REMOTEREFS() IF_LOG(LOG_DEBUG, "remoterefs")
-#define LOG_THREADPOOL(...) LOG(LOG_DEBUG, "threadpool", __VA_ARGS__)
-#define LOG_ONEWAY(...) LOG(LOG_DEBUG, "ipc", __VA_ARGS__)
+#define IF_LOG_TRANSACTIONS() IF_ALOG(LOG_VERBOSE, "transact")
+#define IF_LOG_COMMANDS() IF_ALOG(LOG_VERBOSE, "ipc")
+#define LOG_REMOTEREFS(...) ALOG(LOG_DEBUG, "remoterefs", __VA_ARGS__)
+#define IF_LOG_REMOTEREFS() IF_ALOG(LOG_DEBUG, "remoterefs")
+#define LOG_THREADPOOL(...) ALOG(LOG_DEBUG, "threadpool", __VA_ARGS__)
+#define LOG_ONEWAY(...) ALOG(LOG_DEBUG, "ipc", __VA_ARGS__)
#endif
@@ -493,7 +493,7 @@
void IPCThreadState::stopProcess(bool immediate)
{
- //LOGI("**** STOPPING PROCESS");
+ //ALOGI("**** STOPPING PROCESS");
flushCommands();
int fd = mProcess->mDriverFD;
mProcess->mDriverFD = -1;
@@ -530,9 +530,9 @@
if ((flags & TF_ONE_WAY) == 0) {
#if 0
if (code == 4) { // relayout
- LOGI(">>>>>> CALLING transaction 4");
+ ALOGI(">>>>>> CALLING transaction 4");
} else {
- LOGI(">>>>>> CALLING transaction %d", code);
+ ALOGI(">>>>>> CALLING transaction %d", code);
}
#endif
if (reply) {
@@ -543,9 +543,9 @@
}
#if 0
if (code == 4) { // relayout
- LOGI("<<<<<< RETURNING transaction 4");
+ ALOGI("<<<<<< RETURNING transaction 4");
} else {
- LOGI("<<<<<< RETURNING transaction %d", code);
+ ALOGI("<<<<<< RETURNING transaction %d", code);
}
#endif
@@ -692,7 +692,7 @@
case BR_ACQUIRE_RESULT:
{
- LOG_ASSERT(acquireResult != NULL, "Unexpected brACQUIRE_RESULT");
+ ALOG_ASSERT(acquireResult != NULL, "Unexpected brACQUIRE_RESULT");
const int32_t result = mIn.readInt32();
if (!acquireResult) continue;
*acquireResult = result ? NO_ERROR : INVALID_OPERATION;
@@ -703,7 +703,7 @@
{
binder_transaction_data tr;
err = mIn.read(&tr, sizeof(tr));
- LOG_ASSERT(err == NO_ERROR, "Not enough command data for brREPLY");
+ ALOG_ASSERT(err == NO_ERROR, "Not enough command data for brREPLY");
if (err != NO_ERROR) goto finish;
if (reply) {
@@ -752,7 +752,7 @@
status_t IPCThreadState::talkWithDriver(bool doReceive)
{
- LOG_ASSERT(mProcess->mDriverFD >= 0, "Binder driver is not opened");
+ ALOG_ASSERT(mProcess->mDriverFD >= 0, "Binder driver is not opened");
binder_write_read bwr;
@@ -905,7 +905,7 @@
case BR_ACQUIRE:
refs = (RefBase::weakref_type*)mIn.readInt32();
obj = (BBinder*)mIn.readInt32();
- LOG_ASSERT(refs->refBase() == obj,
+ ALOG_ASSERT(refs->refBase() == obj,
"BR_ACQUIRE: object %p does not match cookie %p (expected %p)",
refs, obj, refs->refBase());
obj->incStrong(mProcess.get());
@@ -921,7 +921,7 @@
case BR_RELEASE:
refs = (RefBase::weakref_type*)mIn.readInt32();
obj = (BBinder*)mIn.readInt32();
- LOG_ASSERT(refs->refBase() == obj,
+ ALOG_ASSERT(refs->refBase() == obj,
"BR_RELEASE: object %p does not match cookie %p (expected %p)",
refs, obj, refs->refBase());
IF_LOG_REMOTEREFS() {
@@ -946,7 +946,7 @@
// NOTE: This assertion is not valid, because the object may no
// longer exist (thus the (BBinder*)cast above resulting in a different
// memory address).
- //LOG_ASSERT(refs->refBase() == obj,
+ //ALOG_ASSERT(refs->refBase() == obj,
// "BR_DECREFS: object %p does not match cookie %p (expected %p)",
// refs, obj, refs->refBase());
mPendingWeakDerefs.push(refs);
@@ -958,7 +958,7 @@
{
const bool success = refs->attemptIncStrong(mProcess.get());
- LOG_ASSERT(success && refs->refBase() == obj,
+ ALOG_ASSERT(success && refs->refBase() == obj,
"BR_ATTEMPT_ACQUIRE: object %p does not match cookie %p (expected %p)",
refs, obj, refs->refBase());
@@ -971,7 +971,7 @@
{
binder_transaction_data tr;
result = mIn.read(&tr, sizeof(tr));
- LOG_ASSERT(result == NO_ERROR,
+ ALOG_ASSERT(result == NO_ERROR,
"Not enough command data for brTRANSACTION");
if (result != NO_ERROR) break;
@@ -1009,7 +1009,7 @@
}
}
- //LOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
+ //ALOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
Parcel reply;
IF_LOG_TRANSACTIONS() {
@@ -1033,7 +1033,7 @@
if (error < NO_ERROR) reply.setError(error);
}
- //LOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
+ //ALOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
// mCallingPid, origPid, origUid);
if ((tr.flags & TF_ONE_WAY) == 0) {
@@ -1110,11 +1110,11 @@
const size_t* objects, size_t objectsSize,
void* cookie)
{
- //LOGI("Freeing parcel %p", &parcel);
+ //ALOGI("Freeing parcel %p", &parcel);
IF_LOG_COMMANDS() {
alog << "Writing BC_FREE_BUFFER for " << data << endl;
}
- LOG_ASSERT(data != NULL, "Called with NULL data");
+ ALOG_ASSERT(data != NULL, "Called with NULL data");
if (parcel != NULL) parcel->closeFileDescriptors();
IPCThreadState* state = self();
state->mOut.writeInt32(BC_FREE_BUFFER);
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 1fa4c35..33b305d 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -78,7 +78,7 @@
bool res = pc->checkPermission(permission, pid, uid);
if (res) {
if (startTime != 0) {
- LOGI("Check passed after %d seconds for %s from uid=%d pid=%d",
+ ALOGI("Check passed after %d seconds for %s from uid=%d pid=%d",
(int)((uptimeMillis()-startTime)/1000),
String8(permission).string(), uid, pid);
}
@@ -87,7 +87,7 @@
// Is this a permission failure, or did the controller go away?
if (pc->asBinder()->isBinderAlive()) {
- LOGW("Permission failure: %s from uid=%d pid=%d",
+ ALOGW("Permission failure: %s from uid=%d pid=%d",
String8(permission).string(), uid, pid);
return false;
}
@@ -106,7 +106,7 @@
// Wait for the permission controller to come back...
if (startTime == 0) {
startTime = uptimeMillis();
- LOGI("Waiting to check permission %s from uid=%d pid=%d",
+ ALOGI("Waiting to check permission %s from uid=%d pid=%d",
String8(permission).string(), uid, pid);
}
sleep(1);
@@ -136,7 +136,7 @@
for (n = 0; n < 5; n++){
sp<IBinder> svc = checkService(name);
if (svc != NULL) return svc;
- LOGI("Waiting for service %s...\n", String8(name).string());
+ ALOGI("Waiting for service %s...\n", String8(name).string());
sleep(1);
}
return NULL;
diff --git a/libs/binder/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp
index 18669f7..ff5e6bd 100644
--- a/libs/binder/MemoryDealer.cpp
+++ b/libs/binder/MemoryDealer.cpp
@@ -211,7 +211,7 @@
#ifdef MADV_REMOVE
if (size) {
int err = madvise(start_ptr, size, MADV_REMOVE);
- LOGW_IF(err, "madvise(%p, %u, MADV_REMOVE) returned %s",
+ ALOGW_IF(err, "madvise(%p, %u, MADV_REMOVE) returned %s",
start_ptr, size, err<0 ? strerror(errno) : "Ok");
}
#endif
@@ -344,7 +344,7 @@
mList.insertBefore(free_chunk, split);
}
- LOGE_IF((flags&PAGE_ALIGNED) &&
+ ALOGE_IF((flags&PAGE_ALIGNED) &&
((free_chunk->start*kMemoryAlign)&(pagesize-1)),
"PAGE_ALIGNED requested, but page is not aligned!!!");
@@ -411,7 +411,7 @@
{
String8 result;
dump_l(result, what);
- LOGD("%s", result.string());
+ ALOGD("%s", result.string());
}
void SimpleBestFitAllocator::dump(String8& result,
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp
index bf4a73f..d1cbf1c 100644
--- a/libs/binder/MemoryHeapBase.cpp
+++ b/libs/binder/MemoryHeapBase.cpp
@@ -53,7 +53,7 @@
const size_t pagesize = getpagesize();
size = ((size + pagesize-1) & ~(pagesize-1));
int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size);
- LOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
+ ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
if (fd >= 0) {
if (mapfd(fd, size) == NO_ERROR) {
if (flags & READ_ONLY) {
@@ -72,7 +72,7 @@
open_flags |= O_SYNC;
int fd = open(device, open_flags);
- LOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
+ ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
if (fd >= 0) {
const size_t pagesize = getpagesize();
size = ((size + pagesize-1) & ~(pagesize-1));
@@ -127,12 +127,12 @@
void* base = (uint8_t*)mmap(0, size,
PROT_READ|PROT_WRITE, MAP_SHARED, fd, offset);
if (base == MAP_FAILED) {
- LOGE("mmap(fd=%d, size=%u) failed (%s)",
+ ALOGE("mmap(fd=%d, size=%u) failed (%s)",
fd, uint32_t(size), strerror(errno));
close(fd);
return -errno;
}
- //LOGD("mmap(fd=%d, base=%p, size=%lu)", fd, base, size);
+ //ALOGD("mmap(fd=%d, base=%p, size=%lu)", fd, base, size);
mBase = base;
mNeedUnmap = true;
} else {
@@ -155,7 +155,7 @@
int fd = android_atomic_or(-1, &mFD);
if (fd >= 0) {
if (mNeedUnmap) {
- //LOGD("munmap(fd=%d, base=%p, size=%lu)", fd, mBase, mSize);
+ //ALOGD("munmap(fd=%d, base=%p, size=%lu)", fd, mBase, mSize);
munmap(mBase, mSize);
}
mBase = 0;
diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp
index 03322ea..66bcf4d 100644
--- a/libs/binder/MemoryHeapPmem.cpp
+++ b/libs/binder/MemoryHeapPmem.cpp
@@ -79,7 +79,7 @@
int our_fd = heap->heapID();
struct pmem_region sub = { offset, size };
int err = ioctl(our_fd, PMEM_MAP, &sub);
- LOGE_IF(err<0, "PMEM_MAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
}
@@ -115,7 +115,7 @@
sub.offset = mOffset;
sub.len = mSize;
int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- LOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
mSize = 0;
@@ -133,11 +133,11 @@
#ifdef HAVE_ANDROID_OS
if (device) {
int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0));
- LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
+ ALOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
if (fd >= 0) {
int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
if (err < 0) {
- LOGE("PMEM_CONNECT failed (%s), mFD=%d, sub-fd=%d",
+ ALOGE("PMEM_CONNECT failed (%s), mFD=%d, sub-fd=%d",
strerror(errno), fd, pmemHeap->heapID());
close(fd);
} else {
@@ -194,7 +194,7 @@
int our_fd = getHeapID();
struct pmem_region sub = { 0, size };
int err = ioctl(our_fd, PMEM_MAP, &sub);
- LOGE_IF(err<0, "PMEM_MAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
return -errno;
@@ -212,7 +212,7 @@
int our_fd = getHeapID();
struct pmem_region sub = { 0, size };
int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- LOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
return -errno;
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 6b4c1a6..3400e97 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -44,7 +44,7 @@
#endif
#define LOG_REFS(...)
-//#define LOG_REFS(...) LOG(LOG_DEBUG, "Parcel", __VA_ARGS__)
+//#define LOG_REFS(...) ALOG(LOG_DEBUG, "Parcel", __VA_ARGS__)
// ---------------------------------------------------------------------------
@@ -103,7 +103,7 @@
}
}
- LOGD("Invalid object type 0x%08lx", obj.type);
+ ALOGD("Invalid object type 0x%08lx", obj.type);
}
void release_object(const sp<ProcessState>& proc,
@@ -139,7 +139,7 @@
}
}
- LOGE("Invalid object type 0x%08lx", obj.type);
+ ALOGE("Invalid object type 0x%08lx", obj.type);
}
inline static status_t finish_flatten_binder(
@@ -159,7 +159,7 @@
if (!local) {
BpBinder *proxy = binder->remoteBinder();
if (proxy == NULL) {
- LOGE("null proxy");
+ ALOGE("null proxy");
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_HANDLE;
@@ -192,7 +192,7 @@
if (!local) {
BpBinder *proxy = real->remoteBinder();
if (proxy == NULL) {
- LOGE("null proxy");
+ ALOGE("null proxy");
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_WEAK_HANDLE;
@@ -213,7 +213,7 @@
// The OpenBinder implementation uses a dynamic_cast<> here,
// but we can't do that with the different reference counting
// implementation we are using.
- LOGE("Unable to unflatten Binder weak reference!");
+ ALOGE("Unable to unflatten Binder weak reference!");
obj.type = BINDER_TYPE_BINDER;
obj.binder = NULL;
obj.cookie = NULL;
@@ -330,7 +330,7 @@
err = continueWrite(size);
if (err == NO_ERROR) {
mDataSize = size;
- LOGV("setDataSize Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("setDataSize Setting data size of %p to %d\n", this, mDataSize);
}
return err;
}
@@ -504,7 +504,7 @@
if (str == interface) {
return true;
} else {
- LOGW("**** enforceInterface() expected '%s' but read '%s'\n",
+ ALOGW("**** enforceInterface() expected '%s' but read '%s'\n",
String8(interface).string(), String8(str).string());
return false;
}
@@ -534,10 +534,10 @@
{
//printf("Finish write of %d\n", len);
mDataPos += len;
- LOGV("finishWrite Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("finishWrite Setting data pos of %p to %d\n", this, mDataPos);
if (mDataPos > mDataSize) {
mDataSize = mDataPos;
- LOGV("finishWrite Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("finishWrite Setting data size of %p to %d\n", this, mDataSize);
}
//printf("New pos=%d, size=%d\n", mDataPos, mDataSize);
return NO_ERROR;
@@ -703,7 +703,7 @@
err = writeDupFileDescriptor(handle->data[i]);
if (err != NO_ERROR) {
- LOGD("write native handle, write dup fd failed");
+ ALOGD("write native handle, write dup fd failed");
return err;
}
err = write(handle->data + handle->numFds, sizeof(int)*handle->numInts);
@@ -730,7 +730,7 @@
status_t status;
if (!mAllowFds || len <= IN_PLACE_BLOB_LIMIT) {
- LOGV("writeBlob: write in place");
+ ALOGV("writeBlob: write in place");
status = writeInt32(0);
if (status) return status;
@@ -741,7 +741,7 @@
return NO_ERROR;
}
- LOGV("writeBlob: write to ashmem");
+ ALOGV("writeBlob: write to ashmem");
int fd = ashmem_create_region("Parcel Blob", len);
if (fd < 0) return NO_MEMORY;
@@ -865,7 +865,7 @@
if ((mDataPos+PAD_SIZE(len)) >= mDataPos && (mDataPos+PAD_SIZE(len)) <= mDataSize) {
memcpy(outData, mData+mDataPos, len);
mDataPos += PAD_SIZE(len);
- LOGV("read Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("read Setting data pos of %p to %d\n", this, mDataPos);
return NO_ERROR;
}
return NOT_ENOUGH_DATA;
@@ -876,7 +876,7 @@
if ((mDataPos+PAD_SIZE(len)) >= mDataPos && (mDataPos+PAD_SIZE(len)) <= mDataSize) {
const void* data = mData+mDataPos;
mDataPos += PAD_SIZE(len);
- LOGV("readInplace Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("readInplace Setting data pos of %p to %d\n", this, mDataPos);
return data;
}
return NULL;
@@ -987,7 +987,7 @@
if (eos) {
const size_t len = eos - str;
mDataPos += PAD_SIZE(len+1);
- LOGV("readCString Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("readCString Setting data pos of %p to %d\n", this, mDataPos);
return str;
}
}
@@ -1010,7 +1010,7 @@
size_t len;
const char16_t* str = readString16Inplace(&len);
if (str) return String16(str, len);
- LOGE("Reading a NULL string not supported here.");
+ ALOGE("Reading a NULL string not supported here.");
return String16();
}
@@ -1088,7 +1088,7 @@
if (flat) {
switch (flat->type) {
case BINDER_TYPE_FD:
- //LOGI("Returning file descriptor %ld from parcel %p\n", flat->handle, this);
+ //ALOGI("Returning file descriptor %ld from parcel %p\n", flat->handle, this);
return flat->handle;
}
}
@@ -1102,7 +1102,7 @@
if (status) return status;
if (!useAshmem) {
- LOGV("readBlob: read in place");
+ ALOGV("readBlob: read in place");
const void* ptr = readInplace(len);
if (!ptr) return BAD_VALUE;
@@ -1110,7 +1110,7 @@
return NO_ERROR;
}
- LOGV("readBlob: read from ashmem");
+ ALOGV("readBlob: read from ashmem");
int fd = readFileDescriptor();
if (fd == int(BAD_TYPE)) return BAD_VALUE;
@@ -1164,7 +1164,7 @@
// When transferring a NULL object, we don't write it into
// the object list, so we don't want to check for it when
// reading.
- LOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
return obj;
}
@@ -1174,7 +1174,7 @@
size_t opos = mNextObjectHint;
if (N > 0) {
- LOGV("Parcel %p looking for obj at %d, hint=%d\n",
+ ALOGV("Parcel %p looking for obj at %d, hint=%d\n",
this, DPOS, opos);
// Start at the current hint position, looking for an object at
@@ -1188,10 +1188,10 @@
}
if (OBJS[opos] == DPOS) {
// Found it!
- LOGV("Parcel found obj %d at index %d with forward search",
+ ALOGV("Parcel found obj %d at index %d with forward search",
this, DPOS, opos);
mNextObjectHint = opos+1;
- LOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
return obj;
}
@@ -1201,14 +1201,14 @@
}
if (OBJS[opos] == DPOS) {
// Found it!
- LOGV("Parcel found obj %d at index %d with backward search",
+ ALOGV("Parcel found obj %d at index %d with backward search",
this, DPOS, opos);
mNextObjectHint = opos+1;
- LOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("readObject Setting data pos of %p to %d\n", this, mDataPos);
return obj;
}
}
- LOGW("Attempt to read object from Parcel %p at offset %d that is not in the object list",
+ ALOGW("Attempt to read object from Parcel %p at offset %d that is not in the object list",
this, DPOS);
}
return NULL;
@@ -1218,14 +1218,14 @@
{
size_t i = mObjectsSize;
if (i > 0) {
- //LOGI("Closing file descriptors for %d objects...", mObjectsSize);
+ //ALOGI("Closing file descriptors for %d objects...", mObjectsSize);
}
while (i > 0) {
i--;
const flat_binder_object* flat
= reinterpret_cast<flat_binder_object*>(mData+mObjects[i]);
if (flat->type == BINDER_TYPE_FD) {
- //LOGI("Closing fd: %ld\n", flat->handle);
+ //ALOGI("Closing fd: %ld\n", flat->handle);
close(flat->handle);
}
}
@@ -1258,9 +1258,9 @@
mError = NO_ERROR;
mData = const_cast<uint8_t*>(data);
mDataSize = mDataCapacity = dataSize;
- //LOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
+ //ALOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
mDataPos = 0;
- LOGV("setDataReference Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("setDataReference Setting data pos of %p to %d\n", this, mDataPos);
mObjects = const_cast<size_t*>(objects);
mObjectsSize = mObjectsCapacity = objectsCount;
mNextObjectHint = 0;
@@ -1332,7 +1332,7 @@
void Parcel::freeDataNoInit()
{
if (mOwner) {
- //LOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
+ //ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
} else {
releaseObjects();
@@ -1370,8 +1370,8 @@
}
mDataSize = mDataPos = 0;
- LOGV("restartWrite Setting data size of %p to %d\n", this, mDataSize);
- LOGV("restartWrite Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("restartWrite Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("restartWrite Setting data pos of %p to %d\n", this, mDataPos);
free(mObjects);
mObjects = NULL;
@@ -1438,14 +1438,14 @@
if (objects && mObjects) {
memcpy(objects, mObjects, objectsSize*sizeof(size_t));
}
- //LOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
+ //ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
mOwner = NULL;
mData = data;
mObjects = objects;
mDataSize = (mDataSize < desired) ? mDataSize : desired;
- LOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
mDataCapacity = desired;
mObjectsSize = mObjectsCapacity = objectsSize;
mNextObjectHint = 0;
@@ -1485,11 +1485,11 @@
} else {
if (mDataSize > desired) {
mDataSize = desired;
- LOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
}
if (mDataPos > desired) {
mDataPos = desired;
- LOGV("continueWrite Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("continueWrite Setting data pos of %p to %d\n", this, mDataPos);
}
}
@@ -1503,13 +1503,13 @@
if(!(mDataCapacity == 0 && mObjects == NULL
&& mObjectsCapacity == 0)) {
- LOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
+ ALOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
}
mData = data;
mDataSize = mDataPos = 0;
- LOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
- LOGV("continueWrite Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("continueWrite Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("continueWrite Setting data pos of %p to %d\n", this, mDataPos);
mDataCapacity = desired;
}
@@ -1523,8 +1523,8 @@
mDataSize = 0;
mDataCapacity = 0;
mDataPos = 0;
- LOGV("initState Setting data size of %p to %d\n", this, mDataSize);
- LOGV("initState Setting data pos of %p to %d\n", this, mDataPos);
+ ALOGV("initState Setting data size of %p to %d\n", this, mDataSize);
+ ALOGV("initState Setting data pos of %p to %d\n", this, mDataPos);
mObjects = NULL;
mObjectsSize = 0;
mObjectsCapacity = 0;
diff --git a/libs/binder/PermissionCache.cpp b/libs/binder/PermissionCache.cpp
index 7278187..a503be8 100644
--- a/libs/binder/PermissionCache.cpp
+++ b/libs/binder/PermissionCache.cpp
@@ -101,7 +101,7 @@
nsecs_t t = -systemTime();
granted = android::checkPermission(permission, pid, uid);
t += systemTime();
- LOGD("checking %s for uid=%d => %s (%d us)",
+ ALOGD("checking %s for uid=%d => %s (%d us)",
String8(permission).string(), uid,
granted?"granted":"denied", (int)ns2us(t));
pc.cache(permission, uid, granted);
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index f5288c8..f96fe50 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -109,7 +109,7 @@
// Don't attempt to retrieve contexts if we manage them
if (mManagesContexts) {
- LOGE("getContextObject(%s) failed, but we manage the contexts!\n",
+ ALOGE("getContextObject(%s) failed, but we manage the contexts!\n",
String8(name).string());
return NULL;
}
@@ -160,7 +160,7 @@
} else if (result == -1) {
mBinderContextCheckFunc = NULL;
mBinderContextUserData = NULL;
- LOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno));
+ ALOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno));
}
}
return mManagesContexts;
@@ -288,7 +288,7 @@
int32_t s = android_atomic_add(1, &mThreadPoolSeq);
char buf[32];
sprintf(buf, "Binder Thread #%d", s);
- LOGV("Spawning new pooled thread, name=%s\n", buf);
+ ALOGV("Spawning new pooled thread, name=%s\n", buf);
sp<Thread> t = new PoolThread(isMain);
t->run(buf);
}
@@ -302,22 +302,22 @@
int vers;
status_t result = ioctl(fd, BINDER_VERSION, &vers);
if (result == -1) {
- LOGE("Binder ioctl to obtain version failed: %s", strerror(errno));
+ ALOGE("Binder ioctl to obtain version failed: %s", strerror(errno));
close(fd);
fd = -1;
}
if (result != 0 || vers != BINDER_CURRENT_PROTOCOL_VERSION) {
- LOGE("Binder driver protocol does not match user space protocol!");
+ ALOGE("Binder driver protocol does not match user space protocol!");
close(fd);
fd = -1;
}
size_t maxThreads = 15;
result = ioctl(fd, BINDER_SET_MAX_THREADS, &maxThreads);
if (result == -1) {
- LOGE("Binder ioctl to set max threads failed: %s", strerror(errno));
+ ALOGE("Binder ioctl to set max threads failed: %s", strerror(errno));
}
} else {
- LOGW("Opening '/dev/binder' failed: %s\n", strerror(errno));
+ ALOGW("Opening '/dev/binder' failed: %s\n", strerror(errno));
}
return fd;
}
@@ -340,7 +340,7 @@
mVMStart = mmap(0, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0);
if (mVMStart == MAP_FAILED) {
// *sigh*
- LOGE("Using /dev/binder failed: unable to mmap transaction memory.\n");
+ ALOGE("Using /dev/binder failed: unable to mmap transaction memory.\n");
close(mDriverFD);
mDriverFD = -1;
}
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 86bc62a..b1b9adb 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -148,27 +148,27 @@
err = data.writeInterfaceToken(
ISurfaceComposer::getInterfaceDescriptor());
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
"interface descriptor: %s (%d)", strerror(-err), -err);
return false;
}
err = data.writeStrongBinder(surfaceTexture->asBinder());
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
"strong binder to parcel: %s (%d)", strerror(-err), -err);
return false;
}
err = remote()->transact(BnSurfaceComposer::AUTHENTICATE_SURFACE, data,
&reply);
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
"performing transaction: %s (%d)", strerror(-err), -err);
return false;
}
int32_t result = 0;
err = reply.readInt32(&result);
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
"retrieving result: %s (%d)", strerror(-err), -err);
return false;
}
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
index f935524..ac362fc 100644
--- a/libs/gui/SensorEventQueue.cpp
+++ b/libs/gui/SensorEventQueue.cpp
@@ -70,12 +70,12 @@
ssize_t SensorEventQueue::read(ASensorEvent* events, size_t numEvents)
{
ssize_t size = mSensorChannel->read(events, numEvents*sizeof(events[0]));
- LOGE_IF(size<0 && size!=-EAGAIN,
+ ALOGE_IF(size<0 && size!=-EAGAIN,
"SensorChannel::read error (%s)", strerror(-size));
if (size >= 0) {
if (size % sizeof(events[0])) {
// partial read!!! should never happen.
- LOGE("SensorEventQueue partial read (event-size=%u, read=%d)",
+ ALOGE("SensorEventQueue partial read (event-size=%u, read=%d)",
sizeof(events[0]), int(size));
return -EINVAL;
}
@@ -104,7 +104,7 @@
do {
result = looper->pollOnce(-1);
if (result == ALOOPER_EVENT_ERROR) {
- LOGE("SensorChannel::waitForEvent error (errno=%d)", errno);
+ ALOGE("SensorChannel::waitForEvent error (errno=%d)", errno);
result = -EPIPE; // unknown error, so we make up one
break;
}
diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp
index dafcdea..b80da56 100644
--- a/libs/gui/SensorManager.cpp
+++ b/libs/gui/SensorManager.cpp
@@ -78,7 +78,7 @@
class DeathObserver : public IBinder::DeathRecipient {
SensorManager& mSensorManger;
virtual void binderDied(const wp<IBinder>& who) {
- LOGW("sensorservice died [%p]", who.unsafe_get());
+ ALOGW("sensorservice died [%p]", who.unsafe_get());
mSensorManger.sensorManagerDied();
}
public:
@@ -137,7 +137,7 @@
mSensorServer->createSensorEventConnection();
if (connection == NULL) {
// SensorService just died.
- LOGE("createEventQueue: connection is NULL. SensorService died.");
+ ALOGE("createEventQueue: connection is NULL. SensorService died.");
continue;
}
queue = new SensorEventQueue(connection);
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index ff45fa3..337950c 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -167,7 +167,7 @@
status_t SurfaceControl::validate() const
{
if (mToken<0 || mClient==0) {
- LOGE("invalid token (%d, identity=%u) or client (%p)",
+ ALOGE("invalid token (%d, identity=%u) or client (%p)",
mToken, mIdentity, mClient.get());
return NO_INIT;
}
@@ -254,7 +254,7 @@
} else if (surface != 0 &&
(surface->mSurface != NULL ||
surface->getISurfaceTexture() != NULL)) {
- LOGE("Parceling invalid surface with non-NULL ISurface/ISurfaceTexture as NULL: "
+ ALOGE("Parceling invalid surface with non-NULL ISurface/ISurfaceTexture as NULL: "
"mSurface = %p, surfaceTexture = %p, mIdentity = %d, ",
surface->mSurface.get(), surface->getISurfaceTexture().get(),
surface->mIdentity);
@@ -304,7 +304,7 @@
void Surface::init(const sp<ISurfaceTexture>& surfaceTexture)
{
if (mSurface != NULL || surfaceTexture != NULL) {
- LOGE_IF(surfaceTexture==0, "got a NULL ISurfaceTexture from ISurface");
+ ALOGE_IF(surfaceTexture==0, "got a NULL ISurfaceTexture from ISurface");
if (surfaceTexture != NULL) {
setISurfaceTexture(surfaceTexture);
setUsage(GraphicBuffer::USAGE_HW_RENDER);
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 4772189..c80d93d 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -60,11 +60,11 @@
#endif
// Macros for including the SurfaceTexture name in log messages
-#define ST_LOGV(x, ...) LOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGD(x, ...) LOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGI(x, ...) LOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGW(x, ...) LOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGE(x, ...) LOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGD(x, ...) ALOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGI(x, ...) ALOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGW(x, ...) ALOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGE(x, ...) ALOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
namespace android {
@@ -350,7 +350,7 @@
}
// if buffer is FREE it CANNOT be current
- LOGW_IF((state == BufferSlot::FREE) && (mCurrentTexture==i),
+ ALOGW_IF((state == BufferSlot::FREE) && (mCurrentTexture==i),
"dequeueBuffer: buffer %d is both FREE and current!",
i);
@@ -491,9 +491,9 @@
// synchronizing access to it. It's too late at this point to abort the
// dequeue operation.
if (result == EGL_FALSE) {
- LOGE("dequeueBuffer: error waiting for fence: %#x", eglGetError());
+ ALOGE("dequeueBuffer: error waiting for fence: %#x", eglGetError());
} else if (result == EGL_TIMEOUT_EXPIRED_KHR) {
- LOGE("dequeueBuffer: timeout waiting for fence");
+ ALOGE("dequeueBuffer: timeout waiting for fence");
}
eglDestroySyncKHR(dpy, fence);
}
@@ -802,7 +802,7 @@
EGLSyncKHR fence = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR,
NULL);
if (fence == EGL_NO_SYNC_KHR) {
- LOGE("updateTexImage: error creating fence: %#x",
+ ALOGE("updateTexImage: error creating fence: %#x",
eglGetError());
return -EINVAL;
}
@@ -990,7 +990,7 @@
}
void SurfaceTexture::freeAllBuffersLocked() {
- LOGW_IF(!mQueue.isEmpty(),
+ ALOGW_IF(!mQueue.isEmpty(),
"freeAllBuffersLocked called but mQueue is not empty");
mCurrentTexture = INVALID_BUFFER_SLOT;
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
@@ -999,7 +999,7 @@
}
void SurfaceTexture::freeAllBuffersExceptHeadLocked() {
- LOGW_IF(!mQueue.isEmpty(),
+ ALOGW_IF(!mQueue.isEmpty(),
"freeAllBuffersExceptCurrentLocked called but mQueue is not empty");
int head = -1;
if (!mQueue.empty()) {
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index 48070d6..5f01ae9 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -136,13 +136,13 @@
}
int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
- LOGV("SurfaceTextureClient::dequeueBuffer");
+ ALOGV("SurfaceTextureClient::dequeueBuffer");
Mutex::Autolock lock(mMutex);
int buf = -1;
status_t result = mSurfaceTexture->dequeueBuffer(&buf, mReqWidth, mReqHeight,
mReqFormat, mReqUsage);
if (result < 0) {
- LOGV("dequeueBuffer: ISurfaceTexture::dequeueBuffer(%d, %d, %d, %d)"
+ ALOGV("dequeueBuffer: ISurfaceTexture::dequeueBuffer(%d, %d, %d, %d)"
"failed: %d", mReqWidth, mReqHeight, mReqFormat, mReqUsage,
result);
return result;
@@ -155,7 +155,7 @@
if ((result & ISurfaceTexture::BUFFER_NEEDS_REALLOCATION) || gbuf == 0) {
result = mSurfaceTexture->requestBuffer(buf, &gbuf);
if (result != NO_ERROR) {
- LOGE("dequeueBuffer: ISurfaceTexture::requestBuffer failed: %d",
+ ALOGE("dequeueBuffer: ISurfaceTexture::requestBuffer failed: %d",
result);
return result;
}
@@ -165,7 +165,7 @@
}
int SurfaceTextureClient::cancelBuffer(android_native_buffer_t* buffer) {
- LOGV("SurfaceTextureClient::cancelBuffer");
+ ALOGV("SurfaceTextureClient::cancelBuffer");
Mutex::Autolock lock(mMutex);
int i = getSlotFromBufferLocked(buffer);
if (i < 0) {
@@ -183,13 +183,13 @@
// a buffer.
if (mSlots[i] == NULL) {
if (!dumpedState) {
- LOGD("getSlotFromBufferLocked: encountered NULL buffer in slot %d "
+ ALOGD("getSlotFromBufferLocked: encountered NULL buffer in slot %d "
"looking for buffer %p", i, buffer->handle);
for (int j = 0; j < NUM_BUFFER_SLOTS; j++) {
if (mSlots[j] == NULL) {
- LOGD("getSlotFromBufferLocked: %02d: NULL", j);
+ ALOGD("getSlotFromBufferLocked: %02d: NULL", j);
} else {
- LOGD("getSlotFromBufferLocked: %02d: %p", j, mSlots[j]->handle);
+ ALOGD("getSlotFromBufferLocked: %02d: %p", j, mSlots[j]->handle);
}
}
dumpedState = true;
@@ -200,23 +200,23 @@
return i;
}
}
- LOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle);
+ ALOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle);
return BAD_VALUE;
}
int SurfaceTextureClient::lockBuffer(android_native_buffer_t* buffer) {
- LOGV("SurfaceTextureClient::lockBuffer");
+ ALOGV("SurfaceTextureClient::lockBuffer");
Mutex::Autolock lock(mMutex);
return OK;
}
int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
- LOGV("SurfaceTextureClient::queueBuffer");
+ ALOGV("SurfaceTextureClient::queueBuffer");
Mutex::Autolock lock(mMutex);
int64_t timestamp;
if (mTimestamp == NATIVE_WINDOW_TIMESTAMP_AUTO) {
timestamp = systemTime(SYSTEM_TIME_MONOTONIC);
- LOGV("SurfaceTextureClient::queueBuffer making up timestamp: %.2f ms",
+ ALOGV("SurfaceTextureClient::queueBuffer making up timestamp: %.2f ms",
timestamp / 1000000.f);
} else {
timestamp = mTimestamp;
@@ -228,13 +228,13 @@
status_t err = mSurfaceTexture->queueBuffer(i, timestamp,
&mDefaultWidth, &mDefaultHeight, &mTransformHint);
if (err != OK) {
- LOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err);
+ ALOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err);
}
return err;
}
int SurfaceTextureClient::query(int what, int* value) const {
- LOGV("SurfaceTextureClient::query");
+ ALOGV("SurfaceTextureClient::query");
{ // scope for the lock
Mutex::Autolock lock(mMutex);
switch (what) {
@@ -402,7 +402,7 @@
int SurfaceTextureClient::connect(int api) {
- LOGV("SurfaceTextureClient::connect");
+ ALOGV("SurfaceTextureClient::connect");
Mutex::Autolock lock(mMutex);
int err = mSurfaceTexture->connect(api,
&mDefaultWidth, &mDefaultHeight, &mTransformHint);
@@ -413,7 +413,7 @@
}
int SurfaceTextureClient::disconnect(int api) {
- LOGV("SurfaceTextureClient::disconnect");
+ ALOGV("SurfaceTextureClient::disconnect");
Mutex::Autolock lock(mMutex);
freeAllBuffers();
int err = mSurfaceTexture->disconnect(api);
@@ -431,7 +431,7 @@
int SurfaceTextureClient::setUsage(uint32_t reqUsage)
{
- LOGV("SurfaceTextureClient::setUsage");
+ ALOGV("SurfaceTextureClient::setUsage");
Mutex::Autolock lock(mMutex);
mReqUsage = reqUsage;
return OK;
@@ -439,7 +439,7 @@
int SurfaceTextureClient::setCrop(Rect const* rect)
{
- LOGV("SurfaceTextureClient::setCrop");
+ ALOGV("SurfaceTextureClient::setCrop");
Mutex::Autolock lock(mMutex);
Rect realRect;
@@ -450,18 +450,18 @@
}
status_t err = mSurfaceTexture->setCrop(*rect);
- LOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
+ ALOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
return err;
}
int SurfaceTextureClient::setBufferCount(int bufferCount)
{
- LOGV("SurfaceTextureClient::setBufferCount");
+ ALOGV("SurfaceTextureClient::setBufferCount");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setBufferCount(bufferCount);
- LOGE_IF(err, "ISurfaceTexture::setBufferCount(%d) returned %s",
+ ALOGE_IF(err, "ISurfaceTexture::setBufferCount(%d) returned %s",
bufferCount, strerror(-err));
if (err == NO_ERROR) {
@@ -473,7 +473,7 @@
int SurfaceTextureClient::setBuffersDimensions(int w, int h)
{
- LOGV("SurfaceTextureClient::setBuffersDimensions");
+ ALOGV("SurfaceTextureClient::setBuffersDimensions");
Mutex::Autolock lock(mMutex);
if (w<0 || h<0)
@@ -486,14 +486,14 @@
mReqHeight = h;
status_t err = mSurfaceTexture->setCrop(Rect(0, 0));
- LOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
+ ALOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
return err;
}
int SurfaceTextureClient::setBuffersFormat(int format)
{
- LOGV("SurfaceTextureClient::setBuffersFormat");
+ ALOGV("SurfaceTextureClient::setBuffersFormat");
Mutex::Autolock lock(mMutex);
if (format<0)
@@ -506,11 +506,11 @@
int SurfaceTextureClient::setScalingMode(int mode)
{
- LOGV("SurfaceTextureClient::setScalingMode(%d)", mode);
+ ALOGV("SurfaceTextureClient::setScalingMode(%d)", mode);
Mutex::Autolock lock(mMutex);
// mode is validated on the server
status_t err = mSurfaceTexture->setScalingMode(mode);
- LOGE_IF(err, "ISurfaceTexture::setScalingMode(%d) returned %s",
+ ALOGE_IF(err, "ISurfaceTexture::setScalingMode(%d) returned %s",
mode, strerror(-err));
return err;
@@ -518,7 +518,7 @@
int SurfaceTextureClient::setBuffersTransform(int transform)
{
- LOGV("SurfaceTextureClient::setBuffersTransform");
+ ALOGV("SurfaceTextureClient::setBuffersTransform");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setTransform(transform);
return err;
@@ -526,7 +526,7 @@
int SurfaceTextureClient::setBuffersTimestamp(int64_t timestamp)
{
- LOGV("SurfaceTextureClient::setBuffersTimestamp");
+ ALOGV("SurfaceTextureClient::setBuffersTimestamp");
Mutex::Autolock lock(mMutex);
mTimestamp = timestamp;
return NO_ERROR;
@@ -551,11 +551,11 @@
status_t err;
uint8_t const * src_bits = NULL;
err = src->lock(GRALLOC_USAGE_SW_READ_OFTEN, reg.bounds(), (void**)&src_bits);
- LOGE_IF(err, "error locking src buffer %s", strerror(-err));
+ ALOGE_IF(err, "error locking src buffer %s", strerror(-err));
uint8_t* dst_bits = NULL;
err = dst->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, reg.bounds(), (void**)&dst_bits);
- LOGE_IF(err, "error locking dst buffer %s", strerror(-err));
+ ALOGE_IF(err, "error locking dst buffer %s", strerror(-err));
Region::const_iterator head(reg.begin());
Region::const_iterator tail(reg.end());
@@ -598,7 +598,7 @@
ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds)
{
if (mLockedBuffer != 0) {
- LOGE("Surface::lock failed, already locked");
+ ALOGE("Surface::lock failed, already locked");
return INVALID_OPERATION;
}
@@ -613,11 +613,11 @@
ANativeWindowBuffer* out;
status_t err = dequeueBuffer(&out);
- LOGE_IF(err, "dequeueBuffer failed (%s)", strerror(-err));
+ ALOGE_IF(err, "dequeueBuffer failed (%s)", strerror(-err));
if (err == NO_ERROR) {
sp<GraphicBuffer> backBuffer(GraphicBuffer::getSelf(out));
err = lockBuffer(backBuffer.get());
- LOGE_IF(err, "lockBuffer (handle=%p) failed (%s)",
+ ALOGE_IF(err, "lockBuffer (handle=%p) failed (%s)",
backBuffer->handle, strerror(-err));
if (err == NO_ERROR) {
const Rect bounds(backBuffer->width, backBuffer->height);
@@ -661,7 +661,7 @@
GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN,
newDirtyRegion.bounds(), &vaddr);
- LOGW_IF(res, "failed locking buffer (handle = %p)",
+ ALOGW_IF(res, "failed locking buffer (handle = %p)",
backBuffer->handle);
mLockedBuffer = backBuffer;
@@ -678,15 +678,15 @@
status_t SurfaceTextureClient::unlockAndPost()
{
if (mLockedBuffer == 0) {
- LOGE("Surface::unlockAndPost failed, no locked buffer");
+ ALOGE("Surface::unlockAndPost failed, no locked buffer");
return INVALID_OPERATION;
}
status_t err = mLockedBuffer->unlock();
- LOGE_IF(err, "failed unlocking buffer (%p)", mLockedBuffer->handle);
+ ALOGE_IF(err, "failed unlocking buffer (%p)", mLockedBuffer->handle);
err = queueBuffer(mLockedBuffer.get());
- LOGE_IF(err, "queueBuffer (handle=%p) failed (%s)",
+ ALOGE_IF(err, "queueBuffer (handle=%p) failed (%s)",
mLockedBuffer->handle, strerror(-err));
mPostedBuffer = mLockedBuffer;
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index c313904..b18e7b0 100644
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ b/libs/gui/tests/SurfaceTexture_test.cpp
@@ -1399,12 +1399,12 @@
// test.
void waitForFrame() {
Mutex::Autolock lock(mMutex);
- LOGV("+waitForFrame");
+ ALOGV("+waitForFrame");
while (!mFrameAvailable) {
mFrameAvailableCondition.wait(mMutex);
}
mFrameAvailable = false;
- LOGV("-waitForFrame");
+ ALOGV("-waitForFrame");
}
// Allow the producer to return from its swapBuffers call and continue
@@ -1412,23 +1412,23 @@
// thread once for every frame expected by the test.
void finishFrame() {
Mutex::Autolock lock(mMutex);
- LOGV("+finishFrame");
+ ALOGV("+finishFrame");
mFrameFinished = true;
mFrameFinishCondition.signal();
- LOGV("-finishFrame");
+ ALOGV("-finishFrame");
}
// This should be called by SurfaceTexture on the producer thread.
virtual void onFrameAvailable() {
Mutex::Autolock lock(mMutex);
- LOGV("+onFrameAvailable");
+ ALOGV("+onFrameAvailable");
mFrameAvailable = true;
mFrameAvailableCondition.signal();
while (!mFrameFinished) {
mFrameFinishCondition.wait(mMutex);
}
mFrameFinished = false;
- LOGV("-onFrameAvailable");
+ ALOGV("-onFrameAvailable");
}
protected:
@@ -1514,9 +1514,9 @@
for (int i = 0; i < NUM_ITERATIONS; i++) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
- LOGV("+swapBuffers");
+ ALOGV("+swapBuffers");
swapBuffers();
- LOGV("-swapBuffers");
+ ALOGV("-swapBuffers");
}
}
};
@@ -1525,9 +1525,9 @@
for (int i = 0; i < NUM_ITERATIONS; i++) {
mFC->waitForFrame();
- LOGV("+updateTexImage");
+ ALOGV("+updateTexImage");
mST->updateTexImage();
- LOGV("-updateTexImage");
+ ALOGV("-updateTexImage");
mFC->finishFrame();
// TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
@@ -1543,9 +1543,9 @@
for (int i = 0; i < NUM_ITERATIONS; i++) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
- LOGV("+swapBuffers");
+ ALOGV("+swapBuffers");
swapBuffers();
- LOGV("-swapBuffers");
+ ALOGV("-swapBuffers");
}
}
};
@@ -1555,9 +1555,9 @@
for (int i = 0; i < NUM_ITERATIONS; i++) {
mFC->waitForFrame();
mFC->finishFrame();
- LOGV("+updateTexImage");
+ ALOGV("+updateTexImage");
mST->updateTexImage();
- LOGV("-updateTexImage");
+ ALOGV("-updateTexImage");
// TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
}
@@ -1573,9 +1573,9 @@
for (int i = 0; i < NUM_ITERATIONS; i++) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
- LOGV("+swapBuffers");
+ ALOGV("+swapBuffers");
swapBuffers();
- LOGV("-swapBuffers");
+ ALOGV("-swapBuffers");
}
}
};
@@ -1624,9 +1624,9 @@
for (int i = 0; i < NUM_ITERATIONS-3; i++) {
mFC->waitForFrame();
mFC->finishFrame();
- LOGV("+updateTexImage");
+ ALOGV("+updateTexImage");
mST->updateTexImage();
- LOGV("-updateTexImage");
+ ALOGV("-updateTexImage");
}
}
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 8949730..f5ed981 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -85,10 +85,10 @@
int err;
int i;
err = framebuffer_open(module, &fbDev);
- LOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
+ ALOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
err = gralloc_open(module, &grDev);
- LOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
+ ALOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
// bail out if we can't initialize the modules
if (!fbDev || !grDev)
@@ -113,7 +113,7 @@
fbDev->width, fbDev->height, fbDev->format,
GRALLOC_USAGE_HW_FB, &buffers[i]->handle, &buffers[i]->stride);
- LOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
+ ALOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
i, fbDev->width, fbDev->height, strerror(-err));
if (err)
@@ -133,7 +133,7 @@
const_cast<int&>(ANativeWindow::maxSwapInterval) =
fbDev->maxSwapInterval;
} else {
- LOGE("Couldn't get gralloc module");
+ ALOGE("Couldn't get gralloc module");
}
ANativeWindow::setSwapInterval = setSwapInterval;
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 54a3ffa..f549a37 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -167,7 +167,7 @@
{
if (rect.left < 0 || rect.right > this->width ||
rect.top < 0 || rect.bottom > this->height) {
- LOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
+ ALOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
rect.left, rect.top, rect.right, rect.bottom,
this->width, this->height);
return BAD_VALUE;
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index e75415b..d344737 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -38,7 +38,7 @@
{
hw_module_t const* module;
int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
- LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+ ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
if (err == 0) {
gralloc_open(module, &mAllocDev);
}
@@ -85,7 +85,7 @@
{
String8 s;
GraphicBufferAllocator::getInstance().dump(s);
- LOGD("%s", s.string());
+ ALOGD("%s", s.string());
}
status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
@@ -101,7 +101,7 @@
err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
- LOGW_IF(err, "alloc(%u, %u, %d, %08x, ...) failed %d (%s)",
+ ALOGW_IF(err, "alloc(%u, %u, %d, %08x, ...) failed %d (%s)",
w, h, format, usage, err, strerror(-err));
if (err == NO_ERROR) {
@@ -132,7 +132,7 @@
err = mAllocDev->free(mAllocDev, handle);
- LOGW_IF(err, "free(...) failed %d (%s)", err, strerror(-err));
+ ALOGW_IF(err, "free(...) failed %d (%s)", err, strerror(-err));
if (err == NO_ERROR) {
Mutex::Autolock _l(sLock);
KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList);
diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp
index 07c0674..b173c85 100644
--- a/libs/ui/GraphicBufferMapper.cpp
+++ b/libs/ui/GraphicBufferMapper.cpp
@@ -38,7 +38,7 @@
{
hw_module_t const* module;
int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
- LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+ ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
if (err == 0) {
mAllocMod = (gralloc_module_t const *)module;
}
@@ -50,7 +50,7 @@
err = mAllocMod->registerBuffer(mAllocMod, handle);
- LOGW_IF(err, "registerBuffer(%p) failed %d (%s)",
+ ALOGW_IF(err, "registerBuffer(%p) failed %d (%s)",
handle, err, strerror(-err));
return err;
}
@@ -61,7 +61,7 @@
err = mAllocMod->unregisterBuffer(mAllocMod, handle);
- LOGW_IF(err, "unregisterBuffer(%p) failed %d (%s)",
+ ALOGW_IF(err, "unregisterBuffer(%p) failed %d (%s)",
handle, err, strerror(-err));
return err;
}
@@ -75,7 +75,7 @@
bounds.left, bounds.top, bounds.width(), bounds.height(),
vaddr);
- LOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
+ ALOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
return err;
}
@@ -85,7 +85,7 @@
err = mAllocMod->unlock(mAllocMod, handle);
- LOGW_IF(err, "unlock(...) failed %d (%s)", err, strerror(-err));
+ ALOGW_IF(err, "unlock(...) failed %d (%s)", err, strerror(-err));
return err;
}
diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp
index 3de75ba..263c8d9 100644
--- a/libs/ui/Input.cpp
+++ b/libs/ui/Input.cpp
@@ -106,11 +106,11 @@
path.append("/usr/");
appendInputDeviceConfigurationFileRelativePath(path, name, type);
#if DEBUG_PROBE
- LOGD("Probing for system provided input device configuration file: path='%s'", path.string());
+ ALOGD("Probing for system provided input device configuration file: path='%s'", path.string());
#endif
if (!access(path.string(), R_OK)) {
#if DEBUG_PROBE
- LOGD("Found");
+ ALOGD("Found");
#endif
return path;
}
@@ -121,18 +121,18 @@
path.append("/system/devices/");
appendInputDeviceConfigurationFileRelativePath(path, name, type);
#if DEBUG_PROBE
- LOGD("Probing for system user input device configuration file: path='%s'", path.string());
+ ALOGD("Probing for system user input device configuration file: path='%s'", path.string());
#endif
if (!access(path.string(), R_OK)) {
#if DEBUG_PROBE
- LOGD("Found");
+ ALOGD("Found");
#endif
return path;
}
// Not found.
#if DEBUG_PROBE
- LOGD("Probe failed to find input device configuration file: name='%s', type=%d",
+ ALOGD("Probe failed to find input device configuration file: name='%s', type=%d",
name.string(), type);
#endif
return String8();
@@ -345,7 +345,7 @@
#endif
void PointerCoords::tooManyAxes(int axis) {
- LOGW("Could not set value for axis %d because the PointerCoords structure is full and "
+ ALOGW("Could not set value for axis %d because the PointerCoords structure is full and "
"cannot contain more than %d axis values.", axis, int(MAX_AXES));
}
@@ -782,7 +782,7 @@
}
#if DEBUG_VELOCITY
- LOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
+ ALOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
eventTime, idBits.value, mActivePointerId);
for (BitSet32 iterBits(idBits); !iterBits.isEmpty(); ) {
uint32_t id = iterBits.firstMarkedBit();
@@ -790,7 +790,7 @@
iterBits.clearBit(id);
Estimator estimator;
getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator);
- LOGD(" %d: position (%0.3f, %0.3f), "
+ ALOGD(" %d: position (%0.3f, %0.3f), "
"estimator (degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f)",
id, positions[index].x, positions[index].y,
int(estimator.degree),
@@ -903,7 +903,7 @@
static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32_t n,
float* outB, float* outDet) {
#if DEBUG_LEAST_SQUARES
- LOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
+ ALOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
vectorToString(x, m).string(), vectorToString(y, m).string());
#endif
@@ -916,7 +916,7 @@
}
}
#if DEBUG_LEAST_SQUARES
- LOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
+ ALOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
#endif
// Apply the Gram-Schmidt process to A to obtain its QR decomposition.
@@ -937,7 +937,7 @@
if (norm < 0.000001f) {
// vectors are linearly dependent or zero so no solution
#if DEBUG_LEAST_SQUARES
- LOGD(" - no solution, norm=%f", norm);
+ ALOGD(" - no solution, norm=%f", norm);
#endif
return false;
}
@@ -951,8 +951,8 @@
}
}
#if DEBUG_LEAST_SQUARES
- LOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
- LOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
+ ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
+ ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
// calculate QR, if we factored A correctly then QR should equal A
float qr[n][m];
@@ -964,7 +964,7 @@
}
}
}
- LOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
+ ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
#endif
// Solve R B = Qt Y to find B. This is easy because R is upper triangular.
@@ -977,7 +977,7 @@
outB[i] /= r[i][i];
}
#if DEBUG_LEAST_SQUARES
- LOGD(" - b=%s", vectorToString(outB, n).string());
+ ALOGD(" - b=%s", vectorToString(outB, n).string());
#endif
// Calculate the coefficient of determination as 1 - (SSerr / SStot) where
@@ -1004,9 +1004,9 @@
}
*outDet = sstot > 0.000001f ? 1.0f - (sserr / sstot) : 1;
#if DEBUG_LEAST_SQUARES
- LOGD(" - sserr=%f", sserr);
- LOGD(" - sstot=%f", sstot);
- LOGD(" - det=%f", *outDet);
+ ALOGD(" - sserr=%f", sserr);
+ ALOGD(" - sstot=%f", sstot);
+ ALOGD(" - det=%f", *outDet);
#endif
return true;
}
@@ -1073,7 +1073,7 @@
outEstimator->degree = degree;
outEstimator->confidence = xdet * ydet;
#if DEBUG_LEAST_SQUARES
- LOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
+ ALOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
int(outEstimator->degree),
vectorToString(outEstimator->xCoeff, n).string(),
vectorToString(outEstimator->yCoeff, n).string(),
@@ -1116,7 +1116,7 @@
if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
if (eventTime >= mLastMovementTime + STOP_TIME) {
#if DEBUG_ACCELERATION
- LOGD("VelocityControl: stopped, last movement was %0.3fms ago",
+ ALOGD("VelocityControl: stopped, last movement was %0.3fms ago",
(eventTime - mLastMovementTime) * 0.000001f);
#endif
reset();
@@ -1147,7 +1147,7 @@
}
#if DEBUG_ACCELERATION
- LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
+ ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
"vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
mParameters.acceleration,
@@ -1155,7 +1155,7 @@
#endif
} else {
#if DEBUG_ACCELERATION
- LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
+ ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
mParameters.acceleration);
#endif
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp
index 1e602e9..09cbb31 100644
--- a/libs/ui/InputTransport.cpp
+++ b/libs/ui/InputTransport.cpp
@@ -55,7 +55,7 @@
int32_t sendPipeFd) :
mName(name), mAshmemFd(ashmemFd), mReceivePipeFd(receivePipeFd), mSendPipeFd(sendPipeFd) {
#if DEBUG_CHANNEL_LIFECYCLE
- LOGD("Input channel constructed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
+ ALOGD("Input channel constructed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
mName.string(), ashmemFd, receivePipeFd, sendPipeFd);
#endif
@@ -70,7 +70,7 @@
InputChannel::~InputChannel() {
#if DEBUG_CHANNEL_LIFECYCLE
- LOGD("Input channel destroyed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
+ ALOGD("Input channel destroyed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
mName.string(), mAshmemFd, mReceivePipeFd, mSendPipeFd);
#endif
@@ -88,12 +88,12 @@
int serverAshmemFd = ashmem_create_region(ashmemName.string(), DEFAULT_MESSAGE_BUFFER_SIZE);
if (serverAshmemFd < 0) {
result = -errno;
- LOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
+ ALOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
name.string(), errno);
} else {
result = ashmem_set_prot_region(serverAshmemFd, PROT_READ | PROT_WRITE);
if (result < 0) {
- LOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
+ ALOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
name.string(), result, serverAshmemFd);
} else {
// Dup the file descriptor because the server and client input channel objects that
@@ -102,19 +102,19 @@
clientAshmemFd = dup(serverAshmemFd);
if (clientAshmemFd < 0) {
result = -errno;
- LOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
+ ALOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
name.string(), errno);
} else {
int forward[2];
if (pipe(forward)) {
result = -errno;
- LOGE("channel '%s' ~ Could not create forward pipe. errno=%d",
+ ALOGE("channel '%s' ~ Could not create forward pipe. errno=%d",
name.string(), errno);
} else {
int reverse[2];
if (pipe(reverse)) {
result = -errno;
- LOGE("channel '%s' ~ Could not create reverse pipe. errno=%d",
+ ALOGE("channel '%s' ~ Could not create reverse pipe. errno=%d",
name.string(), errno);
} else {
String8 serverChannelName = name;
@@ -150,13 +150,13 @@
if (nWrite == 1) {
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ sent signal '%c'", mName.string(), signal);
+ ALOGD("channel '%s' ~ sent signal '%c'", mName.string(), signal);
#endif
return OK;
}
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ error sending signal '%c', errno=%d", mName.string(), signal, errno);
+ ALOGD("channel '%s' ~ error sending signal '%c', errno=%d", mName.string(), signal, errno);
#endif
return -errno;
}
@@ -169,27 +169,27 @@
if (nRead == 1) {
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
+ ALOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
#endif
return OK;
}
if (nRead == 0) { // check for EOF
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ receive signal failed because peer was closed", mName.string());
+ ALOGD("channel '%s' ~ receive signal failed because peer was closed", mName.string());
#endif
return DEAD_OBJECT;
}
if (errno == EAGAIN) {
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ receive signal failed because no signal available", mName.string());
+ ALOGD("channel '%s' ~ receive signal failed because no signal available", mName.string());
#endif
return WOULD_BLOCK;
}
#if DEBUG_CHANNEL_SIGNALS
- LOGD("channel '%s' ~ receive signal failed, errno=%d", mName.string(), errno);
+ ALOGD("channel '%s' ~ receive signal failed, errno=%d", mName.string(), errno);
#endif
return -errno;
}
@@ -213,14 +213,14 @@
status_t InputPublisher::initialize() {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ initialize",
+ ALOGD("channel '%s' publisher ~ initialize",
mChannel->getName().string());
#endif
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_get_size_region(ashmemFd);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -229,7 +229,7 @@
mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
if (! mSharedMessage) {
- LOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
mChannel->getName().string(), ashmemFd);
return NO_MEMORY;
}
@@ -242,7 +242,7 @@
status_t InputPublisher::reset() {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ reset",
+ ALOGD("channel '%s' publisher ~ reset",
mChannel->getName().string());
#endif
@@ -253,7 +253,7 @@
if (mSharedMessage->consumed) {
result = sem_post(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -261,7 +261,7 @@
result = sem_destroy(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -273,7 +273,7 @@
int ashmemFd = mChannel->getAshmemFd();
result = ashmem_unpin_region(ashmemFd, 0, 0);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -291,7 +291,7 @@
int32_t deviceId,
int32_t source) {
if (mPinned) {
- LOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
+ ALOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
"not yet been reset.", mChannel->getName().string());
return INVALID_OPERATION;
}
@@ -302,7 +302,7 @@
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_pin_region(ashmemFd, 0, 0);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -311,7 +311,7 @@
result = sem_init(& mSharedMessage->semaphore, 1, 1);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_init.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_init.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -337,7 +337,7 @@
nsecs_t downTime,
nsecs_t eventTime) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=0x%x, "
+ ALOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=0x%x, "
"action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d,"
"downTime=%lld, eventTime=%lld",
mChannel->getName().string(),
@@ -379,7 +379,7 @@
const PointerProperties* pointerProperties,
const PointerCoords* pointerCoords) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=0x%x, "
+ ALOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=0x%x, "
"action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, "
"xOffset=%f, yOffset=%f, "
"xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, "
@@ -390,7 +390,7 @@
#endif
if (pointerCount > MAX_POINTERS || pointerCount < 1) {
- LOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
+ ALOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
mChannel->getName().string(), pointerCount);
return BAD_VALUE;
}
@@ -439,12 +439,12 @@
nsecs_t eventTime,
const PointerCoords* pointerCoords) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ appendMotionSample: eventTime=%lld",
+ ALOGD("channel '%s' publisher ~ appendMotionSample: eventTime=%lld",
mChannel->getName().string(), eventTime);
#endif
if (! mPinned || ! mMotionEventSampleDataTail) {
- LOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
+ ALOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
"AMOTION_EVENT_ACTION_MOVE or AMOTION_EVENT_ACTION_HOVER_MOVE event.",
mChannel->getName().string());
return INVALID_OPERATION;
@@ -457,7 +457,7 @@
if (newBytesUsed > mAshmemSize) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ Cannot append motion sample because the shared memory "
+ ALOGD("channel '%s' publisher ~ Cannot append motion sample because the shared memory "
"buffer is full. Buffer size: %d bytes, pointers: %d, samples: %d",
mChannel->getName().string(),
mAshmemSize, mMotionEventPointerCount, mSharedMessage->motion.sampleCount);
@@ -473,12 +473,12 @@
// Only possible source of contention is the consumer having consumed (or being in the
// process of consuming) the message and left the semaphore count at 0.
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ Cannot append motion sample because the message has "
+ ALOGD("channel '%s' publisher ~ Cannot append motion sample because the message has "
"already been consumed.", mChannel->getName().string());
#endif
return FAILED_TRANSACTION;
} else {
- LOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -496,7 +496,7 @@
if (mWasDispatched) {
result = sem_post(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -506,7 +506,7 @@
status_t InputPublisher::sendDispatchSignal() {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ sendDispatchSignal",
+ ALOGD("channel '%s' publisher ~ sendDispatchSignal",
mChannel->getName().string());
#endif
@@ -516,7 +516,7 @@
status_t InputPublisher::receiveFinishedSignal(bool* outHandled) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' publisher ~ receiveFinishedSignal",
+ ALOGD("channel '%s' publisher ~ receiveFinishedSignal",
mChannel->getName().string());
#endif
@@ -531,7 +531,7 @@
} else if (signal == INPUT_SIGNAL_FINISHED_UNHANDLED) {
*outHandled = false;
} else {
- LOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
+ ALOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
mChannel->getName().string(), signal);
return UNKNOWN_ERROR;
}
@@ -552,14 +552,14 @@
status_t InputConsumer::initialize() {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' consumer ~ initialize",
+ ALOGD("channel '%s' consumer ~ initialize",
mChannel->getName().string());
#endif
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_get_size_region(ashmemFd);
if (result < 0) {
- LOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -569,7 +569,7 @@
mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
if (! mSharedMessage) {
- LOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
mChannel->getName().string(), ashmemFd);
return NO_MEMORY;
}
@@ -579,7 +579,7 @@
status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent** outEvent) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' consumer ~ consume",
+ ALOGD("channel '%s' consumer ~ consume",
mChannel->getName().string());
#endif
@@ -589,19 +589,19 @@
int result = ashmem_pin_region(ashmemFd, 0, 0);
if (result != ASHMEM_NOT_PURGED) {
if (result == ASHMEM_WAS_PURGED) {
- LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
+ ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
"which probably indicates that the publisher and consumer are out of sync.",
mChannel->getName().string(), result, ashmemFd);
return INVALID_OPERATION;
}
- LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
if (mSharedMessage->consumed) {
- LOGE("channel '%s' consumer ~ The current message has already been consumed.",
+ ALOGE("channel '%s' consumer ~ The current message has already been consumed.",
mChannel->getName().string());
return INVALID_OPERATION;
}
@@ -611,7 +611,7 @@
// consumed). Eventually the publisher will reinitialize the semaphore for the next message.
result = sem_wait(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' consumer ~ Error %d in sem_wait.",
+ ALOGE("channel '%s' consumer ~ Error %d in sem_wait.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -640,7 +640,7 @@
}
default:
- LOGE("channel '%s' consumer ~ Received message of unknown type %d",
+ ALOGE("channel '%s' consumer ~ Received message of unknown type %d",
mChannel->getName().string(), mSharedMessage->type);
return UNKNOWN_ERROR;
}
@@ -650,7 +650,7 @@
status_t InputConsumer::sendFinishedSignal(bool handled) {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' consumer ~ sendFinishedSignal: handled=%d",
+ ALOGD("channel '%s' consumer ~ sendFinishedSignal: handled=%d",
mChannel->getName().string(), handled);
#endif
@@ -661,7 +661,7 @@
status_t InputConsumer::receiveDispatchSignal() {
#if DEBUG_TRANSPORT_ACTIONS
- LOGD("channel '%s' consumer ~ receiveDispatchSignal",
+ ALOGD("channel '%s' consumer ~ receiveDispatchSignal",
mChannel->getName().string());
#endif
@@ -671,7 +671,7 @@
return result;
}
if (signal != INPUT_SIGNAL_DISPATCH) {
- LOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
+ ALOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
mChannel->getName().string(), signal);
return UNKNOWN_ERROR;
}
diff --git a/libs/ui/KeyCharacterMap.cpp b/libs/ui/KeyCharacterMap.cpp
index 77f18de..485234c 100644
--- a/libs/ui/KeyCharacterMap.cpp
+++ b/libs/ui/KeyCharacterMap.cpp
@@ -95,11 +95,11 @@
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening key character map file %s.", status, filename.string());
+ ALOGE("Error %d opening key character map file %s.", status, filename.string());
} else {
KeyCharacterMap* map = new KeyCharacterMap();
if (!map) {
- LOGE("Error allocating key character map.");
+ ALOGE("Error allocating key character map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -109,7 +109,7 @@
status = parser.parse();
#if DEBUG_PARSER_PERFORMANCE
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
- LOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
+ ALOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
elapsedTime / 1000000.0);
#endif
@@ -135,7 +135,7 @@
result = key->label;
}
#if DEBUG_MAPPING
- LOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result);
+ ALOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result);
#endif
return result;
}
@@ -147,7 +147,7 @@
result = key->number;
}
#if DEBUG_MAPPING
- LOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result);
+ ALOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result);
#endif
return result;
}
@@ -160,7 +160,7 @@
result = behavior->character;
}
#if DEBUG_MAPPING
- LOGD("getCharacter: keyCode=%d, metaState=0x%08x ~ Result %d.", keyCode, metaState, result);
+ ALOGD("getCharacter: keyCode=%d, metaState=0x%08x ~ Result %d.", keyCode, metaState, result);
#endif
return result;
}
@@ -181,7 +181,7 @@
}
}
#if DEBUG_MAPPING
- LOGD("getFallbackKeyCode: keyCode=%d, metaState=0x%08x ~ Result %s, "
+ ALOGD("getFallbackKeyCode: keyCode=%d, metaState=0x%08x ~ Result %s, "
"fallback keyCode=%d, fallback metaState=0x%08x.",
keyCode, metaState, result ? "true" : "false",
outFallbackAction->keyCode, outFallbackAction->metaState);
@@ -213,7 +213,7 @@
ExactMatch: ;
}
#if DEBUG_MAPPING
- LOGD("getMatch: keyCode=%d, chars=[%s], metaState=0x%08x ~ Result %d.",
+ ALOGD("getMatch: keyCode=%d, chars=[%s], metaState=0x%08x ~ Result %d.",
keyCode, toString(chars, numChars).string(), metaState, result);
#endif
return result;
@@ -228,7 +228,7 @@
char16_t ch = chars[i];
if (!findKey(ch, &keyCode, &metaState)) {
#if DEBUG_MAPPING
- LOGD("getEvents: deviceId=%d, chars=[%s] ~ Failed to find mapping for character %d.",
+ ALOGD("getEvents: deviceId=%d, chars=[%s] ~ Failed to find mapping for character %d.",
deviceId, toString(chars, numChars).string(), ch);
#endif
return false;
@@ -241,10 +241,10 @@
addMetaKeys(outEvents, deviceId, metaState, false, now, ¤tMetaState);
}
#if DEBUG_MAPPING
- LOGD("getEvents: deviceId=%d, chars=[%s] ~ Generated %d events.",
+ ALOGD("getEvents: deviceId=%d, chars=[%s] ~ Generated %d events.",
deviceId, toString(chars, numChars).string(), int32_t(outEvents.size()));
for (size_t i = 0; i < outEvents.size(); i++) {
- LOGD(" Key: keyCode=%d, metaState=0x%08x, %s.",
+ ALOGD(" Key: keyCode=%d, metaState=0x%08x, %s.",
outEvents[i].getKeyCode(), outEvents[i].getMetaState(),
outEvents[i].getAction() == AKEY_EVENT_ACTION_DOWN ? "down" : "up");
}
@@ -455,7 +455,7 @@
status_t KeyCharacterMap::Parser::parse() {
while (!mTokenizer->isEof()) {
#if DEBUG_PARSER
- LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
+ ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
#endif
@@ -474,7 +474,7 @@
status_t status = parseKey();
if (status) return status;
} else {
- LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
keywordToken.string());
return BAD_VALUE;
}
@@ -490,7 +490,7 @@
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -501,13 +501,13 @@
}
if (mState != STATE_TOP) {
- LOGE("%s: Unterminated key description at end of file.",
+ ALOGE("%s: Unterminated key description at end of file.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
if (mMap->mType == KEYBOARD_TYPE_UNKNOWN) {
- LOGE("%s: Missing required keyboard 'type' declaration.",
+ ALOGE("%s: Missing required keyboard 'type' declaration.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -517,7 +517,7 @@
status_t KeyCharacterMap::Parser::parseType() {
if (mMap->mType != KEYBOARD_TYPE_UNKNOWN) {
- LOGE("%s: Duplicate keyboard 'type' declaration.",
+ ALOGE("%s: Duplicate keyboard 'type' declaration.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -535,13 +535,13 @@
} else if (typeToken == "SPECIAL_FUNCTION") {
type = KEYBOARD_TYPE_SPECIAL_FUNCTION;
} else {
- LOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
typeToken.string());
return BAD_VALUE;
}
#if DEBUG_PARSER
- LOGD("Parsed type: type=%d.", type);
+ ALOGD("Parsed type: type=%d.", type);
#endif
mMap->mType = type;
return NO_ERROR;
@@ -551,12 +551,12 @@
String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
if (!keyCode) {
- LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
if (mMap->mKeys.indexOfKey(keyCode) >= 0) {
- LOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
@@ -564,13 +564,13 @@
mTokenizer->skipDelimiters(WHITESPACE);
String8 openBraceToken = mTokenizer->nextToken(WHITESPACE);
if (openBraceToken != "{") {
- LOGE("%s: Expected '{' after key code label, got '%s'.",
+ ALOGE("%s: Expected '{' after key code label, got '%s'.",
mTokenizer->getLocation().string(), openBraceToken.string());
return BAD_VALUE;
}
#if DEBUG_PARSER
- LOGD("Parsed beginning of key: keyCode=%d.", keyCode);
+ ALOGD("Parsed beginning of key: keyCode=%d.", keyCode);
#endif
mKeyCode = keyCode;
mMap->mKeys.add(keyCode, new Key());
@@ -597,7 +597,7 @@
int32_t metaState;
status_t status = parseModifier(token, &metaState);
if (status) {
- LOGE("%s: Expected a property name or modifier, got '%s'.",
+ ALOGE("%s: Expected a property name or modifier, got '%s'.",
mTokenizer->getLocation().string(), token.string());
return status;
}
@@ -616,7 +616,7 @@
}
}
- LOGE("%s: Expected ',' or ':' after property name.",
+ ALOGE("%s: Expected ',' or ':' after property name.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -634,12 +634,12 @@
char16_t character;
status_t status = parseCharacterLiteral(&character);
if (status || !character) {
- LOGE("%s: Invalid character literal for key.",
+ ALOGE("%s: Invalid character literal for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
if (haveCharacter) {
- LOGE("%s: Cannot combine multiple character literals or 'none'.",
+ ALOGE("%s: Cannot combine multiple character literals or 'none'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -649,7 +649,7 @@
token = mTokenizer->nextToken(WHITESPACE);
if (token == "none") {
if (haveCharacter) {
- LOGE("%s: Cannot combine multiple character literals or 'none'.",
+ ALOGE("%s: Cannot combine multiple character literals or 'none'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -659,20 +659,20 @@
token = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(token.string());
if (!keyCode) {
- LOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
+ ALOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
mTokenizer->getLocation().string(),
token.string());
return BAD_VALUE;
}
if (haveFallback) {
- LOGE("%s: Cannot combine multiple fallback key codes.",
+ ALOGE("%s: Cannot combine multiple fallback key codes.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
behavior.fallbackKeyCode = keyCode;
haveFallback = true;
} else {
- LOGE("%s: Expected a key behavior after ':'.",
+ ALOGE("%s: Expected a key behavior after ':'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -688,30 +688,30 @@
switch (property.property) {
case PROPERTY_LABEL:
if (key->label) {
- LOGE("%s: Duplicate label for key.",
+ ALOGE("%s: Duplicate label for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
key->label = behavior.character;
#if DEBUG_PARSER
- LOGD("Parsed key label: keyCode=%d, label=%d.", mKeyCode, key->label);
+ ALOGD("Parsed key label: keyCode=%d, label=%d.", mKeyCode, key->label);
#endif
break;
case PROPERTY_NUMBER:
if (key->number) {
- LOGE("%s: Duplicate number for key.",
+ ALOGE("%s: Duplicate number for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
key->number = behavior.character;
#if DEBUG_PARSER
- LOGD("Parsed key number: keyCode=%d, number=%d.", mKeyCode, key->number);
+ ALOGD("Parsed key number: keyCode=%d, number=%d.", mKeyCode, key->number);
#endif
break;
case PROPERTY_META: {
for (Behavior* b = key->firstBehavior; b; b = b->next) {
if (b->metaState == property.metaState) {
- LOGE("%s: Duplicate key behavior for modifier.",
+ ALOGE("%s: Duplicate key behavior for modifier.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -721,7 +721,7 @@
newBehavior->next = key->firstBehavior;
key->firstBehavior = newBehavior;
#if DEBUG_PARSER
- LOGD("Parsed key meta: keyCode=%d, meta=0x%x, char=%d, fallback=%d.", mKeyCode,
+ ALOGD("Parsed key meta: keyCode=%d, meta=0x%x, char=%d, fallback=%d.", mKeyCode,
newBehavior->metaState, newBehavior->character, newBehavior->fallbackKeyCode);
#endif
break;
@@ -757,7 +757,7 @@
return BAD_VALUE;
}
if (combinedMeta & metaState) {
- LOGE("%s: Duplicate modifier combination '%s'.",
+ ALOGE("%s: Duplicate modifier combination '%s'.",
mTokenizer->getLocation().string(), token.string());
return BAD_VALUE;
}
@@ -831,7 +831,7 @@
}
Error:
- LOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
+ ALOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
return BAD_VALUE;
}
diff --git a/libs/ui/KeyLayoutMap.cpp b/libs/ui/KeyLayoutMap.cpp
index 8626a03..44a9420 100644
--- a/libs/ui/KeyLayoutMap.cpp
+++ b/libs/ui/KeyLayoutMap.cpp
@@ -53,11 +53,11 @@
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening key layout map file %s.", status, filename.string());
+ ALOGE("Error %d opening key layout map file %s.", status, filename.string());
} else {
KeyLayoutMap* map = new KeyLayoutMap();
if (!map) {
- LOGE("Error allocating key layout map.");
+ ALOGE("Error allocating key layout map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -67,7 +67,7 @@
status = parser.parse();
#if DEBUG_PARSER_PERFORMANCE
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
- LOGD("Parsed key layout map file '%s' %d lines in %0.3fms.",
+ ALOGD("Parsed key layout map file '%s' %d lines in %0.3fms.",
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
elapsedTime / 1000000.0);
#endif
@@ -86,7 +86,7 @@
ssize_t index = mKeys.indexOfKey(scanCode);
if (index < 0) {
#if DEBUG_MAPPING
- LOGD("mapKey: scanCode=%d ~ Failed.", scanCode);
+ ALOGD("mapKey: scanCode=%d ~ Failed.", scanCode);
#endif
*keyCode = AKEYCODE_UNKNOWN;
*flags = 0;
@@ -98,7 +98,7 @@
*flags = k.flags;
#if DEBUG_MAPPING
- LOGD("mapKey: scanCode=%d ~ Result keyCode=%d, flags=0x%08x.", scanCode, *keyCode, *flags);
+ ALOGD("mapKey: scanCode=%d ~ Result keyCode=%d, flags=0x%08x.", scanCode, *keyCode, *flags);
#endif
return NO_ERROR;
}
@@ -117,7 +117,7 @@
ssize_t index = mAxes.indexOfKey(scanCode);
if (index < 0) {
#if DEBUG_MAPPING
- LOGD("mapAxis: scanCode=%d ~ Failed.", scanCode);
+ ALOGD("mapAxis: scanCode=%d ~ Failed.", scanCode);
#endif
return NAME_NOT_FOUND;
}
@@ -125,7 +125,7 @@
*outAxisInfo = mAxes.valueAt(index);
#if DEBUG_MAPPING
- LOGD("mapAxis: scanCode=%d ~ Result mode=%d, axis=%d, highAxis=%d, "
+ ALOGD("mapAxis: scanCode=%d ~ Result mode=%d, axis=%d, highAxis=%d, "
"splitValue=%d, flatOverride=%d.",
scanCode,
outAxisInfo->mode, outAxisInfo->axis, outAxisInfo->highAxis,
@@ -147,7 +147,7 @@
status_t KeyLayoutMap::Parser::parse() {
while (!mTokenizer->isEof()) {
#if DEBUG_PARSER
- LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
+ ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
#endif
@@ -164,14 +164,14 @@
status_t status = parseAxis();
if (status) return status;
} else {
- LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
keywordToken.string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -188,12 +188,12 @@
char* end;
int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
if (mMap->mKeys.indexOfKey(scanCode) >= 0) {
- LOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
@@ -202,7 +202,7 @@
String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
if (!keyCode) {
- LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
@@ -215,12 +215,12 @@
String8 flagToken = mTokenizer->nextToken(WHITESPACE);
uint32_t flag = getKeyFlagByLabel(flagToken.string());
if (!flag) {
- LOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
flagToken.string());
return BAD_VALUE;
}
if (flags & flag) {
- LOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
flagToken.string());
return BAD_VALUE;
}
@@ -228,7 +228,7 @@
}
#if DEBUG_PARSER
- LOGD("Parsed key: scanCode=%d, keyCode=%d, flags=0x%08x.", scanCode, keyCode, flags);
+ ALOGD("Parsed key: scanCode=%d, keyCode=%d, flags=0x%08x.", scanCode, keyCode, flags);
#endif
Key key;
key.keyCode = keyCode;
@@ -242,12 +242,12 @@
char* end;
int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
if (mMap->mAxes.indexOfKey(scanCode) >= 0) {
- LOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
@@ -263,7 +263,7 @@
String8 axisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.axis = getAxisByLabel(axisToken.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected inverted axis label, got '%s'.",
+ ALOGE("%s: Expected inverted axis label, got '%s'.",
mTokenizer->getLocation().string(), axisToken.string());
return BAD_VALUE;
}
@@ -274,7 +274,7 @@
String8 splitToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.splitValue = int32_t(strtol(splitToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected split value, got '%s'.",
+ ALOGE("%s: Expected split value, got '%s'.",
mTokenizer->getLocation().string(), splitToken.string());
return BAD_VALUE;
}
@@ -283,7 +283,7 @@
String8 lowAxisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.axis = getAxisByLabel(lowAxisToken.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected low axis label, got '%s'.",
+ ALOGE("%s: Expected low axis label, got '%s'.",
mTokenizer->getLocation().string(), lowAxisToken.string());
return BAD_VALUE;
}
@@ -292,14 +292,14 @@
String8 highAxisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.highAxis = getAxisByLabel(highAxisToken.string());
if (axisInfo.highAxis < 0) {
- LOGE("%s: Expected high axis label, got '%s'.",
+ ALOGE("%s: Expected high axis label, got '%s'.",
mTokenizer->getLocation().string(), highAxisToken.string());
return BAD_VALUE;
}
} else {
axisInfo.axis = getAxisByLabel(token.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
+ ALOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
mTokenizer->getLocation().string(), token.string());
return BAD_VALUE;
}
@@ -316,19 +316,19 @@
String8 flatToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.flatOverride = int32_t(strtol(flatToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected flat value, got '%s'.",
+ ALOGE("%s: Expected flat value, got '%s'.",
mTokenizer->getLocation().string(), flatToken.string());
return BAD_VALUE;
}
} else {
- LOGE("%s: Expected keyword 'flat', got '%s'.",
+ ALOGE("%s: Expected keyword 'flat', got '%s'.",
mTokenizer->getLocation().string(), keywordToken.string());
return BAD_VALUE;
}
}
#if DEBUG_PARSER
- LOGD("Parsed axis: scanCode=%d, mode=%d, axis=%d, highAxis=%d, "
+ ALOGD("Parsed axis: scanCode=%d, mode=%d, axis=%d, highAxis=%d, "
"splitValue=%d, flatOverride=%d.",
scanCode,
axisInfo.mode, axisInfo.axis, axisInfo.highAxis,
diff --git a/libs/ui/Keyboard.cpp b/libs/ui/Keyboard.cpp
index 10bb39c..e4611f7 100644
--- a/libs/ui/Keyboard.cpp
+++ b/libs/ui/Keyboard.cpp
@@ -50,7 +50,7 @@
keyLayoutName)) {
status_t status = loadKeyLayout(deviceIdenfifier, keyLayoutName);
if (status == NAME_NOT_FOUND) {
- LOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
+ ALOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
"it was not found.",
deviceIdenfifier.name.string(), keyLayoutName.string());
}
@@ -61,7 +61,7 @@
keyCharacterMapName)) {
status_t status = loadKeyCharacterMap(deviceIdenfifier, keyCharacterMapName);
if (status == NAME_NOT_FOUND) {
- LOGE("Configuration for keyboard device '%s' requested keyboard character "
+ ALOGE("Configuration for keyboard device '%s' requested keyboard character "
"map '%s' but it was not found.",
deviceIdenfifier.name.string(), keyLayoutName.string());
}
@@ -90,7 +90,7 @@
}
// Give up!
- LOGE("Could not determine key map for device '%s' and no default key maps were found!",
+ ALOGE("Could not determine key map for device '%s' and no default key maps were found!",
deviceIdenfifier.name.string());
return NAME_NOT_FOUND;
}
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index 5656088..8cd047a 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -69,7 +69,7 @@
Region::Region(const void* buffer)
{
status_t err = read(buffer);
- LOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
+ ALOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
}
Region::~Region()
@@ -272,7 +272,7 @@
}
virtual void operator()(const Rect& rect) {
- //LOGD(">>> %3d, %3d, %3d, %3d",
+ //ALOGD(">>> %3d, %3d, %3d, %3d",
// rect.left, rect.top, rect.right, rect.bottom);
if (span.size()) {
if (cur->top != rect.top) {
@@ -338,15 +338,15 @@
b.bottom = b.bottom > cur->bottom ? b.bottom : cur->bottom;
if (cur->top == prev->top) {
if (cur->bottom != prev->bottom) {
- LOGE("%s: invalid span %p", name, cur);
+ ALOGE("%s: invalid span %p", name, cur);
result = false;
} else if (cur->left < prev->right) {
- LOGE("%s: spans overlap horizontally prev=%p, cur=%p",
+ ALOGE("%s: spans overlap horizontally prev=%p, cur=%p",
name, prev, cur);
result = false;
}
} else if (cur->top < prev->bottom) {
- LOGE("%s: spans overlap vertically prev=%p, cur=%p",
+ ALOGE("%s: spans overlap vertically prev=%p, cur=%p",
name, prev, cur);
result = false;
}
@@ -355,7 +355,7 @@
}
if (b != reg.getBounds()) {
result = false;
- LOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
+ ALOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
b.left, b.top, b.right, b.bottom,
reg.getBounds().left, reg.getBounds().top,
reg.getBounds().right, reg.getBounds().bottom);
@@ -457,14 +457,14 @@
}
if(!same) {
- LOGD("---\nregion boolean %s failed", name);
+ ALOGD("---\nregion boolean %s failed", name);
lhs.dump("lhs");
rhs.dump("rhs");
dst.dump("dst");
- LOGD("should be");
+ ALOGD("should be");
SkRegion::Iterator it(sk_dst);
while (!it.done()) {
- LOGD(" [%3d, %3d, %3d, %3d]",
+ ALOGD(" [%3d, %3d, %3d, %3d]",
it.rect().fLeft,
it.rect().fTop,
it.rect().fRight,
@@ -480,7 +480,7 @@
const Rect& rhs, int dx, int dy)
{
if (!rhs.isValid()) {
- LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
+ ALOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
op, rhs.left, rhs.top, rhs.right, rhs.bottom);
return;
}
@@ -647,9 +647,9 @@
(void)flags;
const_iterator head = begin();
const_iterator const tail = end();
- LOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);
+ ALOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);
while (head != tail) {
- LOGD(" [%3d, %3d, %3d, %3d]\n",
+ ALOGD(" [%3d, %3d, %3d, %3d]\n",
head->left, head->top, head->right, head->bottom);
head++;
}
diff --git a/libs/ui/VirtualKeyMap.cpp b/libs/ui/VirtualKeyMap.cpp
index e756cdd..62d5b59 100644
--- a/libs/ui/VirtualKeyMap.cpp
+++ b/libs/ui/VirtualKeyMap.cpp
@@ -51,11 +51,11 @@
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening virtual key map file %s.", status, filename.string());
+ ALOGE("Error %d opening virtual key map file %s.", status, filename.string());
} else {
VirtualKeyMap* map = new VirtualKeyMap();
if (!map) {
- LOGE("Error allocating virtual key map.");
+ ALOGE("Error allocating virtual key map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -65,7 +65,7 @@
status = parser.parse();
#if DEBUG_PARSER_PERFORMANCE
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
- LOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
+ ALOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
elapsedTime / 1000000.0);
#endif
@@ -93,7 +93,7 @@
status_t VirtualKeyMap::Parser::parse() {
while (!mTokenizer->isEof()) {
#if DEBUG_PARSER
- LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
+ ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
#endif
@@ -104,7 +104,7 @@
do {
String8 token = mTokenizer->nextToken(WHITESPACE_OR_FIELD_DELIMITER);
if (token != "0x01") {
- LOGE("%s: Unknown virtual key type, expected 0x01.",
+ ALOGE("%s: Unknown virtual key type, expected 0x01.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -116,13 +116,13 @@
&& parseNextIntField(&defn.width)
&& parseNextIntField(&defn.height);
if (!success) {
- LOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
+ ALOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
#if DEBUG_PARSER
- LOGD("Parsed virtual key: scanCode=%d, centerX=%d, centerY=%d, "
+ ALOGD("Parsed virtual key: scanCode=%d, centerX=%d, centerY=%d, "
"width=%d, height=%d",
defn.scanCode, defn.centerX, defn.centerY, defn.width, defn.height);
#endif
@@ -130,7 +130,7 @@
} while (consumeFieldDelimiterAndSkipWhitespace());
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -162,7 +162,7 @@
char* end;
*outValue = strtol(token.string(), &end, 0);
if (token.isEmpty() || *end != '\0') {
- LOGE("Expected an integer, got '%s'.", token.string());
+ ALOGE("Expected an integer, got '%s'.", token.string());
return false;
}
return true;
diff --git a/libs/ui/tests/region/region.cpp b/libs/ui/tests/region/region.cpp
index ef15de9..6347294 100644
--- a/libs/ui/tests/region/region.cpp
+++ b/libs/ui/tests/region/region.cpp
@@ -58,7 +58,7 @@
//reg2.dump("reg2");
//reg3.dump("reg3");
- LOGD("---");
+ ALOGD("---");
reg2 = reg0 | reg0.translate(100, 0);
reg0.dump("reg0");
reg1.dump("reg1");
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
/* 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 @@
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 @@
return NULL;
}
- LOGV(" getBuffer: mapped\n");
+ ALOGV(" getBuffer: mapped\n");
mMap = map;
if (!wordAligned) {
@@ -648,17 +648,17 @@
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 @@
*/
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;
}
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index 22034c5..47a2b99 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -117,14 +117,14 @@
mCacheMode(cacheMode), mCacheValid(false)
{
int count = android_atomic_inc(&gCount)+1;
- //LOGI("Creating AssetManager %p #%d\n", this, count);
+ //ALOGI("Creating AssetManager %p #%d\n", this, count);
memset(mConfig, 0, sizeof(ResTable_config));
}
AssetManager::~AssetManager(void)
{
int count = android_atomic_dec(&gCount);
- //LOGI("Destroying AssetManager in %p #%d\n", this, count);
+ //ALOGI("Destroying AssetManager in %p #%d\n", this, count);
delete mConfig;
delete mResources;
@@ -151,7 +151,7 @@
ap.path = path;
ap.type = ::getFileType(path.string());
if (ap.type != kFileTypeDirectory && ap.type != kFileTypeRegular) {
- LOGW("Asset path %s is neither a directory nor file (type=%d).",
+ ALOGW("Asset path %s is neither a directory nor file (type=%d).",
path.string(), (int)ap.type);
return false;
}
@@ -167,7 +167,7 @@
}
}
- LOGV("In %p Asset %s path: %s", this,
+ ALOGV("In %p Asset %s path: %s", this,
ap.type == kFileTypeDirectory ? "dir" : "zip", ap.path.string());
mAssetPaths.add(ap);
@@ -200,7 +200,7 @@
if (addOverlay) {
mAssetPaths.add(oap);
} else {
- LOGW("failed to add overlay package %s\n", overlayPath.string());
+ ALOGW("failed to add overlay package %s\n", overlayPath.string());
}
}
}
@@ -216,17 +216,17 @@
if (errno == ENOENT) {
return true; // non-existing idmap is always stale
} else {
- LOGW("failed to stat file %s: %s\n", idmapPath.string(), strerror(errno));
+ ALOGW("failed to stat file %s: %s\n", idmapPath.string(), strerror(errno));
return false;
}
}
if (st.st_size < ResTable::IDMAP_HEADER_SIZE_BYTES) {
- LOGW("file %s has unexpectedly small size=%zd\n", idmapPath.string(), (size_t)st.st_size);
+ ALOGW("file %s has unexpectedly small size=%zd\n", idmapPath.string(), (size_t)st.st_size);
return false;
}
int fd = TEMP_FAILURE_RETRY(::open(idmapPath.string(), O_RDONLY));
if (fd == -1) {
- LOGW("failed to open file %s: %s\n", idmapPath.string(), strerror(errno));
+ ALOGW("failed to open file %s: %s\n", idmapPath.string(), strerror(errno));
return false;
}
char buf[ResTable::IDMAP_HEADER_SIZE_BYTES];
@@ -283,7 +283,7 @@
bool AssetManager::createIdmapFileLocked(const String8& originalPath, const String8& overlayPath,
const String8& idmapPath)
{
- LOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
+ ALOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
__FUNCTION__, originalPath.string(), overlayPath.string(), idmapPath.string());
ResTable tables[2];
const String8* paths[2] = { &originalPath, &overlayPath };
@@ -300,24 +300,24 @@
ap.path = *paths[i];
Asset* ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
if (ass == NULL) {
- LOGW("failed to find resources.arsc in %s\n", ap.path.string());
+ ALOGW("failed to find resources.arsc in %s\n", ap.path.string());
goto error;
}
tables[i].add(ass, (void*)1, false);
}
if (!getZipEntryCrcLocked(originalPath, "resources.arsc", &originalCrc)) {
- LOGW("failed to retrieve crc for resources.arsc in %s\n", originalPath.string());
+ ALOGW("failed to retrieve crc for resources.arsc in %s\n", originalPath.string());
goto error;
}
if (!getZipEntryCrcLocked(overlayPath, "resources.arsc", &overlayCrc)) {
- LOGW("failed to retrieve crc for resources.arsc in %s\n", overlayPath.string());
+ ALOGW("failed to retrieve crc for resources.arsc in %s\n", overlayPath.string());
goto error;
}
if (tables[0].createIdmap(tables[1], originalCrc, overlayCrc,
(void**)&data, &size) != NO_ERROR) {
- LOGW("failed to generate idmap data for file %s\n", idmapPath.string());
+ ALOGW("failed to generate idmap data for file %s\n", idmapPath.string());
goto error;
}
@@ -326,13 +326,13 @@
// installd).
fd = TEMP_FAILURE_RETRY(::open(idmapPath.string(), O_WRONLY | O_CREAT | O_TRUNC, 0644));
if (fd == -1) {
- LOGW("failed to write idmap file %s (open: %s)\n", idmapPath.string(), strerror(errno));
+ ALOGW("failed to write idmap file %s (open: %s)\n", idmapPath.string(), strerror(errno));
goto error_free;
}
for (;;) {
ssize_t written = TEMP_FAILURE_RETRY(write(fd, data + offset, size));
if (written < 0) {
- LOGW("failed to write idmap file %s (write: %s)\n", idmapPath.string(),
+ ALOGW("failed to write idmap file %s (write: %s)\n", idmapPath.string(),
strerror(errno));
goto error_close;
}
@@ -498,7 +498,7 @@
size_t i = mAssetPaths.size();
while (i > 0) {
i--;
- LOGV("Looking for asset '%s' in '%s'\n",
+ ALOGV("Looking for asset '%s' in '%s'\n",
assetName.string(), mAssetPaths.itemAt(i).path.string());
Asset* pAsset = openNonAssetInPathLocked(assetName.string(), mode, mAssetPaths.itemAt(i));
if (pAsset != NULL) {
@@ -532,7 +532,7 @@
size_t i = mAssetPaths.size();
while (i > 0) {
i--;
- LOGV("Looking for non-asset '%s' in '%s'\n", fileName, mAssetPaths.itemAt(i).path.string());
+ ALOGV("Looking for non-asset '%s' in '%s'\n", fileName, mAssetPaths.itemAt(i).path.string());
Asset* pAsset = openNonAssetInPathLocked(
fileName, mode, mAssetPaths.itemAt(i));
if (pAsset != NULL) {
@@ -556,7 +556,7 @@
loadFileNameCacheLocked();
if (which < mAssetPaths.size()) {
- LOGV("Looking for non-asset '%s' in '%s'\n", fileName,
+ ALOGV("Looking for non-asset '%s' in '%s'\n", fileName,
mAssetPaths.itemAt(which).path.string());
Asset* pAsset = openNonAssetInPathLocked(
fileName, mode, mAssetPaths.itemAt(which));
@@ -621,7 +621,7 @@
bool shared = true;
const asset_path& ap = mAssetPaths.itemAt(i);
Asset* idmap = openIdmapLocked(ap);
- LOGV("Looking for resource asset in '%s'\n", ap.path.string());
+ ALOGV("Looking for resource asset in '%s'\n", ap.path.string());
if (ap.type != kFileTypeDirectory) {
if (i == 0) {
// The first item is typically the framework resources,
@@ -633,7 +633,7 @@
ass = const_cast<AssetManager*>(this)->
mZipSet.getZipResourceTableAsset(ap.path);
if (ass == NULL) {
- LOGV("loading resource table %s\n", ap.path.string());
+ ALOGV("loading resource table %s\n", ap.path.string());
ass = const_cast<AssetManager*>(this)->
openNonAssetInPathLocked("resources.arsc",
Asset::ACCESS_BUFFER,
@@ -648,7 +648,7 @@
// If this is the first resource table in the asset
// manager, then we are going to cache it so that we
// can quickly copy it out for others.
- LOGV("Creating shared resources for %s", ap.path.string());
+ ALOGV("Creating shared resources for %s", ap.path.string());
sharedRes = new ResTable();
sharedRes->add(ass, (void*)(i+1), false, idmap);
sharedRes = const_cast<AssetManager*>(this)->
@@ -656,7 +656,7 @@
}
}
} else {
- LOGV("loading resource table %s\n", ap.path.string());
+ ALOGV("loading resource table %s\n", ap.path.string());
Asset* ass = const_cast<AssetManager*>(this)->
openNonAssetInPathLocked("resources.arsc",
Asset::ACCESS_BUFFER,
@@ -668,12 +668,12 @@
mResources = rt = new ResTable();
updateResourceParamsLocked();
}
- LOGV("Installing resource asset %p in to table %p\n", ass, mResources);
+ ALOGV("Installing resource asset %p in to table %p\n", ass, mResources);
if (sharedRes != NULL) {
- LOGV("Copying existing resources for %s", ap.path.string());
+ ALOGV("Copying existing resources for %s", ap.path.string());
rt->add(sharedRes);
} else {
- LOGV("Parsing resources for %s", ap.path.string());
+ ALOGV("Parsing resources for %s", ap.path.string());
rt->add(ass, (void*)(i+1), !shared, idmap);
}
@@ -686,7 +686,7 @@
}
}
- if (required && !rt) LOGW("Unable to find resources file resources.arsc");
+ if (required && !rt) ALOGW("Unable to find resources file resources.arsc");
if (!rt) {
mResources = rt = new ResTable();
}
@@ -725,9 +725,9 @@
ass = const_cast<AssetManager*>(this)->
openAssetFromFileLocked(ap.idmap, Asset::ACCESS_BUFFER);
if (ass) {
- LOGV("loading idmap %s\n", ap.idmap.string());
+ ALOGV("loading idmap %s\n", ap.idmap.string());
} else {
- LOGW("failed to load idmap %s\n", ap.idmap.string());
+ ALOGW("failed to load idmap %s\n", ap.idmap.string());
}
}
return ass;
@@ -923,7 +923,7 @@
*/
if (found) {
if (pAsset == NULL)
- LOGD("Expected file not found: '%s'\n", path.string());
+ ALOGD("Expected file not found: '%s'\n", path.string());
return pAsset;
}
}
@@ -1019,7 +1019,7 @@
*/
ZipFileRO* AssetManager::getZipFileLocked(const asset_path& ap)
{
- LOGV("getZipFileLocked() in %p\n", this);
+ ALOGV("getZipFileLocked() in %p\n", this);
return mZipSet.getZip(ap.path);
}
@@ -1074,29 +1074,29 @@
if (!pZipFile->getEntryInfo(entry, &method, &uncompressedLen, NULL, NULL,
NULL, NULL))
{
- LOGW("getEntryInfo failed\n");
+ ALOGW("getEntryInfo failed\n");
return NULL;
}
FileMap* dataMap = pZipFile->createEntryFileMap(entry);
if (dataMap == NULL) {
- LOGW("create map from entry failed\n");
+ ALOGW("create map from entry failed\n");
return NULL;
}
if (method == ZipFileRO::kCompressStored) {
pAsset = Asset::createFromUncompressedMap(dataMap, mode);
- LOGV("Opened uncompressed entry %s in zip %s mode %d: %p", entryName.string(),
+ ALOGV("Opened uncompressed entry %s in zip %s mode %d: %p", entryName.string(),
dataMap->getFileName(), mode, pAsset);
} else {
pAsset = Asset::createFromCompressedMap(dataMap, method,
uncompressedLen, mode);
- LOGV("Opened compressed entry %s in zip %s mode %d: %p", entryName.string(),
+ ALOGV("Opened compressed entry %s in zip %s mode %d: %p", entryName.string(),
dataMap->getFileName(), mode, pAsset);
}
if (pAsset == NULL) {
/* unexpected */
- LOGW("create from segment failed\n");
+ ALOGW("create from segment failed\n");
}
return pAsset;
@@ -1146,10 +1146,10 @@
i--;
const asset_path& ap = mAssetPaths.itemAt(i);
if (ap.type == kFileTypeRegular) {
- LOGV("Adding directory %s from zip %s", dirName, ap.path.string());
+ ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
scanAndMergeZipLocked(pMergedInfo, ap, kAssetsRoot, dirName);
} else {
- LOGV("Adding directory %s from dir %s", dirName, ap.path.string());
+ ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
scanAndMergeDirLocked(pMergedInfo, ap, kAssetsRoot, dirName);
}
}
@@ -1200,10 +1200,10 @@
if (which < mAssetPaths.size()) {
const asset_path& ap = mAssetPaths.itemAt(which);
if (ap.type == kFileTypeRegular) {
- LOGV("Adding directory %s from zip %s", dirName, ap.path.string());
+ ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
scanAndMergeZipLocked(pMergedInfo, ap, NULL, dirName);
} else {
- LOGV("Adding directory %s from dir %s", dirName, ap.path.string());
+ ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
scanAndMergeDirLocked(pMergedInfo, ap, NULL, dirName);
}
}
@@ -1325,7 +1325,7 @@
matchIdx = AssetDir::FileInfo::findEntry(pMergedInfo, match);
if (matchIdx > 0) {
- LOGV("Excluding '%s' [%s]\n",
+ ALOGV("Excluding '%s' [%s]\n",
pMergedInfo->itemAt(matchIdx).getFileName().string(),
pMergedInfo->itemAt(matchIdx).getSourceName().string());
pMergedInfo->removeAt(matchIdx);
@@ -1333,7 +1333,7 @@
//printf("+++ no match on '%s'\n", (const char*) match);
}
- LOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
+ ALOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
pContents->removeAt(i);
i--; // adjust "for" loop
count--; // and loop limit
@@ -1365,7 +1365,7 @@
struct dirent* entry;
FileType fileType;
- LOGV("Scanning dir '%s'\n", path.string());
+ ALOGV("Scanning dir '%s'\n", path.string());
dir = opendir(path.string());
if (dir == NULL)
@@ -1427,7 +1427,7 @@
pZip = mZipSet.getZip(ap.path);
if (pZip == NULL) {
- LOGW("Failure opening zip %s\n", ap.path.string());
+ ALOGW("Failure opening zip %s\n", ap.path.string());
return false;
}
@@ -1461,7 +1461,7 @@
entry = pZip->findEntryByIndex(i);
if (pZip->getEntryFileName(entry, nameBuf, sizeof(nameBuf)) != 0) {
// TODO: fix this if we expect to have long names
- LOGE("ARGH: name too long?\n");
+ ALOGE("ARGH: name too long?\n");
continue;
}
//printf("Comparing %s in %s?\n", nameBuf, dirName.string());
@@ -1652,7 +1652,7 @@
#ifdef DO_TIMINGS
timer.stop();
- LOGD("Cache scan took %.3fms\n",
+ ALOGD("Cache scan took %.3fms\n",
timer.durationUsecs() / 1000.0);
#endif
@@ -1780,11 +1780,11 @@
: mPath(path), mZipFile(NULL), mModWhen(modWhen),
mResourceTableAsset(NULL), mResourceTable(NULL)
{
- //LOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
+ //ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
mZipFile = new ZipFileRO;
- LOGV("+++ opening zip '%s'\n", mPath.string());
+ ALOGV("+++ opening zip '%s'\n", mPath.string());
if (mZipFile->open(mPath.string()) != NO_ERROR) {
- LOGD("failed to open Zip archive '%s'\n", mPath.string());
+ ALOGD("failed to open Zip archive '%s'\n", mPath.string());
delete mZipFile;
mZipFile = NULL;
}
@@ -1811,7 +1811,7 @@
Asset* AssetManager::SharedZip::getResourceTableAsset()
{
- LOGV("Getting from SharedZip %p resource asset %p\n", this, mResourceTableAsset);
+ ALOGV("Getting from SharedZip %p resource asset %p\n", this, mResourceTableAsset);
return mResourceTableAsset;
}
@@ -1833,7 +1833,7 @@
ResTable* AssetManager::SharedZip::getResourceTable()
{
- LOGV("Getting from SharedZip %p resource table %p\n", this, mResourceTable);
+ ALOGV("Getting from SharedZip %p resource table %p\n", this, mResourceTable);
return mResourceTable;
}
@@ -1858,7 +1858,7 @@
AssetManager::SharedZip::~SharedZip()
{
- //LOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
+ //ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
if (mResourceTable != NULL) {
delete mResourceTable;
}
@@ -1867,7 +1867,7 @@
}
if (mZipFile != NULL) {
delete mZipFile;
- LOGV("Closed '%s'\n", mPath.string());
+ ALOGV("Closed '%s'\n", mPath.string());
}
}
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index 8791263..f956306 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -78,7 +78,7 @@
paddingSize = padding_extra(n);
if (paddingSize > 0) {
uint32_t padding = 0xbcbcbcbc;
- if (DEBUG) LOGI("writing %d padding bytes for %d", paddingSize, n);
+ if (DEBUG) ALOGI("writing %d padding bytes for %d", paddingSize, n);
amt = write(m_fd, &padding, paddingSize);
if (amt != paddingSize) {
m_status = errno;
@@ -112,8 +112,8 @@
k = key;
}
if (DEBUG) {
- LOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
- dataSize);
+ ALOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(),
+ key.string(), dataSize);
}
entity_header_v1 header;
@@ -125,7 +125,7 @@
header.keyLen = tolel(keyLen);
header.dataSize = tolel(dataSize);
- if (DEBUG) LOGI("writing entity header, %d bytes", sizeof(entity_header_v1));
+ if (DEBUG) ALOGI("writing entity header, %d bytes", sizeof(entity_header_v1));
amt = write(m_fd, &header, sizeof(entity_header_v1));
if (amt != sizeof(entity_header_v1)) {
m_status = errno;
@@ -133,7 +133,7 @@
}
m_pos += amt;
- if (DEBUG) LOGI("writing entity header key, %d bytes", keyLen+1);
+ if (DEBUG) ALOGI("writing entity header key, %d bytes", keyLen+1);
amt = write(m_fd, k.string(), keyLen+1);
if (amt != keyLen+1) {
m_status = errno;
@@ -151,11 +151,11 @@
status_t
BackupDataWriter::WriteEntityData(const void* data, size_t size)
{
- if (DEBUG) LOGD("Writing data: size=%lu", (unsigned long) size);
+ if (DEBUG) ALOGD("Writing data: size=%lu", (unsigned long) size);
if (m_status != NO_ERROR) {
if (DEBUG) {
- LOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
+ ALOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
}
return m_status;
}
@@ -166,7 +166,7 @@
ssize_t amt = write(m_fd, data, size);
if (amt != (ssize_t)size) {
m_status = errno;
- if (DEBUG) LOGD("write returned error %d (%s)", m_status, strerror(m_status));
+ if (DEBUG) ALOGD("write returned error %d (%s)", m_status, strerror(m_status));
return m_status;
}
m_pos += amt;
@@ -208,7 +208,7 @@
m_done = true; \
} else { \
m_status = errno; \
- LOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
+ ALOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
long(actual), long(expected), __LINE__, strerror(m_status)); \
} \
return m_status; \
@@ -218,7 +218,7 @@
do { \
status_t err = skip_padding(); \
if (err != NO_ERROR) { \
- LOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
+ ALOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
m_status = err; \
return err; \
} \
@@ -261,7 +261,7 @@
{
m_header.entity.keyLen = fromlel(m_header.entity.keyLen);
if (m_header.entity.keyLen <= 0) {
- LOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
+ ALOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
(int)m_header.entity.keyLen);
m_status = EINVAL;
}
@@ -285,7 +285,7 @@
break;
}
default:
- LOGD("Chunk header at %d has invalid type: 0x%08x",
+ ALOGD("Chunk header at %d has invalid type: 0x%08x",
(int)(m_pos - sizeof(m_header)), (int)m_header.type);
m_status = EINVAL;
}
@@ -339,7 +339,7 @@
return -1;
}
int remaining = m_dataEndPos - m_pos;
- //LOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
+ //ALOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
// size, m_pos, m_dataEndPos, remaining);
if (remaining <= 0) {
return 0;
@@ -347,7 +347,7 @@
if (((int)size) > remaining) {
size = remaining;
}
- //LOGD(" reading %d bytes", size);
+ //ALOGD(" reading %d bytes", size);
int amt = read(m_fd, data, size);
if (amt < 0) {
m_status = errno;
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index 7ef30f9..f77a891 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -74,7 +74,7 @@
#if TEST_BACKUP_HELPERS
#define LOGP(f, x...) printf(f "\n", x)
#else
-#define LOGP(x...) LOGD(x)
+#define LOGP(x...) ALOGD(x)
#endif
#endif
@@ -100,7 +100,7 @@
bytesRead += amt;
if (header.magic0 != MAGIC0 || header.magic1 != MAGIC1) {
- LOGW("read_snapshot_file header.magic0=0x%08x magic1=0x%08x", header.magic0, header.magic1);
+ ALOGW("read_snapshot_file header.magic0=0x%08x magic1=0x%08x", header.magic0, header.magic1);
return 1;
}
@@ -110,7 +110,7 @@
amt = read(fd, &file, sizeof(FileState));
if (amt != sizeof(FileState)) {
- LOGW("read_snapshot_file FileState truncated/error with read at %d bytes\n", bytesRead);
+ ALOGW("read_snapshot_file FileState truncated/error with read at %d bytes\n", bytesRead);
return 1;
}
bytesRead += amt;
@@ -129,13 +129,13 @@
free(filename);
}
if (amt != nameBufSize) {
- LOGW("read_snapshot_file filename truncated/error with read at %d bytes\n", bytesRead);
+ ALOGW("read_snapshot_file filename truncated/error with read at %d bytes\n", bytesRead);
return 1;
}
}
if (header.totalSize != bytesRead) {
- LOGW("read_snapshot_file length mismatch: header.totalSize=%d bytesRead=%d\n",
+ ALOGW("read_snapshot_file length mismatch: header.totalSize=%d bytesRead=%d\n",
header.totalSize, bytesRead);
return 1;
}
@@ -166,7 +166,7 @@
amt = write(fd, &header, sizeof(header));
if (amt != sizeof(header)) {
- LOGW("write_snapshot_file error writing header %s", strerror(errno));
+ ALOGW("write_snapshot_file error writing header %s", strerror(errno));
return errno;
}
@@ -178,14 +178,14 @@
amt = write(fd, &r.s, sizeof(FileState));
if (amt != sizeof(FileState)) {
- LOGW("write_snapshot_file error writing header %s", strerror(errno));
+ ALOGW("write_snapshot_file error writing header %s", strerror(errno));
return 1;
}
// filename is not NULL terminated, but it is padded
amt = write(fd, name.string(), nameLen);
if (amt != nameLen) {
- LOGW("write_snapshot_file error writing filename %s", strerror(errno));
+ ALOGW("write_snapshot_file error writing filename %s", strerror(errno));
return 1;
}
int paddingLen = ROUND_UP[nameLen % 4];
@@ -193,7 +193,7 @@
int padding = 0xabababab;
amt = write(fd, &padding, paddingLen);
if (amt != paddingLen) {
- LOGW("write_snapshot_file error writing %d bytes of filename padding %s",
+ ALOGW("write_snapshot_file error writing %d bytes of filename padding %s",
paddingLen, strerror(errno));
return 1;
}
@@ -232,7 +232,7 @@
lseek(fd, 0, SEEK_SET);
if (sizeof(metadata) != 16) {
- LOGE("ERROR: metadata block is the wrong size!");
+ ALOGE("ERROR: metadata block is the wrong size!");
}
bytesLeft = fileSize + sizeof(metadata);
@@ -280,7 +280,7 @@
}
}
}
- LOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
+ ALOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
" You aren't doing proper locking!", realFilename, fileSize, fileSize-bytesLeft);
}
@@ -525,7 +525,7 @@
struct stat64 s;
if (lstat64(filepath.string(), &s) != 0) {
err = errno;
- LOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
+ ALOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
return err;
}
@@ -540,7 +540,7 @@
int fd = open(filepath.string(), O_RDONLY);
if (fd < 0) {
err = errno;
- LOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
+ ALOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
return err;
}
@@ -551,7 +551,7 @@
char* paxData = buf + 1024;
if (buf == NULL) {
- LOGE("Out of mem allocating transfer buffer");
+ ALOGE("Out of mem allocating transfer buffer");
err = ENOMEM;
goto cleanup;
}
@@ -591,7 +591,7 @@
} else if (S_ISREG(s.st_mode)) {
type = '0'; // tar magic: '0' == normal file
} else {
- LOGW("Error: unknown file mode 0%o [%s]", s.st_mode, filepath.string());
+ ALOGW("Error: unknown file mode 0%o [%s]", s.st_mode, filepath.string());
goto cleanup;
}
buf[156] = type;
@@ -628,7 +628,7 @@
// [ 329 : 8 ] and [ 337 : 8 ] devmajor/devminor, not used
- LOGI(" Name: %s", fullname.string());
+ ALOGI(" Name: %s", fullname.string());
// If we're using a pax extended header, build & write that here; lengths are
// already preflighted
@@ -688,11 +688,11 @@
ssize_t nRead = read(fd, buf, toRead);
if (nRead < 0) {
err = errno;
- LOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
+ ALOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
err, strerror(err));
break;
} else if (nRead == 0) {
- LOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
+ ALOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
filepath.string());
err = EIO;
break;
@@ -759,7 +759,7 @@
file_metadata_v1 metadata;
amt = in->ReadEntityData(&metadata, sizeof(metadata));
if (amt != sizeof(metadata)) {
- LOGW("Could not read metadata for %s -- %ld / %s", filename.string(),
+ ALOGW("Could not read metadata for %s -- %ld / %s", filename.string(),
(long)amt, strerror(errno));
return EIO;
}
@@ -768,7 +768,7 @@
if (metadata.version > CURRENT_METADATA_VERSION) {
if (!m_loggedUnknownMetadata) {
m_loggedUnknownMetadata = true;
- LOGW("Restoring file with unsupported metadata version %d (currently %d)",
+ ALOGW("Restoring file with unsupported metadata version %d (currently %d)",
metadata.version, CURRENT_METADATA_VERSION);
}
}
@@ -778,7 +778,7 @@
crc = crc32(0L, Z_NULL, 0);
fd = open(filename.string(), O_CREAT|O_RDWR|O_TRUNC, mode);
if (fd == -1) {
- LOGW("Could not open file %s -- %s", filename.string(), strerror(errno));
+ ALOGW("Could not open file %s -- %s", filename.string(), strerror(errno));
return errno;
}
@@ -786,7 +786,7 @@
err = write(fd, buf, amt);
if (err != amt) {
close(fd);
- LOGW("Error '%s' writing '%s'", strerror(errno), filename.string());
+ ALOGW("Error '%s' writing '%s'", strerror(errno), filename.string());
return errno;
}
crc = crc32(crc, (Bytef*)buf, amt);
@@ -797,7 +797,7 @@
// Record for the snapshot
err = stat(filename.string(), &st);
if (err != 0) {
- LOGW("Error stating file that we just created %s", filename.string());
+ ALOGW("Error stating file that we just created %s", filename.string());
return errno;
}
diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp
index d38aae9..e52cf2f 100644
--- a/libs/utils/BlobCache.cpp
+++ b/libs/utils/BlobCache.cpp
@@ -48,32 +48,32 @@
mRandState[1] = (now >> 16) & 0xFFFF;
mRandState[2] = (now >> 32) & 0xFFFF;
#endif
- LOGV("initializing random seed using %lld", now);
+ ALOGV("initializing random seed using %lld", now);
}
void BlobCache::set(const void* key, size_t keySize, const void* value,
size_t valueSize) {
if (mMaxKeySize < keySize) {
- LOGV("set: not caching because the key is too large: %d (limit: %d)",
+ ALOGV("set: not caching because the key is too large: %d (limit: %d)",
keySize, mMaxKeySize);
return;
}
if (mMaxValueSize < valueSize) {
- LOGV("set: not caching because the value is too large: %d (limit: %d)",
+ ALOGV("set: not caching because the value is too large: %d (limit: %d)",
valueSize, mMaxValueSize);
return;
}
if (mMaxTotalSize < keySize + valueSize) {
- LOGV("set: not caching because the combined key/value size is too "
+ ALOGV("set: not caching because the combined key/value size is too "
"large: %d (limit: %d)", keySize + valueSize, mMaxTotalSize);
return;
}
if (keySize == 0) {
- LOGW("set: not caching because keySize is 0");
+ ALOGW("set: not caching because keySize is 0");
return;
}
if (valueSize <= 0) {
- LOGW("set: not caching because valueSize is 0");
+ ALOGW("set: not caching because valueSize is 0");
return;
}
@@ -93,7 +93,7 @@
clean();
continue;
} else {
- LOGV("set: not caching new key/value pair because the "
+ ALOGV("set: not caching new key/value pair because the "
"total cache size limit would be exceeded: %d "
"(limit: %d)",
keySize + valueSize, mMaxTotalSize);
@@ -102,7 +102,7 @@
}
mCacheEntries.add(CacheEntry(keyBlob, valueBlob));
mTotalSize = newTotalSize;
- LOGV("set: created new cache entry with %d byte key and %d byte value",
+ ALOGV("set: created new cache entry with %d byte key and %d byte value",
keySize, valueSize);
} else {
// Update the existing cache entry.
@@ -115,7 +115,7 @@
clean();
continue;
} else {
- LOGV("set: not caching new value because the total cache "
+ ALOGV("set: not caching new value because the total cache "
"size limit would be exceeded: %d (limit: %d)",
keySize + valueSize, mMaxTotalSize);
break;
@@ -123,7 +123,7 @@
}
mCacheEntries.editItemAt(index).setValue(valueBlob);
mTotalSize = newTotalSize;
- LOGV("set: updated existing cache entry with %d byte key and %d byte "
+ ALOGV("set: updated existing cache entry with %d byte key and %d byte "
"value", keySize, valueSize);
}
break;
@@ -133,7 +133,7 @@
size_t BlobCache::get(const void* key, size_t keySize, void* value,
size_t valueSize) {
if (mMaxKeySize < keySize) {
- LOGV("get: not searching because the key is too large: %d (limit %d)",
+ ALOGV("get: not searching because the key is too large: %d (limit %d)",
keySize, mMaxKeySize);
return 0;
}
@@ -141,7 +141,7 @@
CacheEntry dummyEntry(dummyKey, NULL);
ssize_t index = mCacheEntries.indexOf(dummyEntry);
if (index < 0) {
- LOGV("get: no cache entry found for key of size %d", keySize);
+ ALOGV("get: no cache entry found for key of size %d", keySize);
return 0;
}
@@ -150,10 +150,10 @@
sp<Blob> valueBlob(mCacheEntries[index].getValue());
size_t valueBlobSize = valueBlob->getSize();
if (valueBlobSize <= valueSize) {
- LOGV("get: copying %d bytes to caller's buffer", valueBlobSize);
+ ALOGV("get: copying %d bytes to caller's buffer", valueBlobSize);
memcpy(value, valueBlob->getData(), valueBlobSize);
} else {
- LOGV("get: caller's buffer is too small for value: %d (needs %d)",
+ ALOGV("get: caller's buffer is too small for value: %d (needs %d)",
valueSize, valueBlobSize);
}
return valueBlobSize;
@@ -183,13 +183,13 @@
status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
const {
if (count != 0) {
- LOGE("flatten: nonzero fd count: %d", count);
+ ALOGE("flatten: nonzero fd count: %d", count);
return BAD_VALUE;
}
// Write the cache header
if (size < sizeof(Header)) {
- LOGE("flatten: not enough room for cache header");
+ ALOGE("flatten: not enough room for cache header");
return BAD_VALUE;
}
Header* header = reinterpret_cast<Header*>(buffer);
@@ -210,7 +210,7 @@
size_t entrySize = sizeof(EntryHeader) + keySize + valueSize;
if (byteOffset + entrySize > size) {
- LOGE("flatten: not enough room for cache entries");
+ ALOGE("flatten: not enough room for cache entries");
return BAD_VALUE;
}
@@ -234,18 +234,18 @@
mCacheEntries.clear();
if (count != 0) {
- LOGE("unflatten: nonzero fd count: %d", count);
+ ALOGE("unflatten: nonzero fd count: %d", count);
return BAD_VALUE;
}
// Read the cache header
if (size < sizeof(Header)) {
- LOGE("unflatten: not enough room for cache header");
+ ALOGE("unflatten: not enough room for cache header");
return BAD_VALUE;
}
const Header* header = reinterpret_cast<const Header*>(buffer);
if (header->mMagicNumber != blobCacheMagic) {
- LOGE("unflatten: bad magic number: %d", header->mMagicNumber);
+ ALOGE("unflatten: bad magic number: %d", header->mMagicNumber);
return BAD_VALUE;
}
if (header->mBlobCacheVersion != blobCacheVersion ||
@@ -261,7 +261,7 @@
for (size_t i = 0; i < numEntries; i++) {
if (byteOffset + sizeof(EntryHeader) > size) {
mCacheEntries.clear();
- LOGE("unflatten: not enough room for cache entry headers");
+ ALOGE("unflatten: not enough room for cache entry headers");
return BAD_VALUE;
}
@@ -273,7 +273,7 @@
if (byteOffset + entrySize > size) {
mCacheEntries.clear();
- LOGE("unflatten: not enough room for cache entry headers");
+ ALOGE("unflatten: not enough room for cache entry headers");
return BAD_VALUE;
}
diff --git a/libs/utils/CallStack.cpp b/libs/utils/CallStack.cpp
index 55b6024..bd7e239 100644
--- a/libs/utils/CallStack.cpp
+++ b/libs/utils/CallStack.cpp
@@ -328,7 +328,7 @@
* get very deep. So we request function names of each frame individually.
*/
for (int i=0; i<int(mCount); i++) {
- LOGD("%s", toStringSingleLevel(prefix, i).string());
+ ALOGD("%s", toStringSingleLevel(prefix, i).string());
}
}
diff --git a/libs/utils/FileMap.cpp b/libs/utils/FileMap.cpp
index c220a90..9ce370e 100644
--- a/libs/utils/FileMap.cpp
+++ b/libs/utils/FileMap.cpp
@@ -64,12 +64,12 @@
}
#ifdef HAVE_POSIX_FILEMAP
if (mBasePtr && munmap(mBasePtr, mBaseLength) != 0) {
- LOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
+ ALOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
}
#endif
#ifdef HAVE_WIN32_FILEMAP
if (mBasePtr && UnmapViewOfFile(mBasePtr) == 0) {
- LOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr,
+ ALOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr,
GetLastError() );
}
if (mFileMapping != INVALID_HANDLE_VALUE) {
@@ -108,7 +108,7 @@
mFileHandle = (HANDLE) _get_osfhandle(fd);
mFileMapping = CreateFileMapping( mFileHandle, NULL, protect, 0, 0, NULL);
if (mFileMapping == NULL) {
- LOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
+ ALOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
mFileHandle, protect, GetLastError() );
return false;
}
@@ -123,7 +123,7 @@
(DWORD)(adjOffset),
adjLength );
if (mBasePtr == NULL) {
- LOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
+ ALOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
adjOffset, adjLength, GetLastError() );
CloseHandle(mFileMapping);
mFileMapping = INVALID_HANDLE_VALUE;
@@ -147,7 +147,7 @@
#if NOT_USING_KLIBC
mPageSize = sysconf(_SC_PAGESIZE);
if (mPageSize == -1) {
- LOGE("could not get _SC_PAGESIZE\n");
+ ALOGE("could not get _SC_PAGESIZE\n");
return false;
}
#else
@@ -175,7 +175,7 @@
goto try_again;
}
- LOGE("mmap(%ld,%ld) failed: %s\n",
+ ALOGE("mmap(%ld,%ld) failed: %s\n",
(long) adjOffset, (long) adjLength, strerror(errno));
return false;
}
@@ -190,7 +190,7 @@
assert(mBasePtr != NULL);
- LOGV("MAP: base %p/%d data %p/%d\n",
+ ALOGV("MAP: base %p/%d data %p/%d\n",
mBasePtr, (int) mBaseLength, mDataPtr, (int) mDataLength);
return true;
@@ -217,7 +217,7 @@
cc = madvise(mBasePtr, mBaseLength, sysAdvice);
if (cc != 0)
- LOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
+ ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
return cc;
#else
return -1;
diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp
index b54fb9d..d1aa664 100644
--- a/libs/utils/Looper.cpp
+++ b/libs/utils/Looper.cpp
@@ -163,7 +163,7 @@
Looper::setForThread(looper);
}
if (looper->getAllowNonCallbacks() != allowNonCallbacks) {
- LOGW("Looper already prepared for this thread with a different value for the "
+ ALOGW("Looper already prepared for this thread with a different value for the "
"ALOOPER_PREPARE_ALLOW_NON_CALLBACKS option.");
}
return looper;
@@ -185,7 +185,7 @@
int events = response.events;
void* data = response.request.data;
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - returning signalled identifier %d: "
+ ALOGD("%p ~ pollOnce - returning signalled identifier %d: "
"fd=%d, events=0x%x, data=%p",
this, ident, fd, events, data);
#endif
@@ -198,7 +198,7 @@
if (result != 0) {
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - returning result %d", this, result);
+ ALOGD("%p ~ pollOnce - returning result %d", this, result);
#endif
if (outFd != NULL) *outFd = 0;
if (outEvents != NULL) *outEvents = NULL;
@@ -212,7 +212,7 @@
int Looper::pollInner(int timeoutMillis) {
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
+ ALOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
#endif
// Adjust the timeout based on when the next message is due.
@@ -224,7 +224,7 @@
timeoutMillis = messageTimeoutMillis;
}
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
+ ALOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
this, mNextMessageUptime - now, timeoutMillis);
#endif
}
@@ -262,7 +262,7 @@
if (errno == EINTR) {
goto Done;
}
- LOGW("Poll failed with an unexpected error, errno=%d", errno);
+ ALOGW("Poll failed with an unexpected error, errno=%d", errno);
result = ALOOPER_POLL_ERROR;
goto Done;
}
@@ -270,7 +270,7 @@
// Check for poll timeout.
if (eventCount == 0) {
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - timeout", this);
+ ALOGD("%p ~ pollOnce - timeout", this);
#endif
result = ALOOPER_POLL_TIMEOUT;
goto Done;
@@ -278,7 +278,7 @@
// Handle all events.
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
+ ALOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
#endif
#ifdef LOOPER_USES_EPOLL
@@ -289,7 +289,7 @@
if (epollEvents & EPOLLIN) {
awoken();
} else {
- LOGW("Ignoring unexpected epoll events 0x%x on wake read pipe.", epollEvents);
+ ALOGW("Ignoring unexpected epoll events 0x%x on wake read pipe.", epollEvents);
}
} else {
ssize_t requestIndex = mRequests.indexOfKey(fd);
@@ -301,7 +301,7 @@
if (epollEvents & EPOLLHUP) events |= ALOOPER_EVENT_HANGUP;
pushResponse(events, mRequests.valueAt(requestIndex));
} else {
- LOGW("Ignoring unexpected epoll events 0x%x on fd %d that is "
+ ALOGW("Ignoring unexpected epoll events 0x%x on fd %d that is "
"no longer registered.", epollEvents, fd);
}
}
@@ -317,7 +317,7 @@
if (pollEvents & POLLIN) {
awoken();
} else {
- LOGW("Ignoring unexpected poll events 0x%x on wake read pipe.", pollEvents);
+ ALOGW("Ignoring unexpected poll events 0x%x on wake read pipe.", pollEvents);
}
} else {
int events = 0;
@@ -353,7 +353,7 @@
- milliseconds_to_nanoseconds(timeoutMillis);
}
if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) {
- LOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
+ ALOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount,
0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount);
mSampledPolls = 0;
@@ -382,7 +382,7 @@
mLock.unlock();
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
- LOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
+ ALOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
this, handler.get(), message.what);
#endif
handler->handleMessage(message);
@@ -410,7 +410,7 @@
int events = response.events;
void* data = response.request.data;
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
- LOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
+ ALOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
this, callback, fd, events, data);
#endif
int callbackResult = callback(fd, events, data);
@@ -451,7 +451,7 @@
void Looper::wake() {
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ wake", this);
+ ALOGD("%p ~ wake", this);
#endif
#ifdef LOOPER_STATISTICS
@@ -468,19 +468,19 @@
if (nWrite != 1) {
if (errno != EAGAIN) {
- LOGW("Could not write wake signal, errno=%d", errno);
+ ALOGW("Could not write wake signal, errno=%d", errno);
}
}
}
void Looper::awoken() {
#if DEBUG_POLL_AND_WAKE
- LOGD("%p ~ awoken", this);
+ ALOGD("%p ~ awoken", this);
#endif
#ifdef LOOPER_STATISTICS
if (mPendingWakeCount == 0) {
- LOGD("%p ~ awoken: spurious!", this);
+ ALOGD("%p ~ awoken: spurious!", this);
} else {
mSampledWakeCycles += 1;
mSampledWakeCountSum += mPendingWakeCount;
@@ -488,7 +488,7 @@
mPendingWakeCount = 0;
mPendingWakeTime = -1;
if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) {
- LOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
+ ALOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles,
float(mSampledWakeCountSum) / mSampledWakeCycles);
mSampledWakeCycles = 0;
@@ -514,18 +514,18 @@
int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) {
#if DEBUG_CALLBACKS
- LOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
+ ALOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
events, callback, data);
#endif
if (! callback) {
if (! mAllowNonCallbacks) {
- LOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
+ ALOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
return -1;
}
if (ident < 0) {
- LOGE("Invalid attempt to set NULL callback with ident <= 0.");
+ ALOGE("Invalid attempt to set NULL callback with ident <= 0.");
return -1;
}
}
@@ -553,14 +553,14 @@
if (requestIndex < 0) {
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, & eventItem);
if (epollResult < 0) {
- LOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
mRequests.add(fd, request);
} else {
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_MOD, fd, & eventItem);
if (epollResult < 0) {
- LOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
mRequests.replaceValueAt(requestIndex, request);
@@ -598,7 +598,7 @@
int Looper::removeFd(int fd) {
#if DEBUG_CALLBACKS
- LOGD("%p ~ removeFd - fd=%d", this, fd);
+ ALOGD("%p ~ removeFd - fd=%d", this, fd);
#endif
#ifdef LOOPER_USES_EPOLL
@@ -611,7 +611,7 @@
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_DEL, fd, NULL);
if (epollResult < 0) {
- LOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
@@ -675,7 +675,7 @@
void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler,
const Message& message) {
#if DEBUG_CALLBACKS
- LOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
+ ALOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
this, uptime, handler.get(), message.what);
#endif
@@ -708,7 +708,7 @@
void Looper::removeMessages(const sp<MessageHandler>& handler) {
#if DEBUG_CALLBACKS
- LOGD("%p ~ removeMessages - handler=%p", this, handler.get());
+ ALOGD("%p ~ removeMessages - handler=%p", this, handler.get());
#endif
{ // acquire lock
@@ -725,7 +725,7 @@
void Looper::removeMessages(const sp<MessageHandler>& handler, int what) {
#if DEBUG_CALLBACKS
- LOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
+ ALOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
#endif
{ // acquire lock
diff --git a/libs/utils/ObbFile.cpp b/libs/utils/ObbFile.cpp
index 2907b56..ddf5991 100644
--- a/libs/utils/ObbFile.cpp
+++ b/libs/utils/ObbFile.cpp
@@ -90,14 +90,14 @@
fd = ::open(filename, O_RDONLY);
if (fd < 0) {
- LOGW("couldn't open file %s: %s", filename, strerror(errno));
+ ALOGW("couldn't open file %s: %s", filename, strerror(errno));
goto out;
}
success = readFrom(fd);
close(fd);
if (!success) {
- LOGW("failed to read from %s (fd=%d)\n", filename, fd);
+ ALOGW("failed to read from %s (fd=%d)\n", filename, fd);
}
out:
@@ -107,7 +107,7 @@
bool ObbFile::readFrom(int fd)
{
if (fd < 0) {
- LOGW("attempt to read from invalid fd\n");
+ ALOGW("attempt to read from invalid fd\n");
return false;
}
@@ -120,9 +120,9 @@
if (fileLength < kFooterMinSize) {
if (fileLength < 0) {
- LOGW("error seeking in ObbFile: %s\n", strerror(errno));
+ ALOGW("error seeking in ObbFile: %s\n", strerror(errno));
} else {
- LOGW("file is only %lld (less than %d minimum)\n", fileLength, kFooterMinSize);
+ ALOGW("file is only %lld (less than %d minimum)\n", fileLength, kFooterMinSize);
}
return false;
}
@@ -136,13 +136,13 @@
char *footer = new char[kFooterTagSize];
actual = TEMP_FAILURE_RETRY(read(fd, footer, kFooterTagSize));
if (actual != kFooterTagSize) {
- LOGW("couldn't read footer signature: %s\n", strerror(errno));
+ ALOGW("couldn't read footer signature: %s\n", strerror(errno));
return false;
}
unsigned int fileSig = get4LE((unsigned char*)footer + sizeof(int32_t));
if (fileSig != kSignature) {
- LOGW("footer didn't match magic string (expected 0x%08x; got 0x%08x)\n",
+ ALOGW("footer didn't match magic string (expected 0x%08x; got 0x%08x)\n",
kSignature, fileSig);
return false;
}
@@ -150,13 +150,13 @@
footerSize = get4LE((unsigned char*)footer);
if (footerSize > (size_t)fileLength - kFooterTagSize
|| footerSize > kMaxBufSize) {
- LOGW("claimed footer size is too large (0x%08zx; file size is 0x%08llx)\n",
+ ALOGW("claimed footer size is too large (0x%08zx; file size is 0x%08llx)\n",
footerSize, fileLength);
return false;
}
if (footerSize < (kFooterMinSize - kFooterTagSize)) {
- LOGW("claimed footer size is too small (0x%zx; minimum size is 0x%x)\n",
+ ALOGW("claimed footer size is too small (0x%zx; minimum size is 0x%x)\n",
footerSize, kFooterMinSize - kFooterTagSize);
return false;
}
@@ -164,7 +164,7 @@
off64_t fileOffset = fileLength - footerSize - kFooterTagSize;
if (lseek64(fd, fileOffset, SEEK_SET) != fileOffset) {
- LOGW("seek %lld failed: %s\n", fileOffset, strerror(errno));
+ ALOGW("seek %lld failed: %s\n", fileOffset, strerror(errno));
return false;
}
@@ -172,27 +172,27 @@
char* scanBuf = (char*)malloc(footerSize);
if (scanBuf == NULL) {
- LOGW("couldn't allocate scanBuf: %s\n", strerror(errno));
+ ALOGW("couldn't allocate scanBuf: %s\n", strerror(errno));
return false;
}
actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, footerSize));
// readAmount is guaranteed to be less than kMaxBufSize
if (actual != (ssize_t)footerSize) {
- LOGI("couldn't read ObbFile footer: %s\n", strerror(errno));
+ ALOGI("couldn't read ObbFile footer: %s\n", strerror(errno));
free(scanBuf);
return false;
}
#ifdef DEBUG
for (int i = 0; i < footerSize; ++i) {
- LOGI("char: 0x%02x\n", scanBuf[i]);
+ ALOGI("char: 0x%02x\n", scanBuf[i]);
}
#endif
uint32_t sigVersion = get4LE((unsigned char*)scanBuf);
if (sigVersion != kSigVersion) {
- LOGW("Unsupported ObbFile version %d\n", sigVersion);
+ ALOGW("Unsupported ObbFile version %d\n", sigVersion);
free(scanBuf);
return false;
}
@@ -205,7 +205,7 @@
size_t packageNameLen = get4LE((unsigned char*)scanBuf + kPackageNameLenOffset);
if (packageNameLen == 0
|| packageNameLen > (footerSize - kPackageNameOffset)) {
- LOGW("bad ObbFile package name length (0x%04zx; 0x%04zx possible)\n",
+ ALOGW("bad ObbFile package name length (0x%04zx; 0x%04zx possible)\n",
packageNameLen, footerSize - kPackageNameOffset);
free(scanBuf);
return false;
@@ -217,7 +217,7 @@
free(scanBuf);
#ifdef DEBUG
- LOGI("Obb scan succeeded: packageName=%s, version=%d\n", mPackageName.string(), mVersion);
+ ALOGI("Obb scan succeeded: packageName=%s, version=%d\n", mPackageName.string(), mVersion);
#endif
return true;
@@ -237,7 +237,7 @@
out:
if (!success) {
- LOGW("failed to write to %s: %s\n", filename, strerror(errno));
+ ALOGW("failed to write to %s: %s\n", filename, strerror(errno));
}
return success;
}
@@ -251,7 +251,7 @@
lseek64(fd, 0, SEEK_END);
if (mPackageName.size() == 0 || mVersion == -1) {
- LOGW("tried to write uninitialized ObbFile data\n");
+ ALOGW("tried to write uninitialized ObbFile data\n");
return false;
}
@@ -260,48 +260,48 @@
put4LE(intBuf, kSigVersion);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write signature version: %s\n", strerror(errno));
+ ALOGW("couldn't write signature version: %s\n", strerror(errno));
return false;
}
put4LE(intBuf, mVersion);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write package version\n");
+ ALOGW("couldn't write package version\n");
return false;
}
put4LE(intBuf, mFlags);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write package version\n");
+ ALOGW("couldn't write package version\n");
return false;
}
if (write(fd, mSalt, sizeof(mSalt)) != (ssize_t)sizeof(mSalt)) {
- LOGW("couldn't write salt: %s\n", strerror(errno));
+ ALOGW("couldn't write salt: %s\n", strerror(errno));
return false;
}
size_t packageNameLen = mPackageName.size();
put4LE(intBuf, packageNameLen);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write package name length: %s\n", strerror(errno));
+ ALOGW("couldn't write package name length: %s\n", strerror(errno));
return false;
}
if (write(fd, mPackageName.string(), packageNameLen) != (ssize_t)packageNameLen) {
- LOGW("couldn't write package name: %s\n", strerror(errno));
+ ALOGW("couldn't write package name: %s\n", strerror(errno));
return false;
}
put4LE(intBuf, kPackageNameOffset + packageNameLen);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write footer size: %s\n", strerror(errno));
+ ALOGW("couldn't write footer size: %s\n", strerror(errno));
return false;
}
put4LE(intBuf, kSignature);
if (write(fd, &intBuf, sizeof(uint32_t)) != (ssize_t)sizeof(uint32_t)) {
- LOGW("couldn't write footer magic signature: %s\n", strerror(errno));
+ ALOGW("couldn't write footer magic signature: %s\n", strerror(errno));
return false;
}
@@ -322,7 +322,7 @@
out:
if (!success) {
- LOGW("failed to remove signature from %s: %s\n", filename, strerror(errno));
+ ALOGW("failed to remove signature from %s: %s\n", filename, strerror(errno));
}
return success;
}
diff --git a/libs/utils/PropertyMap.cpp b/libs/utils/PropertyMap.cpp
index d472d45..5520702 100644
--- a/libs/utils/PropertyMap.cpp
+++ b/libs/utils/PropertyMap.cpp
@@ -84,7 +84,7 @@
char* end;
int value = strtol(stringValue.string(), & end, 10);
if (*end != '\0') {
- LOGW("Property key '%s' has invalid value '%s'. Expected an integer.",
+ ALOGW("Property key '%s' has invalid value '%s'. Expected an integer.",
key.string(), stringValue.string());
return false;
}
@@ -101,7 +101,7 @@
char* end;
float value = strtof(stringValue.string(), & end);
if (*end != '\0') {
- LOGW("Property key '%s' has invalid value '%s'. Expected a float.",
+ ALOGW("Property key '%s' has invalid value '%s'. Expected a float.",
key.string(), stringValue.string());
return false;
}
@@ -121,11 +121,11 @@
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening property file %s.", status, filename.string());
+ ALOGE("Error %d opening property file %s.", status, filename.string());
} else {
PropertyMap* map = new PropertyMap();
if (!map) {
- LOGE("Error allocating property map.");
+ ALOGE("Error allocating property map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -135,7 +135,7 @@
status = parser.parse();
#if DEBUG_PARSER_PERFORMANCE
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
- LOGD("Parsed property file '%s' %d lines in %0.3fms.",
+ ALOGD("Parsed property file '%s' %d lines in %0.3fms.",
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
elapsedTime / 1000000.0);
#endif
@@ -163,7 +163,7 @@
status_t PropertyMap::Parser::parse() {
while (!mTokenizer->isEof()) {
#if DEBUG_PARSER
- LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
+ ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
#endif
@@ -172,14 +172,14 @@
if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') {
String8 keyToken = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER);
if (keyToken.isEmpty()) {
- LOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
+ ALOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (mTokenizer->nextChar() != '=') {
- LOGE("%s: Expected '=' between property key and value.",
+ ALOGE("%s: Expected '=' between property key and value.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -188,21 +188,21 @@
String8 valueToken = mTokenizer->nextToken(WHITESPACE);
if (valueToken.find("\\", 0) >= 0 || valueToken.find("\"", 0) >= 0) {
- LOGE("%s: Found reserved character '\\' or '\"' in property value.",
+ ALOGE("%s: Found reserved character '\\' or '\"' in property value.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
}
if (mMap->hasProperty(keyToken)) {
- LOGE("%s: Duplicate property value for key '%s'.",
+ ALOGE("%s: Duplicate property value for key '%s'.",
mTokenizer->getLocation().string(), keyToken.string());
return BAD_VALUE;
}
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 37d061c..e80a795 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -98,12 +98,12 @@
#if DEBUG_REFS_FATAL_SANITY_CHECKS
LOG_ALWAYS_FATAL("Strong references remain!");
#else
- LOGE("Strong references remain:");
+ ALOGE("Strong references remain:");
#endif
ref_entry* refs = mStrongRefs;
while (refs) {
char inc = refs->ref >= 0 ? '+' : '-';
- LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
+ ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
#if DEBUG_REFS_CALLSTACK_ENABLED
refs->stack.dump();
#endif
@@ -116,12 +116,12 @@
#if DEBUG_REFS_FATAL_SANITY_CHECKS
LOG_ALWAYS_FATAL("Weak references remain:");
#else
- LOGE("Weak references remain!");
+ ALOGE("Weak references remain!");
#endif
ref_entry* refs = mWeakRefs;
while (refs) {
char inc = refs->ref >= 0 ? '+' : '-';
- LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
+ ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
#if DEBUG_REFS_CALLSTACK_ENABLED
refs->stack.dump();
#endif
@@ -129,7 +129,7 @@
}
}
if (dumpStack) {
- LOGE("above errors at:");
+ ALOGE("above errors at:");
CallStack stack;
stack.update();
stack.dump();
@@ -137,13 +137,13 @@
}
void addStrongRef(const void* id) {
- //LOGD_IF(mTrackEnabled,
+ //ALOGD_IF(mTrackEnabled,
// "addStrongRef: RefBase=%p, id=%p", mBase, id);
addRef(&mStrongRefs, id, mStrong);
}
void removeStrongRef(const void* id) {
- //LOGD_IF(mTrackEnabled,
+ //ALOGD_IF(mTrackEnabled,
// "removeStrongRef: RefBase=%p, id=%p", mBase, id);
if (!mRetain) {
removeRef(&mStrongRefs, id);
@@ -153,7 +153,7 @@
}
void renameStrongRefId(const void* old_id, const void* new_id) {
- //LOGD_IF(mTrackEnabled,
+ //ALOGD_IF(mTrackEnabled,
// "renameStrongRefId: RefBase=%p, oid=%p, nid=%p",
// mBase, old_id, new_id);
renameRefsId(mStrongRefs, old_id, new_id);
@@ -203,9 +203,9 @@
if (rc >= 0) {
write(rc, text.string(), text.length());
close(rc);
- LOGD("STACK TRACE for %p saved in %s", this, name);
+ ALOGD("STACK TRACE for %p saved in %s", this, name);
}
- else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
+ else ALOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
name, strerror(errno));
}
}
@@ -263,14 +263,14 @@
id, mBase, this);
#endif
- LOGE("RefBase: removing id %p on RefBase %p"
+ ALOGE("RefBase: removing id %p on RefBase %p"
"(weakref_type %p) that doesn't exist!",
id, mBase, this);
ref = head;
while (ref) {
char inc = ref->ref >= 0 ? '+' : '-';
- LOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
+ ALOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
ref = ref->next;
}
@@ -332,9 +332,9 @@
refs->addStrongRef(id);
const int32_t c = android_atomic_inc(&refs->mStrong);
- LOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
+ ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
#if PRINT_REFS
- LOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
+ ALOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
#endif
if (c != INITIAL_STRONG_VALUE) {
return;
@@ -350,9 +350,9 @@
refs->removeStrongRef(id);
const int32_t c = android_atomic_dec(&refs->mStrong);
#if PRINT_REFS
- LOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
+ ALOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
#endif
- LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
+ ALOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
if (c == 1) {
refs->mBase->onLastStrongRef(id);
if ((refs->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_STRONG) {
@@ -369,10 +369,10 @@
refs->addStrongRef(id);
const int32_t c = android_atomic_inc(&refs->mStrong);
- LOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
+ ALOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
refs);
#if PRINT_REFS
- LOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
+ ALOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
#endif
switch (c) {
@@ -399,7 +399,7 @@
weakref_impl* const impl = static_cast<weakref_impl*>(this);
impl->addWeakRef(id);
const int32_t c = android_atomic_inc(&impl->mWeak);
- LOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this);
+ ALOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this);
}
@@ -408,7 +408,7 @@
weakref_impl* const impl = static_cast<weakref_impl*>(this);
impl->removeWeakRef(id);
const int32_t c = android_atomic_dec(&impl->mWeak);
- LOG_ASSERT(c >= 1, "decWeak called on %p too many times", this);
+ ALOG_ASSERT(c >= 1, "decWeak called on %p too many times", this);
if (c != 1) return;
if ((impl->mFlags&OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_STRONG) {
@@ -421,7 +421,7 @@
// destroy the object now.
delete impl->mBase;
} else {
- // LOGV("Freeing refs %p of old RefBase %p\n", this, impl->mBase);
+ // ALOGV("Freeing refs %p of old RefBase %p\n", this, impl->mBase);
delete impl;
}
} else {
@@ -442,7 +442,7 @@
weakref_impl* const impl = static_cast<weakref_impl*>(this);
int32_t curCount = impl->mStrong;
- LOG_ASSERT(curCount >= 0, "attemptIncStrong called on %p after underflow",
+ ALOG_ASSERT(curCount >= 0, "attemptIncStrong called on %p after underflow",
this);
while (curCount > 0 && curCount != INITIAL_STRONG_VALUE) {
if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mStrong) == 0) {
@@ -487,7 +487,7 @@
impl->addStrongRef(id);
#if PRINT_REFS
- LOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
+ ALOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
#endif
if (curCount == INITIAL_STRONG_VALUE) {
@@ -503,7 +503,7 @@
weakref_impl* const impl = static_cast<weakref_impl*>(this);
int32_t curCount = impl->mWeak;
- LOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow",
+ ALOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow",
this);
while (curCount > 0) {
if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mWeak) == 0) {
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 6cf01c8..15b83bb 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -69,7 +69,7 @@
static void printToLogFunc(void* cookie, const char* txt)
{
- LOGV("%s", txt);
+ ALOGV("%s", txt);
}
// Standard C isspace() is only required to look at the low byte of its input, so
@@ -107,20 +107,20 @@
if ((ssize_t)size <= (dataEnd-((const uint8_t*)chunk))) {
return NO_ERROR;
}
- LOGW("%s data size %p extends beyond resource end %p.",
+ ALOGW("%s data size %p extends beyond resource end %p.",
name, (void*)size,
(void*)(dataEnd-((const uint8_t*)chunk)));
return BAD_TYPE;
}
- LOGW("%s size 0x%x or headerSize 0x%x is not on an integer boundary.",
+ ALOGW("%s size 0x%x or headerSize 0x%x is not on an integer boundary.",
name, (int)size, (int)headerSize);
return BAD_TYPE;
}
- LOGW("%s size %p is smaller than header size %p.",
+ ALOGW("%s size %p is smaller than header size %p.",
name, (void*)size, (void*)(int)headerSize);
return BAD_TYPE;
}
- LOGW("%s header size %p is too small.",
+ ALOGW("%s header size %p is too small.",
name, (void*)(int)headerSize);
return BAD_TYPE;
}
@@ -221,11 +221,11 @@
static bool assertIdmapHeader(const uint32_t* map, size_t sizeBytes)
{
if (sizeBytes < ResTable::IDMAP_HEADER_SIZE_BYTES) {
- LOGW("idmap assertion failed: size=%d bytes\n", sizeBytes);
+ ALOGW("idmap assertion failed: size=%d bytes\n", sizeBytes);
return false;
}
if (*map != htodl(IDMAP_MAGIC)) { // htodl: map data expected to be in correct endianess
- LOGW("idmap assertion failed: invalid magic found (is 0x%08x, expected 0x%08x)\n",
+ ALOGW("idmap assertion failed: invalid magic found (is 0x%08x, expected 0x%08x)\n",
*map, htodl(IDMAP_MAGIC));
return false;
}
@@ -246,11 +246,11 @@
const uint32_t typeCount = *map;
if (type > typeCount) {
- LOGW("Resource ID map: type=%d exceeds number of types=%d\n", type, typeCount);
+ ALOGW("Resource ID map: type=%d exceeds number of types=%d\n", type, typeCount);
return UNKNOWN_ERROR;
}
if (typeCount > size) {
- LOGW("Resource ID map: number of types=%d exceeds size of map=%d\n", typeCount, size);
+ ALOGW("Resource ID map: number of types=%d exceeds size of map=%d\n", typeCount, size);
return UNKNOWN_ERROR;
}
const uint32_t typeOffset = map[type];
@@ -259,7 +259,7 @@
return NO_ERROR;
}
if (typeOffset + 1 > size) {
- LOGW("Resource ID map: type offset=%d exceeds reasonable value, size of map=%d\n",
+ ALOGW("Resource ID map: type offset=%d exceeds reasonable value, size of map=%d\n",
typeOffset, size);
return UNKNOWN_ERROR;
}
@@ -271,7 +271,7 @@
}
const uint32_t index = typeOffset + 2 + entry - entryOffset;
if (index > size) {
- LOGW("Resource ID map: entry index=%d exceeds size of map=%d\n", index, size);
+ ALOGW("Resource ID map: entry index=%d exceeds size of map=%d\n", index, size);
*outValue = 0;
return NO_ERROR;
}
@@ -296,7 +296,7 @@
Res_png_9patch* Res_png_9patch::deserialize(const void* inData)
{
if (sizeof(void*) != sizeof(int32_t)) {
- LOGE("Cannot deserialize on non 32-bit system\n");
+ ALOGE("Cannot deserialize on non 32-bit system\n");
return NULL;
}
deserializeInternal(inData, (Res_png_9patch*) inData);
@@ -358,7 +358,7 @@
if (mHeader->header.headerSize > mHeader->header.size
|| mHeader->header.size > size) {
- LOGW("Bad string block: header size %d or total size %d is larger than data size %d\n",
+ ALOGW("Bad string block: header size %d or total size %d is larger than data size %d\n",
(int)mHeader->header.headerSize, (int)mHeader->header.size, (int)size);
return (mError=BAD_TYPE);
}
@@ -370,7 +370,7 @@
if ((mHeader->stringCount*sizeof(uint32_t) < mHeader->stringCount) // uint32 overflow?
|| (mHeader->header.headerSize+(mHeader->stringCount*sizeof(uint32_t)))
> size) {
- LOGW("Bad string block: entry of %d items extends past data size %d\n",
+ ALOGW("Bad string block: entry of %d items extends past data size %d\n",
(int)(mHeader->header.headerSize+(mHeader->stringCount*sizeof(uint32_t))),
(int)size);
return (mError=BAD_TYPE);
@@ -388,7 +388,7 @@
mStrings = (const void*)
(((const uint8_t*)data)+mHeader->stringsStart);
if (mHeader->stringsStart >= (mHeader->header.size-sizeof(uint16_t))) {
- LOGW("Bad string block: string pool starts at %d, after total size %d\n",
+ ALOGW("Bad string block: string pool starts at %d, after total size %d\n",
(int)mHeader->stringsStart, (int)mHeader->header.size);
return (mError=BAD_TYPE);
}
@@ -398,13 +398,13 @@
} else {
// check invariant: styles starts before end of data
if (mHeader->stylesStart >= (mHeader->header.size-sizeof(uint16_t))) {
- LOGW("Bad style block: style block starts at %d past data size of %d\n",
+ ALOGW("Bad style block: style block starts at %d past data size of %d\n",
(int)mHeader->stylesStart, (int)mHeader->header.size);
return (mError=BAD_TYPE);
}
// check invariant: styles follow the strings
if (mHeader->stylesStart <= mHeader->stringsStart) {
- LOGW("Bad style block: style block starts at %d, before strings at %d\n",
+ ALOGW("Bad style block: style block starts at %d, before strings at %d\n",
(int)mHeader->stylesStart, (int)mHeader->stringsStart);
return (mError=BAD_TYPE);
}
@@ -414,7 +414,7 @@
// check invariant: stringCount > 0 requires a string pool to exist
if (mStringPoolSize == 0) {
- LOGW("Bad string block: stringCount is %d but pool size is 0\n", (int)mHeader->stringCount);
+ ALOGW("Bad string block: stringCount is %d but pool size is 0\n", (int)mHeader->stringCount);
return (mError=BAD_TYPE);
}
@@ -437,7 +437,7 @@
((uint8_t*)mStrings)[mStringPoolSize-1] != 0) ||
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
((char16_t*)mStrings)[mStringPoolSize-1] != 0)) {
- LOGW("Bad string block: last string is not 0-terminated\n");
+ ALOGW("Bad string block: last string is not 0-terminated\n");
return (mError=BAD_TYPE);
}
} else {
@@ -449,12 +449,12 @@
mEntryStyles = mEntries + mHeader->stringCount;
// invariant: integer overflow in calculating mEntryStyles
if (mEntryStyles < mEntries) {
- LOGW("Bad string block: integer overflow finding styles\n");
+ ALOGW("Bad string block: integer overflow finding styles\n");
return (mError=BAD_TYPE);
}
if (((const uint8_t*)mEntryStyles-(const uint8_t*)mHeader) > (int)size) {
- LOGW("Bad string block: entry of %d styles extends past data size %d\n",
+ ALOGW("Bad string block: entry of %d styles extends past data size %d\n",
(int)((const uint8_t*)mEntryStyles-(const uint8_t*)mHeader),
(int)size);
return (mError=BAD_TYPE);
@@ -462,7 +462,7 @@
mStyles = (const uint32_t*)
(((const uint8_t*)data)+mHeader->stylesStart);
if (mHeader->stylesStart >= mHeader->header.size) {
- LOGW("Bad string block: style pool starts %d, after total size %d\n",
+ ALOGW("Bad string block: style pool starts %d, after total size %d\n",
(int)mHeader->stylesStart, (int)mHeader->header.size);
return (mError=BAD_TYPE);
}
@@ -487,7 +487,7 @@
};
if (memcmp(&mStyles[mStylePoolSize-(sizeof(endSpan)/sizeof(uint32_t))],
&endSpan, sizeof(endSpan)) != 0) {
- LOGW("Bad string block: last style is not 0xFFFFFFFF-terminated\n");
+ ALOGW("Bad string block: last style is not 0xFFFFFFFF-terminated\n");
return (mError=BAD_TYPE);
}
} else {
@@ -581,7 +581,7 @@
if ((uint32_t)(str+*u16len-strings) < mStringPoolSize) {
return str;
} else {
- LOGW("Bad string block: string #%d extends to %d, past end at %d\n",
+ ALOGW("Bad string block: string #%d extends to %d, past end at %d\n",
(int)idx, (int)(str+*u16len-strings), (int)mStringPoolSize);
}
} else {
@@ -601,7 +601,7 @@
ssize_t actualLen = utf8_to_utf16_length(u8str, u8len);
if (actualLen < 0 || (size_t)actualLen != *u16len) {
- LOGW("Bad string block: string #%lld decoded length is not correct "
+ ALOGW("Bad string block: string #%lld decoded length is not correct "
"%lld vs %llu\n",
(long long)idx, (long long)actualLen, (long long)*u16len);
return NULL;
@@ -609,7 +609,7 @@
char16_t *u16str = (char16_t *)calloc(*u16len+1, sizeof(char16_t));
if (!u16str) {
- LOGW("No memory when trying to allocate decode cache for string #%d\n",
+ ALOGW("No memory when trying to allocate decode cache for string #%d\n",
(int)idx);
return NULL;
}
@@ -618,13 +618,13 @@
mCache[idx] = u16str;
return u16str;
} else {
- LOGW("Bad string block: string #%lld extends to %lld, past end at %lld\n",
+ ALOGW("Bad string block: string #%lld extends to %lld, past end at %lld\n",
(long long)idx, (long long)(u8str+u8len-strings),
(long long)mStringPoolSize);
}
}
} else {
- LOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
+ ALOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
(int)idx, (int)(off*sizeof(uint16_t)),
(int)(mStringPoolSize*sizeof(uint16_t)));
}
@@ -646,12 +646,12 @@
if ((uint32_t)(str+encLen-strings) < mStringPoolSize) {
return (const char*)str;
} else {
- LOGW("Bad string block: string #%d extends to %d, past end at %d\n",
+ ALOGW("Bad string block: string #%d extends to %d, past end at %d\n",
(int)idx, (int)(str+encLen-strings), (int)mStringPoolSize);
}
}
} else {
- LOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
+ ALOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
(int)idx, (int)(off*sizeof(uint16_t)),
(int)(mStringPoolSize*sizeof(uint16_t)));
}
@@ -671,7 +671,7 @@
if (off < mStylePoolSize) {
return (const ResStringPool_span*)(mStyles+off);
} else {
- LOGW("Bad string block: style #%d entry is at %d, past end at %d\n",
+ ALOGW("Bad string block: style #%d entry is at %d, past end at %d\n",
(int)idx, (int)(off*sizeof(uint32_t)),
(int)(mStylePoolSize*sizeof(uint32_t)));
}
@@ -1087,7 +1087,7 @@
do {
const ResXMLTree_node* next = (const ResXMLTree_node*)
(((const uint8_t*)mCurNode) + dtohl(mCurNode->header.size));
- //LOGW("Next node: prev=%p, next=%p\n", mCurNode, next);
+ //ALOGW("Next node: prev=%p, next=%p\n", mCurNode, next);
if (((const uint8_t*)next) >= mTree.mDataEnd) {
mCurNode = NULL;
@@ -1120,14 +1120,14 @@
minExtSize = sizeof(ResXMLTree_cdataExt);
break;
default:
- LOGW("Unknown XML block: header type %d in node at %d\n",
+ ALOGW("Unknown XML block: header type %d in node at %d\n",
(int)dtohs(next->header.type),
(int)(((const uint8_t*)next)-((const uint8_t*)mTree.mHeader)));
continue;
}
if ((totalSize-headerSize) < minExtSize) {
- LOGW("Bad XML block: header type 0x%x in node at 0x%x has size %d, need %d\n",
+ ALOGW("Bad XML block: header type 0x%x in node at 0x%x has size %d, need %d\n",
(int)dtohs(next->header.type),
(int)(((const uint8_t*)next)-((const uint8_t*)mTree.mHeader)),
(int)(totalSize-headerSize), (int)minExtSize);
@@ -1164,7 +1164,7 @@
: ResXMLParser(*this)
, mError(NO_INIT), mOwnedData(NULL)
{
- //LOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
+ //ALOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
restart();
}
@@ -1172,13 +1172,13 @@
: ResXMLParser(*this)
, mError(NO_INIT), mOwnedData(NULL)
{
- //LOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
+ //ALOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
setTo(data, size, copyData);
}
ResXMLTree::~ResXMLTree()
{
- //LOGI("Destroying ResXMLTree in %p #%d\n", this, android_atomic_dec(&gCount)-1);
+ //ALOGI("Destroying ResXMLTree in %p #%d\n", this, android_atomic_dec(&gCount)-1);
uninit();
}
@@ -1199,7 +1199,7 @@
mHeader = (const ResXMLTree_header*)data;
mSize = dtohl(mHeader->header.size);
if (dtohs(mHeader->header.headerSize) > mSize || mSize > size) {
- LOGW("Bad XML block: header size %d or total size %d is larger than data size %d\n",
+ ALOGW("Bad XML block: header size %d or total size %d is larger than data size %d\n",
(int)dtohs(mHeader->header.headerSize),
(int)dtohl(mHeader->header.size), (int)size);
mError = BAD_TYPE;
@@ -1259,7 +1259,7 @@
}
if (mRootNode == NULL) {
- LOGW("Bad XML block: no root element node found\n");
+ ALOGW("Bad XML block: no root element node found\n");
mError = BAD_TYPE;
goto done;
}
@@ -1313,12 +1313,12 @@
if ((dtohs(attrExt->attributeStart)+attrSize) <= (size-headerSize)) {
return NO_ERROR;
}
- LOGW("Bad XML block: node attributes use 0x%x bytes, only have 0x%x bytes\n",
+ ALOGW("Bad XML block: node attributes use 0x%x bytes, only have 0x%x bytes\n",
(unsigned int)(dtohs(attrExt->attributeStart)+attrSize),
(unsigned int)(size-headerSize));
}
else {
- LOGW("Bad XML start block: node header size 0x%x, size 0x%x\n",
+ ALOGW("Bad XML start block: node header size 0x%x, size 0x%x\n",
(unsigned int)headerSize, (unsigned int)size);
}
return BAD_TYPE;
@@ -1342,21 +1342,21 @@
<= (size-headerSize)) {
return NO_ERROR;
}
- LOGW("Bad XML block: node attributes use 0x%x bytes, only have 0x%x bytes\n",
+ ALOGW("Bad XML block: node attributes use 0x%x bytes, only have 0x%x bytes\n",
((int)dtohs(node->attributeSize))*dtohs(node->attributeCount),
(int)(size-headerSize));
return BAD_TYPE;
}
- LOGW("Bad XML block: node at 0x%x extends beyond data end 0x%x\n",
+ ALOGW("Bad XML block: node at 0x%x extends beyond data end 0x%x\n",
(int)(((const uint8_t*)node)-((const uint8_t*)mHeader)), (int)mSize);
return BAD_TYPE;
}
- LOGW("Bad XML block: node at 0x%x header size 0x%x smaller than total size 0x%x\n",
+ ALOGW("Bad XML block: node at 0x%x header size 0x%x smaller than total size 0x%x\n",
(int)(((const uint8_t*)node)-((const uint8_t*)mHeader)),
(int)headerSize, (int)size);
return BAD_TYPE;
}
- LOGW("Bad XML block: node at 0x%x header size 0x%x too small\n",
+ ALOGW("Bad XML block: node at 0x%x header size 0x%x too small\n",
(int)(((const uint8_t*)node)-((const uint8_t*)mHeader)),
(int)headerSize);
return BAD_TYPE;
@@ -1574,7 +1574,7 @@
if (curPackage != p) {
const ssize_t pidx = mTable.getResourcePackageIndex(attrRes);
if (pidx < 0) {
- LOGE("Style contains key with bad package: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad package: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -1594,7 +1594,7 @@
}
if (curType != t) {
if (t >= curPI->numTypes) {
- LOGE("Style contains key with bad type: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad type: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -1612,7 +1612,7 @@
numEntries = curPI->types[t].numEntries;
}
if (e >= numEntries) {
- LOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -1631,7 +1631,7 @@
mTable.unlock();
- //LOGI("Applying style 0x%08x (force=%d) theme %p...\n", resID, force, this);
+ //ALOGI("Applying style 0x%08x (force=%d) theme %p...\n", resID, force, this);
//dumpToLog();
return NO_ERROR;
@@ -1639,7 +1639,7 @@
status_t ResTable::Theme::setTo(const Theme& other)
{
- //LOGI("Setting theme %p from theme %p...\n", this, &other);
+ //ALOGI("Setting theme %p from theme %p...\n", this, &other);
//dumpToLog();
//other.dumpToLog();
@@ -1670,7 +1670,7 @@
}
}
- //LOGI("Final theme:");
+ //ALOGI("Final theme:");
//dumpToLog();
return NO_ERROR;
@@ -1712,7 +1712,7 @@
resID = te.value.data;
continue;
}
- LOGW("Too many attribute references, stopped at: 0x%08x\n", resID);
+ ALOGW("Too many attribute references, stopped at: 0x%08x\n", resID);
return BAD_INDEX;
} else if (type != Res_value::TYPE_NULL) {
*outValue = te.value;
@@ -1752,21 +1752,21 @@
void ResTable::Theme::dumpToLog() const
{
- LOGI("Theme %p:\n", this);
+ ALOGI("Theme %p:\n", this);
for (size_t i=0; i<Res_MAXPACKAGE; i++) {
package_info* pi = mPackages[i];
if (pi == NULL) continue;
- LOGI(" Package #0x%02x:\n", (int)(i+1));
+ ALOGI(" Package #0x%02x:\n", (int)(i+1));
for (size_t j=0; j<pi->numTypes; j++) {
type_info& ti = pi->types[j];
if (ti.numEntries == 0) continue;
- LOGI(" Type #0x%02x:\n", (int)(j+1));
+ ALOGI(" Type #0x%02x:\n", (int)(j+1));
for (size_t k=0; k<ti.numEntries; k++) {
theme_entry& te = ti.entries[k];
if (te.value.dataType == Res_value::TYPE_NULL) continue;
- LOGI(" 0x%08x: t=0x%x, d=0x%08x (block=%d)\n",
+ ALOGI(" 0x%08x: t=0x%x, d=0x%08x (block=%d)\n",
(int)Res_MAKEID(i, j, k),
te.value.dataType, (int)te.value.data, (int)te.stringBlock);
}
@@ -1779,7 +1779,7 @@
{
memset(&mParams, 0, sizeof(mParams));
memset(mPackageMap, 0, sizeof(mPackageMap));
- //LOGI("Creating ResTable %p\n", this);
+ //ALOGI("Creating ResTable %p\n", this);
}
ResTable::ResTable(const void* data, size_t size, void* cookie, bool copyData)
@@ -1789,12 +1789,12 @@
memset(mPackageMap, 0, sizeof(mPackageMap));
add(data, size, cookie, copyData);
LOG_FATAL_IF(mError != NO_ERROR, "Error parsing resource table");
- //LOGI("Creating ResTable %p\n", this);
+ //ALOGI("Creating ResTable %p\n", this);
}
ResTable::~ResTable()
{
- //LOGI("Destroying ResTable in %p\n", this);
+ //ALOGI("Destroying ResTable in %p\n", this);
uninit();
}
@@ -1813,7 +1813,7 @@
{
const void* data = asset->getBuffer(true);
if (data == NULL) {
- LOGW("Unable to get buffer of resource asset file");
+ ALOGW("Unable to get buffer of resource asset file");
return UNKNOWN_ERROR;
}
size_t size = (size_t)asset->getLength();
@@ -1867,7 +1867,7 @@
const bool notDeviceEndian = htods(0xf0) != 0xf0;
LOAD_TABLE_NOISY(
- LOGV("Adding resources to ResTable: data=%p, size=0x%x, cookie=%p, asset=%p, copy=%d "
+ ALOGV("Adding resources to ResTable: data=%p, size=0x%x, cookie=%p, asset=%p, copy=%d "
"idmap=%p\n", data, size, cookie, asset, copyData, idmap));
if (copyData || notDeviceEndian) {
@@ -1881,20 +1881,20 @@
header->header = (const ResTable_header*)data;
header->size = dtohl(header->header->header.size);
- //LOGI("Got size 0x%x, again size 0x%x, raw size 0x%x\n", header->size,
+ //ALOGI("Got size 0x%x, again size 0x%x, raw size 0x%x\n", header->size,
// dtohl(header->header->header.size), header->header->header.size);
LOAD_TABLE_NOISY(LOGV("Loading ResTable @%p:\n", header->header));
LOAD_TABLE_NOISY(printHexData(2, header->header, header->size < 256 ? header->size : 256,
16, 16, 0, false, printToLogFunc));
if (dtohs(header->header->header.headerSize) > header->size
|| header->size > size) {
- LOGW("Bad resource table: header size 0x%x or total size 0x%x is larger than data size 0x%x\n",
+ ALOGW("Bad resource table: header size 0x%x or total size 0x%x is larger than data size 0x%x\n",
(int)dtohs(header->header->header.headerSize),
(int)header->size, (int)size);
return (mError=BAD_TYPE);
}
if (((dtohs(header->header->header.headerSize)|header->size)&0x3) != 0) {
- LOGW("Bad resource table: header size 0x%x or total size 0x%x is not on an integer boundary\n",
+ ALOGW("Bad resource table: header size 0x%x or total size 0x%x is not on an integer boundary\n",
(int)dtohs(header->header->header.headerSize),
(int)header->size);
return (mError=BAD_TYPE);
@@ -1927,11 +1927,11 @@
return (mError=err);
}
} else {
- LOGW("Multiple string chunks found in resource table.");
+ ALOGW("Multiple string chunks found in resource table.");
}
} else if (ctype == RES_TABLE_PACKAGE_TYPE) {
if (curPackage >= dtohl(header->header->packageCount)) {
- LOGW("More package chunks were found than the %d declared in the header.",
+ ALOGW("More package chunks were found than the %d declared in the header.",
dtohl(header->header->packageCount));
return (mError=BAD_TYPE);
}
@@ -1949,7 +1949,7 @@
}
curPackage++;
} else {
- LOGW("Unknown chunk type %p in table at %p.\n",
+ ALOGW("Unknown chunk type %p in table at %p.\n",
(void*)(int)(ctype),
(void*)(((const uint8_t*)chunk) - ((const uint8_t*)header->header)));
}
@@ -1958,13 +1958,13 @@
}
if (curPackage < dtohl(header->header->packageCount)) {
- LOGW("Fewer package chunks (%d) were found than the %d declared in the header.",
+ ALOGW("Fewer package chunks (%d) were found than the %d declared in the header.",
(int)curPackage, dtohl(header->header->packageCount));
return (mError=BAD_TYPE);
}
mError = header->values.getError();
if (mError != NO_ERROR) {
- LOGW("No string values found in resource table!");
+ ALOGW("No string values found in resource table!");
}
TABLE_NOISY(LOGV("Returning from add with mError=%d\n", mError));
@@ -2011,20 +2011,20 @@
if (p < 0) {
if (Res_GETPACKAGE(resID)+1 == 0) {
- LOGW("No package identifier when getting name for resource number 0x%08x", resID);
+ ALOGW("No package identifier when getting name for resource number 0x%08x", resID);
} else {
- LOGW("No known package when getting name for resource number 0x%08x", resID);
+ ALOGW("No known package when getting name for resource number 0x%08x", resID);
}
return false;
}
if (t < 0) {
- LOGW("No type identifier when getting name for resource number 0x%08x", resID);
+ ALOGW("No type identifier when getting name for resource number 0x%08x", resID);
return false;
}
const PackageGroup* const grp = mPackageGroups[p];
if (grp == NULL) {
- LOGW("Bad identifier when getting name for resource number 0x%08x", resID);
+ ALOGW("Bad identifier when getting name for resource number 0x%08x", resID);
return false;
}
if (grp->packages.size() > 0) {
@@ -2067,14 +2067,14 @@
if (p < 0) {
if (Res_GETPACKAGE(resID)+1 == 0) {
- LOGW("No package identifier when getting value for resource number 0x%08x", resID);
+ ALOGW("No package identifier when getting value for resource number 0x%08x", resID);
} else {
- LOGW("No known package when getting value for resource number 0x%08x", resID);
+ ALOGW("No known package when getting value for resource number 0x%08x", resID);
}
return BAD_INDEX;
}
if (t < 0) {
- LOGW("No type identifier when getting value for resource number 0x%08x", resID);
+ ALOGW("No type identifier when getting value for resource number 0x%08x", resID);
return BAD_INDEX;
}
@@ -2089,7 +2089,7 @@
// recently added.
const PackageGroup* const grp = mPackageGroups[p];
if (grp == NULL) {
- LOGW("Bad identifier when getting value for resource number 0x%08x", resID);
+ ALOGW("Bad identifier when getting value for resource number 0x%08x", resID);
return BAD_INDEX;
}
@@ -2099,7 +2099,7 @@
if (density > 0) {
overrideConfig = (ResTable_config*) malloc(sizeof(ResTable_config));
if (overrideConfig == NULL) {
- LOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
+ ALOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
return BAD_INDEX;
}
memcpy(overrideConfig, &mParams, sizeof(ResTable_config));
@@ -2122,7 +2122,7 @@
resID, &overlayResID);
if (retval == NO_ERROR && overlayResID != 0x0) {
// for this loop iteration, this is the type and entry we really want
- LOGV("resource map 0x%08x -> 0x%08x\n", resID, overlayResID);
+ ALOGV("resource map 0x%08x -> 0x%08x\n", resID, overlayResID);
T = Res_GETTYPE(overlayResID);
E = Res_GETENTRY(overlayResID);
} else {
@@ -2141,7 +2141,7 @@
// overlay package did not specify a default.
// Non-overlay packages are still required to provide a default.
if (offset < 0 && ip == 0) {
- LOGW("Failure getting entry for 0x%08x (t=%d e=%d) in package %zd (error %d)\n",
+ ALOGW("Failure getting entry for 0x%08x (t=%d e=%d) in package %zd (error %d)\n",
resID, T, E, ip, (int)offset);
rc = offset;
goto out;
@@ -2151,7 +2151,7 @@
if ((dtohs(entry->flags)&entry->FLAG_COMPLEX) != 0) {
if (!mayBeBag) {
- LOGW("Requesting resource %p failed because it is complex\n",
+ ALOGW("Requesting resource %p failed because it is complex\n",
(void*)resID);
}
continue;
@@ -2161,7 +2161,7 @@
<< HexDump(type, dtohl(type->header.size)) << endl);
if ((size_t)offset > (dtohl(type->header.size)-sizeof(Res_value))) {
- LOGW("ResTable_item at %d is beyond type chunk data %d",
+ ALOGW("ResTable_item at %d is beyond type chunk data %d",
(int)offset, dtohl(type->header.size));
rc = BAD_TYPE;
goto out;
@@ -2307,23 +2307,23 @@
const int e = Res_GETENTRY(resID);
if (p < 0) {
- LOGW("Invalid package identifier when getting bag for resource number 0x%08x", resID);
+ ALOGW("Invalid package identifier when getting bag for resource number 0x%08x", resID);
return BAD_INDEX;
}
if (t < 0) {
- LOGW("No type identifier when getting bag for resource number 0x%08x", resID);
+ ALOGW("No type identifier when getting bag for resource number 0x%08x", resID);
return BAD_INDEX;
}
//printf("Get bag: id=0x%08x, p=%d, t=%d\n", resID, p, t);
PackageGroup* const grp = mPackageGroups[p];
if (grp == NULL) {
- LOGW("Bad identifier when getting bag for resource number 0x%08x", resID);
+ ALOGW("Bad identifier when getting bag for resource number 0x%08x", resID);
return false;
}
if (t >= (int)grp->typeCount) {
- LOGW("Type identifier 0x%x is larger than type count 0x%x",
+ ALOGW("Type identifier 0x%x is larger than type count 0x%x",
t+1, (int)grp->typeCount);
return BAD_INDEX;
}
@@ -2334,7 +2334,7 @@
const size_t NENTRY = typeConfigs->entryCount;
if (e >= (int)NENTRY) {
- LOGW("Entry identifier 0x%x is larger than entry count 0x%x",
+ ALOGW("Entry identifier 0x%x is larger than entry count 0x%x",
e, (int)typeConfigs->entryCount);
return BAD_INDEX;
}
@@ -2350,10 +2350,10 @@
*outTypeSpecFlags = set->typeSpecFlags;
}
*outBag = (bag_entry*)(set+1);
- //LOGI("Found existing bag for: %p\n", (void*)resID);
+ //ALOGI("Found existing bag for: %p\n", (void*)resID);
return set->numAttrs;
}
- LOGW("Attempt to retrieve bag 0x%08x which is invalid or in a cycle.",
+ ALOGW("Attempt to retrieve bag 0x%08x which is invalid or in a cycle.",
resID);
return BAD_INDEX;
}
@@ -2401,7 +2401,7 @@
resID, &overlayResID);
if (retval == NO_ERROR && overlayResID != 0x0) {
// for this loop iteration, this is the type and entry we really want
- LOGV("resource map 0x%08x -> 0x%08x\n", resID, overlayResID);
+ ALOGV("resource map 0x%08x -> 0x%08x\n", resID, overlayResID);
T = Res_GETTYPE(overlayResID);
E = Res_GETENTRY(overlayResID);
} else {
@@ -2413,9 +2413,9 @@
const ResTable_type* type;
const ResTable_entry* entry;
const Type* typeClass;
- LOGV("Getting entry pkg=%p, t=%d, e=%d\n", package, T, E);
+ ALOGV("Getting entry pkg=%p, t=%d, e=%d\n", package, T, E);
ssize_t offset = getEntry(package, T, E, &mParams, &type, &entry, &typeClass);
- LOGV("Resulting offset=%d\n", offset);
+ ALOGV("Resulting offset=%d\n", offset);
if (offset <= 0) {
// No {entry, appropriate config} pair found in package. If this
// package is an overlay package (ip != 0), this simply means the
@@ -2429,7 +2429,7 @@
}
if ((dtohs(entry->flags)&entry->FLAG_COMPLEX) == 0) {
- LOGW("Skipping entry %p in package table %d because it is not complex!\n",
+ ALOGW("Skipping entry %p in package table %d because it is not complex!\n",
(void*)resID, (int)ip);
continue;
}
@@ -2505,7 +2505,7 @@
TABLE_NOISY(printf("Now at %p\n", (void*)curOff));
if ((size_t)curOff > (dtohl(type->header.size)-sizeof(ResTable_map))) {
- LOGW("ResTable_map at %d is beyond type chunk data %d",
+ ALOGW("ResTable_map at %d is beyond type chunk data %d",
(int)curOff, dtohl(type->header.size));
return BAD_TYPE;
}
@@ -2676,7 +2676,7 @@
&& name[6] == '_') {
int index = atoi(String8(name + 7, nameLen - 7).string());
if (Res_CHECKID(index)) {
- LOGW("Array resource index: %d is too large.",
+ ALOGW("Array resource index: %d is too large.",
index);
return 0;
}
@@ -2792,12 +2792,12 @@
offset += typeOffset;
if (offset > (dtohl(ty->header.size)-sizeof(ResTable_entry))) {
- LOGW("ResTable_entry at %d is beyond type chunk data %d",
+ ALOGW("ResTable_entry at %d is beyond type chunk data %d",
offset, dtohl(ty->header.size));
return 0;
}
if ((offset&0x3) != 0) {
- LOGW("ResTable_entry at %d (pkg=%d type=%d ent=%d) is not on an integer boundary when looking for %s:%s/%s",
+ ALOGW("ResTable_entry at %d (pkg=%d type=%d ent=%d) is not on an integer boundary when looking for %s:%s/%s",
(int)offset, (int)group->id, (int)ti+1, (int)i,
String8(package, packageLen).string(),
String8(type, typeLen).string(),
@@ -2808,7 +2808,7 @@
const ResTable_entry* const entry = (const ResTable_entry*)
(((const uint8_t*)ty) + offset);
if (dtohs(entry->size) < sizeof(*entry)) {
- LOGW("ResTable_entry size %d is too small", dtohs(entry->size));
+ ALOGW("ResTable_entry size %d is too small", dtohs(entry->size));
return BAD_TYPE;
}
@@ -3898,9 +3898,9 @@
void ResTable::getLocales(Vector<String8>* locales) const
{
Vector<ResTable_config> configs;
- LOGV("calling getConfigurations");
+ ALOGV("calling getConfigurations");
getConfigurations(&configs);
- LOGV("called getConfigurations size=%d", (int)configs.size());
+ ALOGV("called getConfigurations size=%d", (int)configs.size());
const size_t I = configs.size();
for (size_t i=0; i<I; i++) {
char locale[6];
@@ -3924,18 +3924,18 @@
const ResTable_type** outType, const ResTable_entry** outEntry,
const Type** outTypeClass) const
{
- LOGV("Getting entry from package %p\n", package);
+ ALOGV("Getting entry from package %p\n", package);
const ResTable_package* const pkg = package->package;
const Type* allTypes = package->getType(typeIndex);
- LOGV("allTypes=%p\n", allTypes);
+ ALOGV("allTypes=%p\n", allTypes);
if (allTypes == NULL) {
- LOGV("Skipping entry type index 0x%02x because type is NULL!\n", typeIndex);
+ ALOGV("Skipping entry type index 0x%02x because type is NULL!\n", typeIndex);
return 0;
}
if ((size_t)entryIndex >= allTypes->entryCount) {
- LOGW("getEntry failing because entryIndex %d is beyond type entryCount %d",
+ ALOGW("getEntry failing because entryIndex %d is beyond type entryCount %d",
entryIndex, (int)allTypes->entryCount);
return BAD_TYPE;
}
@@ -4039,12 +4039,12 @@
<< ", offset=" << (void*)offset << endl);
if (offset > (dtohl(type->header.size)-sizeof(ResTable_entry))) {
- LOGW("ResTable_entry at 0x%x is beyond type chunk data 0x%x",
+ ALOGW("ResTable_entry at 0x%x is beyond type chunk data 0x%x",
offset, dtohl(type->header.size));
return BAD_TYPE;
}
if ((offset&0x3) != 0) {
- LOGW("ResTable_entry at 0x%x is not on an integer boundary",
+ ALOGW("ResTable_entry at 0x%x is not on an integer boundary",
offset);
return BAD_TYPE;
}
@@ -4052,7 +4052,7 @@
const ResTable_entry* const entry = (const ResTable_entry*)
(((const uint8_t*)type) + offset);
if (dtohs(entry->size) < sizeof(*entry)) {
- LOGW("ResTable_entry size 0x%x is too small", dtohs(entry->size));
+ ALOGW("ResTable_entry size 0x%x is too small", dtohs(entry->size));
return BAD_TYPE;
}
@@ -4077,22 +4077,22 @@
const size_t pkgSize = dtohl(pkg->header.size);
if (dtohl(pkg->typeStrings) >= pkgSize) {
- LOGW("ResTable_package type strings at %p are past chunk size %p.",
+ ALOGW("ResTable_package type strings at %p are past chunk size %p.",
(void*)dtohl(pkg->typeStrings), (void*)pkgSize);
return (mError=BAD_TYPE);
}
if ((dtohl(pkg->typeStrings)&0x3) != 0) {
- LOGW("ResTable_package type strings at %p is not on an integer boundary.",
+ ALOGW("ResTable_package type strings at %p is not on an integer boundary.",
(void*)dtohl(pkg->typeStrings));
return (mError=BAD_TYPE);
}
if (dtohl(pkg->keyStrings) >= pkgSize) {
- LOGW("ResTable_package key strings at %p are past chunk size %p.",
+ ALOGW("ResTable_package key strings at %p are past chunk size %p.",
(void*)dtohl(pkg->keyStrings), (void*)pkgSize);
return (mError=BAD_TYPE);
}
if ((dtohl(pkg->keyStrings)&0x3) != 0) {
- LOGW("ResTable_package key strings at %p is not on an integer boundary.",
+ ALOGW("ResTable_package key strings at %p is not on an integer boundary.",
(void*)dtohl(pkg->keyStrings));
return (mError=BAD_TYPE);
}
@@ -4195,7 +4195,7 @@
if ((dtohl(typeSpec->entryCount) > (INT32_MAX/sizeof(uint32_t))
|| dtohs(typeSpec->header.headerSize)+(sizeof(uint32_t)*dtohl(typeSpec->entryCount))
> typeSpecSize)) {
- LOGW("ResTable_typeSpec entry index to %p extends beyond chunk end %p.",
+ ALOGW("ResTable_typeSpec entry index to %p extends beyond chunk end %p.",
(void*)(dtohs(typeSpec->header.headerSize)
+(sizeof(uint32_t)*dtohl(typeSpec->entryCount))),
(void*)typeSpecSize);
@@ -4203,7 +4203,7 @@
}
if (typeSpec->id == 0) {
- LOGW("ResTable_type has an id of 0.");
+ ALOGW("ResTable_type has an id of 0.");
return (mError=BAD_TYPE);
}
@@ -4215,7 +4215,7 @@
t = new Type(header, package, dtohl(typeSpec->entryCount));
package->types.editItemAt(typeSpec->id-1) = t;
} else if (dtohl(typeSpec->entryCount) != t->entryCount) {
- LOGW("ResTable_typeSpec entry count inconsistent: given %d, previously %d",
+ ALOGW("ResTable_typeSpec entry count inconsistent: given %d, previously %d",
(int)dtohl(typeSpec->entryCount), (int)t->entryCount);
return (mError=BAD_TYPE);
}
@@ -4240,7 +4240,7 @@
(void*)typeSize));
if (dtohs(type->header.headerSize)+(sizeof(uint32_t)*dtohl(type->entryCount))
> typeSize) {
- LOGW("ResTable_type entry index to %p extends beyond chunk end %p.",
+ ALOGW("ResTable_type entry index to %p extends beyond chunk end %p.",
(void*)(dtohs(type->header.headerSize)
+(sizeof(uint32_t)*dtohl(type->entryCount))),
(void*)typeSize);
@@ -4248,12 +4248,12 @@
}
if (dtohl(type->entryCount) != 0
&& dtohl(type->entriesStart) > (typeSize-sizeof(ResTable_entry))) {
- LOGW("ResTable_type entriesStart at %p extends beyond chunk end %p.",
+ ALOGW("ResTable_type entriesStart at %p extends beyond chunk end %p.",
(void*)dtohl(type->entriesStart), (void*)typeSize);
return (mError=BAD_TYPE);
}
if (type->id == 0) {
- LOGW("ResTable_type has an id of 0.");
+ ALOGW("ResTable_type has an id of 0.");
return (mError=BAD_TYPE);
}
@@ -4265,7 +4265,7 @@
t = new Type(header, package, dtohl(type->entryCount));
package->types.editItemAt(type->id-1) = t;
} else if (dtohl(type->entryCount) != t->entryCount) {
- LOGW("ResTable_type entry count inconsistent: given %d, previously %d",
+ ALOGW("ResTable_type entry count inconsistent: given %d, previously %d",
(int)dtohl(type->entryCount), (int)t->entryCount);
return (mError=BAD_TYPE);
}
@@ -4273,7 +4273,7 @@
TABLE_GETENTRY(
ResTable_config thisConfig;
thisConfig.copyFromDtoH(type->config);
- LOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
+ ALOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
"orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d "
"swdp:%d wdp:%d hdp:%d\n",
type->id,
@@ -4346,7 +4346,7 @@
| (0x0000ffff & (entryIndex));
resource_name resName;
if (!this->getResourceName(resID, &resName)) {
- LOGW("idmap: resource 0x%08x has spec but lacks values, skipping\n", resID);
+ ALOGW("idmap: resource 0x%08x has spec but lacks values, skipping\n", resID);
continue;
}
@@ -4368,7 +4368,7 @@
}
#if 0
if (overlayResID != 0) {
- LOGD("%s/%s 0x%08x -> 0x%08x\n",
+ ALOGD("%s/%s 0x%08x -> 0x%08x\n",
String8(String16(resName.type)).string(),
String8(String16(resName.name)).string(),
resID, overlayResID);
diff --git a/libs/utils/Static.cpp b/libs/utils/Static.cpp
index ceca435..bfcb2da 100644
--- a/libs/utils/Static.cpp
+++ b/libs/utils/Static.cpp
@@ -57,8 +57,8 @@
virtual status_t writeLines(const struct iovec& vec, size_t N)
{
//android_writevLog(&vec, N); <-- this is now a no-op
- if (N != 1) LOGI("WARNING: writeLines N=%d\n", N);
- LOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
+ if (N != 1) ALOGI("WARNING: writeLines N=%d\n", N);
+ ALOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
return NO_ERROR;
}
};
diff --git a/libs/utils/StopWatch.cpp b/libs/utils/StopWatch.cpp
index b5dda2f..595aec3 100644
--- a/libs/utils/StopWatch.cpp
+++ b/libs/utils/StopWatch.cpp
@@ -39,11 +39,11 @@
{
nsecs_t elapsed = elapsedTime();
const int n = mNumLaps;
- LOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
+ ALOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
for (int i=0 ; i<n ; i++) {
const nsecs_t soFar = mLaps[i].soFar;
const nsecs_t thisLap = mLaps[i].thisLap;
- LOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
+ ALOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
}
}
diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp
index 00498bd..8512170 100644
--- a/libs/utils/StreamingZipInflater.cpp
+++ b/libs/utils/StreamingZipInflater.cpp
@@ -77,7 +77,7 @@
}
void StreamingZipInflater::initInflateState() {
- LOGV("Initializing inflate state");
+ ALOGV("Initializing inflate state");
memset(&mInflateState, 0, sizeof(mInflateState));
mInflateState.zalloc = Z_NULL;
@@ -138,7 +138,7 @@
if (mInflateState.avail_in == 0) {
int err = readNextChunk();
if (err < 0) {
- LOGE("Unable to access asset data: %d", err);
+ ALOGE("Unable to access asset data: %d", err);
if (!mStreamNeedsInit) {
::inflateEnd(&mInflateState);
initInflateState();
@@ -152,20 +152,20 @@
mInflateState.avail_out = mOutBufSize;
/*
- LOGV("Inflating to outbuf: avail_in=%u avail_out=%u next_in=%p next_out=%p",
+ ALOGV("Inflating to outbuf: avail_in=%u avail_out=%u next_in=%p next_out=%p",
mInflateState.avail_in, mInflateState.avail_out,
mInflateState.next_in, mInflateState.next_out);
*/
int result = Z_OK;
if (mStreamNeedsInit) {
- LOGV("Initializing zlib to inflate");
+ ALOGV("Initializing zlib to inflate");
result = inflateInit2(&mInflateState, -MAX_WBITS);
mStreamNeedsInit = false;
}
if (result == Z_OK) result = ::inflate(&mInflateState, Z_SYNC_FLUSH);
if (result < 0) {
// Whoops, inflation failed
- LOGE("Error inflating asset: %d", result);
+ ALOGE("Error inflating asset: %d", result);
::inflateEnd(&mInflateState);
initInflateState();
return -1;
@@ -192,10 +192,10 @@
size_t toRead = min_of(mInBufSize, mInTotalSize - mInNextChunkOffset);
if (toRead > 0) {
ssize_t didRead = ::read(mFd, mInBuf, toRead);
- //LOGV("Reading input chunk, size %08x didread %08x", toRead, didRead);
+ //ALOGV("Reading input chunk, size %08x didread %08x", toRead, didRead);
if (didRead < 0) {
// TODO: error
- LOGE("Error reading asset data");
+ ALOGE("Error reading asset data");
return didRead;
} else {
mInNextChunkOffset += didRead;
diff --git a/libs/utils/String16.cpp b/libs/utils/String16.cpp
index 4ce1664..94e072f 100644
--- a/libs/utils/String16.cpp
+++ b/libs/utils/String16.cpp
@@ -112,7 +112,7 @@
{
size_t len = strlen16(o);
SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
- LOG_ASSERT(buf, "Unable to allocate shared buffer");
+ ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char16_t* str = (char16_t*)buf->data();
strcpy16(str, o);
@@ -126,7 +126,7 @@
String16::String16(const char16_t* o, size_t len)
{
SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
- LOG_ASSERT(buf, "Unable to allocate shared buffer");
+ ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char16_t* str = (char16_t*)buf->data();
memcpy(str, o, len*sizeof(char16_t));
diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp
index 0bc5aff..562f026 100644
--- a/libs/utils/String8.cpp
+++ b/libs/utils/String8.cpp
@@ -80,7 +80,7 @@
{
if (len > 0) {
SharedBuffer* buf = SharedBuffer::alloc(len+1);
- LOG_ASSERT(buf, "Unable to allocate shared buffer");
+ ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char* str = (char*)buf->data();
memcpy(str, in, len);
@@ -103,7 +103,7 @@
}
SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
- LOG_ASSERT(buf, "Unable to allocate shared buffer");
+ ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (!buf) {
return getEmptyString();
}
@@ -125,7 +125,7 @@
}
SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
- LOG_ASSERT(buf, "Unable to allocate shared buffer");
+ ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (!buf) {
return getEmptyString();
}
diff --git a/libs/utils/SystemClock.cpp b/libs/utils/SystemClock.cpp
index 062e6d7..8b8ac10 100644
--- a/libs/utils/SystemClock.cpp
+++ b/libs/utils/SystemClock.cpp
@@ -64,25 +64,25 @@
tv.tv_sec = (time_t) (millis / 1000LL);
tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL);
- LOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
+ ALOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
#ifdef HAVE_ANDROID_OS
fd = open("/dev/alarm", O_RDWR);
if(fd < 0) {
- LOGW("Unable to open alarm driver: %s\n", strerror(errno));
+ ALOGW("Unable to open alarm driver: %s\n", strerror(errno));
return -1;
}
ts.tv_sec = tv.tv_sec;
ts.tv_nsec = tv.tv_usec * 1000;
res = ioctl(fd, ANDROID_ALARM_SET_RTC, &ts);
if(res < 0) {
- LOGW("Unable to set rtc to %ld: %s\n", tv.tv_sec, strerror(errno));
+ ALOGW("Unable to set rtc to %ld: %s\n", tv.tv_sec, strerror(errno));
ret = -1;
}
close(fd);
#else
if (settimeofday(&tv, NULL) != 0) {
- LOGW("Unable to set clock to %d.%d: %s\n",
+ ALOGW("Unable to set clock to %d.%d: %s\n",
(int) tv.tv_sec, (int) tv.tv_usec, strerror(errno));
ret = -1;
}
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index 5dbcb75..e343c62 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -163,7 +163,7 @@
(android_pthread_entry)entryFunction, userData);
pthread_attr_destroy(&attr);
if (result != 0) {
- LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
+ ALOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
"(android threadPriority=%d)",
entryFunction, result, errno, threadPriority);
return 0;
@@ -205,7 +205,7 @@
delete pDetails;
- LOG(LOG_VERBOSE, "thread", "thread exiting\n");
+ ALOG(LOG_VERBOSE, "thread", "thread exiting\n");
return (unsigned int) result;
}
@@ -232,7 +232,7 @@
if (hThread == NULL)
#endif
{
- LOG(LOG_WARN, "thread", "WARNING: thread create failed\n");
+ ALOG(LOG_WARN, "thread", "WARNING: thread create failed\n");
return false;
}
@@ -470,7 +470,7 @@
void Mutex::unlock()
{
if (!ReleaseMutex((HANDLE) mState))
- LOG(LOG_WARN, "thread", "WARNING: bad result from unlocking mutex\n");
+ ALOG(LOG_WARN, "thread", "WARNING: bad result from unlocking mutex\n");
}
status_t Mutex::tryLock()
@@ -479,7 +479,7 @@
dwWaitResult = WaitForSingleObject((HANDLE) mState, 0);
if (dwWaitResult != WAIT_OBJECT_0 && dwWaitResult != WAIT_TIMEOUT)
- LOG(LOG_WARN, "thread", "WARNING: bad result from try-locking mutex\n");
+ ALOG(LOG_WARN, "thread", "WARNING: bad result from try-locking mutex\n");
return (dwWaitResult == WAIT_OBJECT_0) ? 0 : -1;
}
@@ -870,7 +870,7 @@
{
Mutex::Autolock _l(mLock);
if (mThread == getThreadId()) {
- LOGW(
+ ALOGW(
"Thread (this=%p): don't call waitForExit() from this "
"Thread object's thread. It's a guaranteed deadlock!",
this);
@@ -894,7 +894,7 @@
{
Mutex::Autolock _l(mLock);
if (mThread == getThreadId()) {
- LOGW(
+ ALOGW(
"Thread (this=%p): don't call join() from this "
"Thread object's thread. It's a guaranteed deadlock!",
this);
diff --git a/libs/utils/Timers.cpp b/libs/utils/Timers.cpp
index 64a29f5..64b4701 100644
--- a/libs/utils/Timers.cpp
+++ b/libs/utils/Timers.cpp
@@ -113,7 +113,7 @@
/*static*/ void DurationTimer::addToTimeval(struct timeval* ptv, long usec)
{
if (usec < 0) {
- LOG(LOG_WARN, "", "Negative values not supported in addToTimeval\n");
+ ALOG(LOG_WARN, "", "Negative values not supported in addToTimeval\n");
return;
}
diff --git a/libs/utils/Tokenizer.cpp b/libs/utils/Tokenizer.cpp
index b3445b7..efda2bf 100644
--- a/libs/utils/Tokenizer.cpp
+++ b/libs/utils/Tokenizer.cpp
@@ -55,12 +55,12 @@
int fd = ::open(filename.string(), O_RDONLY);
if (fd < 0) {
result = -errno;
- LOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
} else {
struct stat stat;
if (fstat(fd, &stat)) {
result = -errno;
- LOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
} else {
size_t length = size_t(stat.st_size);
@@ -80,7 +80,7 @@
ssize_t nrd = read(fd, buffer, length);
if (nrd < 0) {
result = -errno;
- LOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
delete[] buffer;
buffer = NULL;
} else {
@@ -118,7 +118,7 @@
String8 Tokenizer::nextToken(const char* delimiters) {
#if DEBUG_TOKENIZER
- LOGD("nextToken");
+ ALOGD("nextToken");
#endif
const char* end = getEnd();
const char* tokenStart = mCurrent;
@@ -134,7 +134,7 @@
void Tokenizer::nextLine() {
#if DEBUG_TOKENIZER
- LOGD("nextLine");
+ ALOGD("nextLine");
#endif
const char* end = getEnd();
while (mCurrent != end) {
@@ -148,7 +148,7 @@
void Tokenizer::skipDelimiters(const char* delimiters) {
#if DEBUG_TOKENIZER
- LOGD("skipDelimiters");
+ ALOGD("skipDelimiters");
#endif
const char* end = getEnd();
while (mCurrent != end) {
diff --git a/libs/utils/VectorImpl.cpp b/libs/utils/VectorImpl.cpp
index bfb37a6..220ae3e 100644
--- a/libs/utils/VectorImpl.cpp
+++ b/libs/utils/VectorImpl.cpp
@@ -56,7 +56,7 @@
VectorImpl::~VectorImpl()
{
- LOG_ASSERT(!mCount,
+ ALOG_ASSERT(!mCount,
"[%p] "
"subclasses of VectorImpl must call finish_vector()"
" in their destructor. Leaking %d bytes.",
@@ -66,7 +66,7 @@
VectorImpl& VectorImpl::operator = (const VectorImpl& rhs)
{
- LOG_ASSERT(mItemSize == rhs.mItemSize,
+ ALOG_ASSERT(mItemSize == rhs.mItemSize,
"Vector<> have different types (this=%p, rhs=%p)", this, &rhs);
if (this != &rhs) {
release_storage();
@@ -248,7 +248,7 @@
ssize_t VectorImpl::replaceAt(const void* prototype, size_t index)
{
- LOG_ASSERT(index<size(),
+ ALOG_ASSERT(index<size(),
"[%p] replace: index=%d, size=%d", this, (int)index, (int)size());
void* item = editItemLocation(index);
@@ -267,7 +267,7 @@
ssize_t VectorImpl::removeItemsAt(size_t index, size_t count)
{
- LOG_ASSERT((index+count)<=size(),
+ ALOG_ASSERT((index+count)<=size(),
"[%p] remove: index=%d, count=%d, size=%d",
this, (int)index, (int)count, (int)size());
@@ -291,7 +291,7 @@
void* VectorImpl::editItemLocation(size_t index)
{
- LOG_ASSERT(index<capacity(),
+ ALOG_ASSERT(index<capacity(),
"[%p] editItemLocation: index=%d, capacity=%d, count=%d",
this, (int)index, (int)capacity(), (int)mCount);
@@ -303,7 +303,7 @@
const void* VectorImpl::itemLocation(size_t index) const
{
- LOG_ASSERT(index<capacity(),
+ ALOG_ASSERT(index<capacity(),
"[%p] itemLocation: index=%d, capacity=%d, count=%d",
this, (int)index, (int)capacity(), (int)mCount);
@@ -346,17 +346,17 @@
void* VectorImpl::_grow(size_t where, size_t amount)
{
-// LOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
- LOG_ASSERT(where <= mCount,
+ ALOG_ASSERT(where <= mCount,
"[%p] _grow: where=%d, amount=%d, count=%d",
this, (int)where, (int)amount, (int)mCount); // caller already checked
const size_t new_size = mCount + amount;
if (capacity() < new_size) {
const size_t new_capacity = max(kMinVectorCapacity, ((new_size*3)+1)/2);
-// LOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
+// ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
if ((mStorage) &&
(mCount==where) &&
(mFlags & HAS_TRIVIAL_COPY) &&
@@ -399,17 +399,17 @@
if (!mStorage)
return;
-// LOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
- LOG_ASSERT(where + amount <= mCount,
+ ALOG_ASSERT(where + amount <= mCount,
"[%p] _shrink: where=%d, amount=%d, count=%d",
this, (int)where, (int)amount, (int)mCount); // caller already checked
const size_t new_size = mCount - amount;
if (new_size*3 < capacity()) {
const size_t new_capacity = max(kMinVectorCapacity, new_size*2);
-// LOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
+// ALOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
if ((where == new_size) &&
(mFlags & HAS_TRIVIAL_COPY) &&
(mFlags & HAS_TRIVIAL_DTOR))
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp
index b18c383..1498aac 100644
--- a/libs/utils/ZipFileRO.cpp
+++ b/libs/utils/ZipFileRO.cpp
@@ -120,7 +120,7 @@
{
long ent = ((long) entry) - kZipEntryAdj;
if (ent < 0 || ent >= mHashTableSize || mHashTable[ent].name == NULL) {
- LOGW("Invalid ZipEntryRO %p (%ld)\n", entry, ent);
+ ALOGW("Invalid ZipEntryRO %p (%ld)\n", entry, ent);
return -1;
}
return ent;
@@ -142,7 +142,7 @@
*/
fd = ::open(zipFileName, O_RDONLY | O_BINARY);
if (fd < 0) {
- LOGW("Unable to open zip '%s': %s\n", zipFileName, strerror(errno));
+ ALOGW("Unable to open zip '%s': %s\n", zipFileName, strerror(errno));
return NAME_NOT_FOUND;
}
@@ -194,7 +194,7 @@
unsigned char* scanBuf = (unsigned char*) malloc(readAmount);
if (scanBuf == NULL) {
- LOGW("couldn't allocate scanBuf: %s", strerror(errno));
+ ALOGW("couldn't allocate scanBuf: %s", strerror(errno));
free(scanBuf);
return false;
}
@@ -203,14 +203,14 @@
* Make sure this is a Zip archive.
*/
if (lseek64(mFd, 0, SEEK_SET) != 0) {
- LOGW("seek to start failed: %s", strerror(errno));
+ ALOGW("seek to start failed: %s", strerror(errno));
free(scanBuf);
return false;
}
ssize_t actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, sizeof(int32_t)));
if (actual != (ssize_t) sizeof(int32_t)) {
- LOGI("couldn't read first signature from zip archive: %s", strerror(errno));
+ ALOGI("couldn't read first signature from zip archive: %s", strerror(errno));
free(scanBuf);
return false;
}
@@ -218,11 +218,11 @@
{
unsigned int header = get4LE(scanBuf);
if (header == kEOCDSignature) {
- LOGI("Found Zip archive, but it looks empty\n");
+ ALOGI("Found Zip archive, but it looks empty\n");
free(scanBuf);
return false;
} else if (header != kLFHSignature) {
- LOGV("Not a Zip archive (found 0x%08x)\n", header);
+ ALOGV("Not a Zip archive (found 0x%08x)\n", header);
free(scanBuf);
return false;
}
@@ -243,13 +243,13 @@
off64_t searchStart = mFileLength - readAmount;
if (lseek64(mFd, searchStart, SEEK_SET) != searchStart) {
- LOGW("seek %ld failed: %s\n", (long) searchStart, strerror(errno));
+ ALOGW("seek %ld failed: %s\n", (long) searchStart, strerror(errno));
free(scanBuf);
return false;
}
actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, readAmount));
if (actual != (ssize_t) readAmount) {
- LOGW("Zip: read " ZD ", expected " ZD ". Failed: %s\n",
+ ALOGW("Zip: read " ZD ", expected " ZD ". Failed: %s\n",
(ZD_TYPE) actual, (ZD_TYPE) readAmount, strerror(errno));
free(scanBuf);
return false;
@@ -264,12 +264,12 @@
int i;
for (i = readAmount - kEOCDLen; i >= 0; i--) {
if (scanBuf[i] == 0x50 && get4LE(&scanBuf[i]) == kEOCDSignature) {
- LOGV("+++ Found EOCD at buf+%d\n", i);
+ ALOGV("+++ Found EOCD at buf+%d\n", i);
break;
}
}
if (i < 0) {
- LOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
+ ALOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
free(scanBuf);
return false;
}
@@ -290,26 +290,26 @@
// Verify that they look reasonable.
if ((long long) dirOffset + (long long) dirSize > (long long) eocdOffset) {
- LOGW("bad offsets (dir %ld, size %u, eocd %ld)\n",
+ ALOGW("bad offsets (dir %ld, size %u, eocd %ld)\n",
(long) dirOffset, dirSize, (long) eocdOffset);
return false;
}
if (numEntries == 0) {
- LOGW("empty archive?\n");
+ ALOGW("empty archive?\n");
return false;
}
- LOGV("+++ numEntries=%d dirSize=%d dirOffset=%d\n",
+ ALOGV("+++ numEntries=%d dirSize=%d dirOffset=%d\n",
numEntries, dirSize, dirOffset);
mDirectoryMap = new FileMap();
if (mDirectoryMap == NULL) {
- LOGW("Unable to create directory map: %s", strerror(errno));
+ ALOGW("Unable to create directory map: %s", strerror(errno));
return false;
}
if (!mDirectoryMap->create(mFileName, mFd, dirOffset, dirSize, true)) {
- LOGW("Unable to map '%s' (" ZD " to " ZD "): %s\n", mFileName,
+ ALOGW("Unable to map '%s' (" ZD " to " ZD "): %s\n", mFileName,
(ZD_TYPE) dirOffset, (ZD_TYPE) (dirOffset + dirSize), strerror(errno));
return false;
}
@@ -341,17 +341,17 @@
const unsigned char* ptr = cdPtr;
for (int i = 0; i < numEntries; i++) {
if (get4LE(ptr) != kCDESignature) {
- LOGW("Missed a central dir sig (at %d)\n", i);
+ ALOGW("Missed a central dir sig (at %d)\n", i);
goto bail;
}
if (ptr + kCDELen > cdPtr + cdLength) {
- LOGW("Ran off the end (at %d)\n", i);
+ ALOGW("Ran off the end (at %d)\n", i);
goto bail;
}
long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset);
if (localHdrOffset >= mDirectoryOffset) {
- LOGW("bad LFH offset %ld at entry %d\n", localHdrOffset, i);
+ ALOGW("bad LFH offset %ld at entry %d\n", localHdrOffset, i);
goto bail;
}
@@ -367,12 +367,12 @@
ptr += kCDELen + fileNameLen + extraLen + commentLen;
if ((size_t)(ptr - cdPtr) > cdLength) {
- LOGW("bad CD advance (%d vs " ZD ") at entry %d\n",
+ ALOGW("bad CD advance (%d vs " ZD ") at entry %d\n",
(int) (ptr - cdPtr), (ZD_TYPE) cdLength, i);
goto bail;
}
}
- LOGV("+++ zip good scan %d entries\n", numEntries);
+ ALOGV("+++ zip good scan %d entries\n", numEntries);
result = true;
bail:
@@ -452,7 +452,7 @@
ZipEntryRO ZipFileRO::findEntryByIndex(int idx) const
{
if (idx < 0 || idx >= mNumEntries) {
- LOGW("Invalid index %d\n", idx);
+ ALOGW("Invalid index %d\n", idx);
return NULL;
}
@@ -527,7 +527,7 @@
if (pOffset != NULL) {
long localHdrOffset = get4LE(ptr + kCDELocalOffset);
if (localHdrOffset + kLFHLen >= cdOffset) {
- LOGE("ERROR: bad local hdr offset in zip\n");
+ ALOGE("ERROR: bad local hdr offset in zip\n");
return false;
}
@@ -544,12 +544,12 @@
TEMP_FAILURE_RETRY(pread64(mFd, lfhBuf, sizeof(lfhBuf), localHdrOffset));
if (actual != sizeof(lfhBuf)) {
- LOGW("failed reading lfh from offset %ld\n", localHdrOffset);
+ ALOGW("failed reading lfh from offset %ld\n", localHdrOffset);
return false;
}
if (get4LE(lfhBuf) != kLFHSignature) {
- LOGW("didn't find signature at start of lfh; wanted: offset=%ld data=0x%08x; "
+ ALOGW("didn't find signature at start of lfh; wanted: offset=%ld data=0x%08x; "
"got: data=0x%08lx\n",
localHdrOffset, kLFHSignature, get4LE(lfhBuf));
return false;
@@ -567,20 +567,20 @@
AutoMutex _l(mFdLock);
if (lseek64(mFd, localHdrOffset, SEEK_SET) != localHdrOffset) {
- LOGW("failed seeking to lfh at offset %ld\n", localHdrOffset);
+ ALOGW("failed seeking to lfh at offset %ld\n", localHdrOffset);
return false;
}
ssize_t actual =
TEMP_FAILURE_RETRY(read(mFd, lfhBuf, sizeof(lfhBuf)));
if (actual != sizeof(lfhBuf)) {
- LOGW("failed reading lfh from offset %ld\n", localHdrOffset);
+ ALOGW("failed reading lfh from offset %ld\n", localHdrOffset);
return false;
}
if (get4LE(lfhBuf) != kLFHSignature) {
off64_t actualOffset = lseek64(mFd, 0, SEEK_CUR);
- LOGW("didn't find signature at start of lfh; wanted: offset=%ld data=0x%08x; "
+ ALOGW("didn't find signature at start of lfh; wanted: offset=%ld data=0x%08x; "
"got: offset=" ZD " data=0x%08lx\n",
localHdrOffset, kLFHSignature, (ZD_TYPE) actualOffset, get4LE(lfhBuf));
return false;
@@ -591,13 +591,13 @@
off64_t dataOffset = localHdrOffset + kLFHLen
+ get2LE(lfhBuf + kLFHNameLen) + get2LE(lfhBuf + kLFHExtraLen);
if (dataOffset >= cdOffset) {
- LOGW("bad data offset %ld in zip\n", (long) dataOffset);
+ ALOGW("bad data offset %ld in zip\n", (long) dataOffset);
return false;
}
/* check lengths */
if ((off64_t)(dataOffset + compLen) > cdOffset) {
- LOGW("bad compressed length in zip (%ld + " ZD " > %ld)\n",
+ ALOGW("bad compressed length in zip (%ld + " ZD " > %ld)\n",
(long) dataOffset, (ZD_TYPE) compLen, (long) cdOffset);
return false;
}
@@ -605,7 +605,7 @@
if (method == kCompressStored &&
(off64_t)(dataOffset + uncompLen) > cdOffset)
{
- LOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
+ ALOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
(long) dataOffset, (ZD_TYPE) uncompLen, (long) cdOffset);
return false;
}
@@ -754,14 +754,14 @@
if (method == kCompressStored) {
ssize_t actual = write(fd, ptr, uncompLen);
if (actual < 0) {
- LOGE("Write failed: %s\n", strerror(errno));
+ ALOGE("Write failed: %s\n", strerror(errno));
goto unmap;
} else if ((size_t) actual != uncompLen) {
- LOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
+ ALOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
(ZD_TYPE) actual, (ZD_TYPE) uncompLen);
goto unmap;
} else {
- LOGI("+++ successful write\n");
+ ALOGI("+++ successful write\n");
}
} else {
if (!inflateBuffer(fd, ptr, uncompLen, compLen))
@@ -806,10 +806,10 @@
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -819,7 +819,7 @@
*/
zerr = inflate(&zstream, Z_FINISH);
if (zerr != Z_STREAM_END) {
- LOGW("Zip inflate failed, zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)\n",
+ ALOGW("Zip inflate failed, zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)\n",
zerr, zstream.next_in, zstream.avail_in,
zstream.next_out, zstream.avail_out);
goto z_bail;
@@ -827,7 +827,7 @@
/* paranoia */
if (zstream.total_out != uncompLen) {
- LOGW("Size mismatch on inflated file (%ld vs " ZD ")\n",
+ ALOGW("Size mismatch on inflated file (%ld vs " ZD ")\n",
zstream.total_out, (ZD_TYPE) uncompLen);
goto z_bail;
}
@@ -873,10 +873,10 @@
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -890,7 +890,7 @@
*/
zerr = inflate(&zstream, Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
- LOGW("zlib inflate: zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)\n",
+ ALOGW("zlib inflate: zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)\n",
zerr, zstream.next_in, zstream.avail_in,
zstream.next_out, zstream.avail_out);
goto z_bail;
@@ -903,7 +903,7 @@
long writeSize = zstream.next_out - writeBuf;
int cc = write(fd, writeBuf, writeSize);
if (cc != (int) writeSize) {
- LOGW("write failed in inflate (%d vs %ld)\n", cc, writeSize);
+ ALOGW("write failed in inflate (%d vs %ld)\n", cc, writeSize);
goto z_bail;
}
@@ -916,7 +916,7 @@
/* paranoia */
if (zstream.total_out != uncompLen) {
- LOGW("Size mismatch on inflated file (%ld vs " ZD ")\n",
+ ALOGW("Size mismatch on inflated file (%ld vs " ZD ")\n",
zstream.total_out, (ZD_TYPE) uncompLen);
goto z_bail;
}
diff --git a/libs/utils/ZipUtils.cpp b/libs/utils/ZipUtils.cpp
index 9138878..2dbdc1d 100644
--- a/libs/utils/ZipUtils.cpp
+++ b/libs/utils/ZipUtils.cpp
@@ -77,10 +77,10 @@
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -95,12 +95,12 @@
if (zstream.avail_in == 0) {
getSize = (compRemaining > kReadBufSize) ?
kReadBufSize : compRemaining;
- LOGV("+++ reading %ld bytes (%ld left)\n",
+ ALOGV("+++ reading %ld bytes (%ld left)\n",
getSize, compRemaining);
int cc = read(fd, readBuf, getSize);
if (cc != (int) getSize) {
- LOGD("inflate read failed (%d vs %ld)\n",
+ ALOGD("inflate read failed (%d vs %ld)\n",
cc, getSize);
goto z_bail;
}
@@ -114,7 +114,7 @@
/* uncompress the data */
zerr = inflate(&zstream, Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
- LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
+ ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
goto z_bail;
}
@@ -124,7 +124,7 @@
assert(zerr == Z_STREAM_END); /* other errors should've been caught */
if ((long) zstream.total_out != uncompressedLen) {
- LOGW("Size mismatch on inflated file (%ld vs %ld)\n",
+ ALOGW("Size mismatch on inflated file (%ld vs %ld)\n",
zstream.total_out, uncompressedLen);
goto z_bail;
}
@@ -189,10 +189,10 @@
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -207,12 +207,12 @@
if (zstream.avail_in == 0) {
getSize = (compRemaining > kReadBufSize) ?
kReadBufSize : compRemaining;
- LOGV("+++ reading %ld bytes (%ld left)\n",
+ ALOGV("+++ reading %ld bytes (%ld left)\n",
getSize, compRemaining);
int cc = fread(readBuf, 1, getSize, fp);
if (cc != (int) getSize) {
- LOGD("inflate read failed (%d vs %ld)\n",
+ ALOGD("inflate read failed (%d vs %ld)\n",
cc, getSize);
goto z_bail;
}
@@ -226,7 +226,7 @@
/* uncompress the data */
zerr = inflate(&zstream, Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
- LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
+ ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
goto z_bail;
}
@@ -236,7 +236,7 @@
assert(zerr == Z_STREAM_END); /* other errors should've been caught */
if ((long) zstream.total_out != uncompressedLen) {
- LOGW("Size mismatch on inflated file (%ld vs %ld)\n",
+ ALOGW("Size mismatch on inflated file (%ld vs %ld)\n",
zstream.total_out, uncompressedLen);
goto z_bail;
}
diff --git a/opengl/libagl/TextureObjectManager.cpp b/opengl/libagl/TextureObjectManager.cpp
index 022de09..6a006aa 100644
--- a/opengl/libagl/TextureObjectManager.cpp
+++ b/opengl/libagl/TextureObjectManager.cpp
@@ -195,7 +195,7 @@
return NO_MEMORY;
}
- LOGW_IF(level-1 >= mNumExtraLod,
+ ALOGW_IF(level-1 >= mNumExtraLod,
"specifying mipmap level %d, but # of level is %d",
level, mNumExtraLod+1);
diff --git a/opengl/libagl/Tokenizer.cpp b/opengl/libagl/Tokenizer.cpp
index 9b3ea1a..eac8d6d 100644
--- a/opengl/libagl/Tokenizer.cpp
+++ b/opengl/libagl/Tokenizer.cpp
@@ -163,9 +163,9 @@
{
const run_t* ranges = mRanges.array();
const size_t c = mRanges.size();
- LOGD("Tokenizer (%p, size = %u)\n", this, c);
+ ALOGD("Tokenizer (%p, size = %u)\n", this, c);
for (size_t i=0 ; i<c ; i++) {
- LOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);
+ ALOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);
}
}
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 6d4098c..eb55bee 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -184,7 +184,7 @@
free(depth.data);
}
bool egl_surface_t::isValid() const {
- LOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);
+ ALOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);
return magic == MAGIC;
}
@@ -263,7 +263,7 @@
return (left>=right || top>=bottom);
}
void dump(char const* what) {
- LOGD("%s { %5d, %5d, w=%5d, h=%5d }",
+ ALOGD("%s { %5d, %5d, w=%5d, h=%5d }",
what, left, top, right-left, bottom-top);
}
@@ -397,7 +397,7 @@
// pin the buffer down
if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- LOGE("connect() failed to lock buffer %p (%ux%u)",
+ ALOGE("connect() failed to lock buffer %p (%ux%u)",
buffer, buffer->width, buffer->height);
return setError(EGL_BAD_ACCESS, EGL_FALSE);
// FIXME: we should make sure we're not accessing the buffer anymore
@@ -552,7 +552,7 @@
// finally pin the buffer down
if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- LOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",
+ ALOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",
buffer, buffer->width, buffer->height);
return setError(EGL_BAD_ACCESS, EGL_FALSE);
// FIXME: we should make sure we're not accessing the buffer anymore
@@ -721,7 +721,7 @@
case GGL_PIXEL_FORMAT_RGBA_8888: size *= 4; break;
case GGL_PIXEL_FORMAT_RGBX_8888: size *= 4; break;
default:
- LOGE("incompatible pixel format for pbuffer (format=%d)", f);
+ ALOGE("incompatible pixel format for pbuffer (format=%d)", f);
pbuffer.data = 0;
break;
}
diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp
index 9520f04..cdeccb3 100644
--- a/opengl/libagl/matrix.cpp
+++ b/opengl/libagl/matrix.cpp
@@ -217,9 +217,9 @@
void transform_t::dump(const char* what)
{
GLfixed const * const m = matrix.m;
- LOGD("%s:", what);
+ ALOGD("%s:", what);
for (int i=0 ; i<4 ; i++)
- LOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",
+ ALOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",
m[I(0,i)], m[I(1,i)], m[I(2,i)], m[I(3,i)],
fixedToFloat(m[I(0,i)]),
fixedToFloat(m[I(1,i)]),
@@ -273,11 +273,11 @@
}
void matrixf_t::dump(const char* what) {
- LOGD("%s", what);
- LOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]);
- LOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]);
- LOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]);
- LOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);
+ ALOGD("%s", what);
+ ALOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]);
+ ALOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]);
+ ALOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]);
+ ALOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);
}
void matrixf_t::loadIdentity() {
diff --git a/opengl/libagl/mipmap.cpp b/opengl/libagl/mipmap.cpp
index ccd77b7..e142a58 100644
--- a/opengl/libagl/mipmap.cpp
+++ b/opengl/libagl/mipmap.cpp
@@ -174,7 +174,7 @@
}
}
} else {
- LOGE("Unsupported format (%d)", base->format);
+ ALOGE("Unsupported format (%d)", base->format);
return BAD_TYPE;
}
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 325193c..160abc2 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -131,7 +131,7 @@
/* Special case for GLES emulation */
if (checkGlesEmulationStatus() == 0) {
- LOGD("Emulator without GPU support detected. Fallback to software renderer.");
+ ALOGD("Emulator without GPU support detected. Fallback to software renderer.");
gConfig.add( entry_t(0, 0, "android") );
return;
}
@@ -140,14 +140,14 @@
FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r");
if (cfg == NULL) {
// default config
- LOGD("egl.cfg not found, using default config");
+ ALOGD("egl.cfg not found, using default config");
gConfig.add( entry_t(0, 0, "android") );
} else {
while (fgets(line, 256, cfg)) {
int dpy;
int impl;
if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) {
- //LOGD(">>> %u %u %s", dpy, impl, tag);
+ //ALOGD(">>> %u %u %s", dpy, impl, tag);
gConfig.add( entry_t(dpy, impl, tag) );
}
}
@@ -238,7 +238,7 @@
strncpy(scrap, name, index);
scrap[index] = 0;
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //LOGD_IF(f, "found <%s> instead", scrap);
+ //ALOGD_IF(f, "found <%s> instead", scrap);
}
}
if (f == NULL) {
@@ -247,11 +247,11 @@
if (index>0 && strcmp(name+index, "OES")) {
snprintf(scrap, SIZE, "%sOES", name);
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //LOGD_IF(f, "found <%s> instead", scrap);
+ //ALOGD_IF(f, "found <%s> instead", scrap);
}
}
if (f == NULL) {
- //LOGD("%s", name);
+ //ALOGD("%s", name);
f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
}
*curr++ = f;
@@ -278,16 +278,16 @@
void* dso = dlopen(driver_absolute_path, RTLD_NOW | RTLD_LOCAL);
if (dso == 0) {
const char* err = dlerror();
- LOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");
+ ALOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");
return 0;
}
- LOGD("loaded %s", driver_absolute_path);
+ ALOGD("loaded %s", driver_absolute_path);
if (mask & EGL) {
getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
- LOGE_IF(!getProcAddress,
+ ALOGE_IF(!getProcAddress,
"can't find eglGetProcAddress() in %s", driver_absolute_path);
egl_t* egl = &cnx->egl;
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 6ad06af..60baeaa 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -146,7 +146,7 @@
static int gl_no_context() {
if (egl_tls_t::logNoContextCall()) {
- LOGE("call to OpenGL ES API with no current context "
+ ALOGE("call to OpenGL ES API with no current context "
"(logged once per thread)");
char value[PROPERTY_VALUE_MAX];
property_get("debug.egl.callstack", value, "0");
@@ -270,7 +270,7 @@
cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE];
cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx);
} else {
- LOGD("3D hardware acceleration is disabled");
+ ALOGD("3D hardware acceleration is disabled");
}
}
@@ -292,7 +292,7 @@
}
void gl_unimplemented() {
- LOGE("called unimplemented OpenGL ES API");
+ ALOGE("called unimplemented OpenGL ES API");
}
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 2b0ed5d..d5e9cb8 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -353,7 +353,7 @@
EGLint format;
if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
- LOGE("EGLNativeWindowType %p already connected to another API",
+ ALOGE("EGLNativeWindowType %p already connected to another API",
window);
return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
}
@@ -364,7 +364,7 @@
if (format != 0) {
int err = native_window_set_buffers_format(window, format);
if (err != 0) {
- LOGE("error setting native window pixel format: %s (%d)",
+ ALOGE("error setting native window pixel format: %s (%d)",
strerror(-err), err);
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
@@ -670,7 +670,7 @@
egl_tls_t::setContext(EGL_NO_CONTEXT);
}
} else {
- // this will LOGE the error
+ // this will ALOGE the error
result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);
}
return result;
@@ -882,7 +882,7 @@
addr = sGLExtentionMap.valueFor(name);
const int slot = sGLExtentionSlot;
- LOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,
+ ALOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,
"no more slots for eglGetProcAddress(\"%s\")",
procname);
diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp
index c4a7466..7fd6519 100644
--- a/opengl/libs/EGL/egl_cache.cpp
+++ b/opengl/libs/EGL/egl_cache.cpp
@@ -101,7 +101,7 @@
cnx->egl.eglGetProcAddress(
"eglSetBlobCacheFuncsANDROID"));
if (eglSetBlobCacheFuncsANDROID == NULL) {
- LOGE("EGL_ANDROID_blob_cache advertised by display %d, "
+ ALOGE("EGL_ANDROID_blob_cache advertised by display %d, "
"but unable to get eglSetBlobCacheFuncsANDROID", i);
continue;
}
@@ -110,7 +110,7 @@
android::setBlob, android::getBlob);
EGLint err = cnx->egl.eglGetError();
if (err != EGL_SUCCESS) {
- LOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "
+ ALOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "
"%#x", err);
}
}
@@ -133,7 +133,7 @@
Mutex::Autolock lock(mMutex);
if (keySize < 0 || valueSize < 0) {
- LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
+ ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
return;
}
@@ -172,7 +172,7 @@
Mutex::Autolock lock(mMutex);
if (keySize < 0 || valueSize < 0) {
- LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
+ ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
return 0;
}
@@ -226,7 +226,7 @@
// The file exists, delete it and try again.
if (unlink(fname) == -1) {
// No point in retrying if the unlink failed.
- LOGE("error unlinking cache file %s: %s (%d)", fname,
+ ALOGE("error unlinking cache file %s: %s (%d)", fname,
strerror(errno), errno);
return;
}
@@ -234,7 +234,7 @@
fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
}
if (fd == -1) {
- LOGE("error creating cache file %s: %s (%d)", fname,
+ ALOGE("error creating cache file %s: %s (%d)", fname,
strerror(errno), errno);
return;
}
@@ -242,7 +242,7 @@
size_t fileSize = headerSize + cacheSize;
if (ftruncate(fd, fileSize) == -1) {
- LOGE("error setting cache file size: %s (%d)", strerror(errno),
+ ALOGE("error setting cache file size: %s (%d)", strerror(errno),
errno);
close(fd);
unlink(fname);
@@ -252,7 +252,7 @@
uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
PROT_WRITE, MAP_SHARED, fd, 0));
if (buf == MAP_FAILED) {
- LOGE("error mmaping cache file: %s (%d)", strerror(errno),
+ ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
errno);
close(fd);
unlink(fname);
@@ -262,7 +262,7 @@
status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL,
0);
if (err != OK) {
- LOGE("error writing cache contents: %s (%d)", strerror(-err),
+ ALOGE("error writing cache contents: %s (%d)", strerror(-err),
-err);
munmap(buf, fileSize);
close(fd);
@@ -288,7 +288,7 @@
int fd = open(mFilename.string(), O_RDONLY, 0);
if (fd == -1) {
if (errno != ENOENT) {
- LOGE("error opening cache file %s: %s (%d)", mFilename.string(),
+ ALOGE("error opening cache file %s: %s (%d)", mFilename.string(),
strerror(errno), errno);
}
return;
@@ -296,7 +296,7 @@
struct stat statBuf;
if (fstat(fd, &statBuf) == -1) {
- LOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);
+ ALOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);
close(fd);
return;
}
@@ -304,7 +304,7 @@
// Sanity check the size before trying to mmap it.
size_t fileSize = statBuf.st_size;
if (fileSize > maxTotalSize * 2) {
- LOGE("cache file is too large: %#llx", statBuf.st_size);
+ ALOGE("cache file is too large: %#llx", statBuf.st_size);
close(fd);
return;
}
@@ -312,7 +312,7 @@
uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
PROT_READ, MAP_PRIVATE, fd, 0));
if (buf == MAP_FAILED) {
- LOGE("error mmaping cache file: %s (%d)", strerror(errno),
+ ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
errno);
close(fd);
return;
@@ -321,13 +321,13 @@
// Check the file magic and CRC
size_t cacheSize = fileSize - headerSize;
if (memcmp(buf, cacheFileMagic, 4) != 0) {
- LOGE("cache file has bad mojo");
+ ALOGE("cache file has bad mojo");
close(fd);
return;
}
uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4);
if (crc32c(buf + headerSize, cacheSize) != *crc) {
- LOGE("cache file failed CRC check");
+ ALOGE("cache file failed CRC check");
close(fd);
return;
}
@@ -335,7 +335,7 @@
status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL,
0);
if (err != OK) {
- LOGE("error reading cache contents: %s (%d)", strerror(-err),
+ ALOGE("error reading cache contents: %s (%d)", strerror(-err),
-err);
munmap(buf, fileSize);
close(fd);
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 31119f9..53eaf9a 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -184,7 +184,7 @@
EGLDisplay idpy = disp[i].dpy;
if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
- //LOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
+ //ALOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
// i, idpy, cnx->major, cnx->minor, cnx);
// display is now initialized
@@ -201,7 +201,7 @@
EGL_CLIENT_APIS);
} else {
- LOGW("%d: eglInitialize(%p) failed (%s)", i, idpy,
+ ALOGW("%d: eglInitialize(%p) failed (%s)", i, idpy,
egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
}
}
@@ -309,7 +309,7 @@
egl_connection_t* const cnx = &gEGLImpl[i];
if (cnx->dso && disp[i].state == egl_display_t::INITIALIZED) {
if (cnx->egl.eglTerminate(disp[i].dpy) == EGL_FALSE) {
- LOGW("%d: eglTerminate(%p) failed (%s)", i, disp[i].dpy,
+ ALOGW("%d: eglTerminate(%p) failed (%s)", i, disp[i].dpy,
egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
}
// REVISIT: it's unclear what to do if eglTerminate() fails
@@ -327,7 +327,7 @@
// there are no reference to them, it which case, we're free to
// delete them.
size_t count = objects.size();
- LOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count);
+ ALOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count);
for (size_t i=0 ; i<count ; i++) {
egl_object_t* o = objects.itemAt(i);
o->destroy();
diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp
index 20cdc7e..26e8c3e 100644
--- a/opengl/libs/EGL/egl_object.cpp
+++ b/opengl/libs/EGL/egl_object.cpp
@@ -45,7 +45,7 @@
display->removeObject(this);
if (decRef() == 1) {
// shouldn't happen because this is called from LocalRef
- LOGE("egl_object_t::terminate() removed the last reference!");
+ ALOGE("egl_object_t::terminate() removed the last reference!");
}
}
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
index df1b261..7106fa5 100644
--- a/opengl/libs/EGL/egl_object.h
+++ b/opengl/libs/EGL/egl_object.h
@@ -110,7 +110,7 @@
if (ref) {
if (ref->decRef() == 1) {
// shouldn't happen because this is called from LocalRef
- LOGE("LocalRef::release() removed the last reference!");
+ ALOGE("LocalRef::release() removed the last reference!");
}
}
}
@@ -131,7 +131,7 @@
if (window != NULL) {
native_window_set_buffers_format(window, 0);
if (native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL)) {
- LOGW("EGLNativeWindowType %p disconnect failed", window);
+ ALOGW("EGLNativeWindowType %p disconnect failed", window);
}
}
}
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index b341ddb..cf144ce 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -73,7 +73,7 @@
egl_tls_t* tls = getTLS();
if (tls->error != error) {
if (!quiet) {
- LOGE("%s:%d error %x (%s)",
+ ALOGE("%s:%d error %x (%s)",
caller, line, error, egl_strerror(error));
char value[PROPERTY_VALUE_MAX];
property_get("debug.egl.callstack", value, "0");
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index 0e934e2..d04ef10 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -97,30 +97,30 @@
static void TraceGLShaderSource(GLuint shader, GLsizei count,
const GLchar** string, const GLint* length) {
- LOGD("const char* shaderSrc[] = {");
+ ALOGD("const char* shaderSrc[] = {");
for (GLsizei i = 0; i < count; i++) {
const char* comma = i < count-1 ? "," : "";
const GLchar* s = string[i];
if (length) {
GLint len = length[i];
- LOGD(" \"%*s\"%s", len, s, comma);
+ ALOGD(" \"%*s\"%s", len, s, comma);
} else {
- LOGD(" \"%s\"%s", s, comma);
+ ALOGD(" \"%s\"%s", s, comma);
}
}
- LOGD("};");
+ ALOGD("};");
if (length) {
- LOGD("const GLint* shaderLength[] = {");
+ ALOGD("const GLint* shaderLength[] = {");
for (GLsizei i = 0; i < count; i++) {
const char* comma = i < count-1 ? "," : "";
GLint len = length[i];
- LOGD(" \"%d\"%s", len, comma);
+ ALOGD(" \"%d\"%s", len, comma);
}
- LOGD("};");
- LOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
+ ALOGD("};");
+ ALOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
shader, count);
} else {
- LOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
+ ALOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
shader, count);
}
}
@@ -131,7 +131,7 @@
GLsizei count = chunkCount * chunkSize;
bool isFloat = type == 'f';
const char* typeString = isFloat ? "GLfloat" : "GLint";
- LOGD("const %s value[] = {", typeString);
+ ALOGD("const %s value[] = {", typeString);
for (GLsizei i = 0; i < count; i++) {
StringBuilder builder;
builder.append(" ");
@@ -152,25 +152,25 @@
value = (void*) (((GLint*) value) + 1);
}
}
- LOGD("%s", builder.getString());
+ ALOGD("%s", builder.getString());
if (chunkSize > 1 && i < count-1
&& (i % chunkSize) == (chunkSize-1)) {
- LOGD("%s", ""); // Print a blank line.
+ ALOGD("%s", ""); // Print a blank line.
}
}
- LOGD("};");
+ ALOGD("};");
}
static void TraceUniformv(int elementCount, char type,
GLuint location, GLsizei count, const void* value) {
TraceValue(elementCount, type, count, 1, value);
- LOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
+ ALOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
}
static void TraceUniformMatrix(int matrixSideLength,
GLuint location, GLsizei count, GLboolean transpose, const void* value) {
TraceValue(matrixSideLength, 'f', count, matrixSideLength, value);
- LOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
+ ALOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
GLbooleanToString(transpose));
}
@@ -310,7 +310,7 @@
}
}
builder.append(");");
- LOGD("%s", builder.getString());
+ ALOGD("%s", builder.getString());
va_end(argp);
}
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index fee4609..df22b96 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -83,7 +83,7 @@
_c->_api(__VA_ARGS__); \
GLenum status = GL_NO_ERROR; \
while ((status = glGetError()) != GL_NO_ERROR) { \
- LOGD("[" #_api "] 0x%x", status); \
+ ALOGD("[" #_api "] 0x%x", status); \
}
#else
diff --git a/opengl/libs/GLES2_dbg/src/caller.cpp b/opengl/libs/GLES2_dbg/src/caller.cpp
index 6b72751..70d23d6 100644
--- a/opengl/libs/GLES2_dbg/src/caller.cpp
+++ b/opengl/libs/GLES2_dbg/src/caller.cpp
@@ -103,7 +103,7 @@
const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
glesv2debugger::Message & msg, const int * const prevRet)
{
- LOGD("GenerateCall function=%u", cmd.function());
+ ALOGD("GenerateCall function=%u", cmd.function());
const int * ret = prevRet; // only some functions have return value
nsecs_t c0 = systemTime(timeMode);
switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture:
diff --git a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
index 41061e1..7bbaa18 100644
--- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
+++ b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
@@ -100,7 +100,7 @@
case GL_UNSIGNED_BYTE:
break;
default:
- LOGE("GetBytesPerPixel: unknown type %x", type);
+ ALOGE("GetBytesPerPixel: unknown type %x", type);
}
switch (format) {
@@ -115,7 +115,7 @@
case 0x80E1: // GL_BGRA_EXT
return 4;
default:
- LOGE("GetBytesPerPixel: unknown format %x", format);
+ ALOGE("GetBytesPerPixel: unknown format %x", format);
}
return 1; // in doubt...
@@ -242,7 +242,7 @@
void DbgContext::glUseProgram(GLuint program)
{
while (GLenum error = hooks->gl.glGetError())
- LOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
+ ALOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
program, error);
this->program = program;
maxAttrib = 0;
@@ -286,7 +286,7 @@
}
delete name;
while (GLenum error = hooks->gl.glGetError())
- LOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
+ ALOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
program, error);
}
diff --git a/opengl/libs/GLES2_dbg/src/header.h b/opengl/libs/GLES2_dbg/src/header.h
index 49f3847..0ab4890 100644
--- a/opengl/libs/GLES2_dbg/src/header.h
+++ b/opengl/libs/GLES2_dbg/src/header.h
@@ -48,9 +48,9 @@
#endif
#undef assert
-#define assert(expr) if (!(expr)) { LOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
-//#undef LOGD
-//#define LOGD(...)
+#define assert(expr) if (!(expr)) { ALOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
+//#undef ALOGD
+//#define ALOGD(...)
namespace android
{
diff --git a/opengl/libs/GLES2_dbg/src/server.cpp b/opengl/libs/GLES2_dbg/src/server.cpp
index 0c711bf..3e93697 100644
--- a/opengl/libs/GLES2_dbg/src/server.cpp
+++ b/opengl/libs/GLES2_dbg/src/server.cpp
@@ -34,7 +34,7 @@
static void Die(const char * msg)
{
- LOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
+ ALOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
StopDebugServer();
exit(1);
}
@@ -44,11 +44,11 @@
{
MAX_FILE_SIZE = maxFileSize;
- LOGD("GLESv2_dbg: StartDebugServer");
+ ALOGD("GLESv2_dbg: StartDebugServer");
if (serverSock >= 0 || file)
return;
- LOGD("GLESv2_dbg: StartDebugServer create socket");
+ ALOGD("GLESv2_dbg: StartDebugServer create socket");
struct sockaddr_in server = {}, client = {};
/* Create the TCP socket */
@@ -75,7 +75,7 @@
Die("Failed to listen on server socket");
}
- LOGD("server started on %d \n", server.sin_port);
+ ALOGD("server started on %d \n", server.sin_port);
/* Wait for client connection */
@@ -85,13 +85,13 @@
Die("Failed to accept client connection");
}
- LOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
+ ALOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
// fcntl(clientSock, F_SETFL, O_NONBLOCK);
}
void StopDebugServer()
{
- LOGD("GLESv2_dbg: StopDebugServer");
+ ALOGD("GLESv2_dbg: StopDebugServer");
if (clientSock > 0) {
close(clientSock);
clientSock = -1;
@@ -115,7 +115,7 @@
if (received < 0)
Die("Failed to receive response length");
else if (4 != received) {
- LOGD("received %dB: %.8X", received, len);
+ ALOGD("received %dB: %.8X", received, len);
Die("Received length mismatch, expected 4");
}
static void * buffer = NULL;
@@ -150,7 +150,7 @@
bool received = false;
if (FD_ISSET(clientSock, &readSet)) {
- LOGD("TryReceive: avaiable for read");
+ ALOGD("TryReceive: avaiable for read");
Receive(cmd);
return true;
}
@@ -190,14 +190,14 @@
int sent = -1;
sent = send(clientSock, &len, sizeof(len), 0);
if (sent != sizeof(len)) {
- LOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
+ ALOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
Die("Failed to send message length");
}
nsecs_t c0 = systemTime(timeMode);
sent = send(clientSock, str.data(), str.length(), 0);
float t = (float)ns2ms(systemTime(timeMode) - c0);
if (sent != str.length()) {
- LOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
+ ALOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
Die("Failed to send message");
}
// TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument.
@@ -210,9 +210,9 @@
if (!msg.expect_response()) {
if (TryReceive(cmd)) {
if (glesv2debugger::Message_Function_SETPROP == cmd.function())
- LOGD("Send: TryReceived SETPROP");
+ ALOGD("Send: TryReceived SETPROP");
else
- LOGD("Send: TryReceived %u", cmd.function());
+ ALOGD("Send: TryReceived %u", cmd.function());
}
} else
Receive(cmd);
@@ -223,19 +223,19 @@
{
switch (cmd.prop()) {
case glesv2debugger::Message_Prop_CaptureDraw:
- LOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
+ ALOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
dbg->captureDraw = cmd.arg0();
break;
case glesv2debugger::Message_Prop_TimeMode:
- LOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
+ ALOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
timeMode = cmd.arg0();
break;
case glesv2debugger::Message_Prop_ExpectResponse:
- LOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
+ ALOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1());
break;
case glesv2debugger::Message_Prop_CaptureSwap:
- LOGD("SetProp CaptureSwap %d", cmd.arg0());
+ ALOGD("SetProp CaptureSwap %d", cmd.arg0());
dbg->captureSwap = cmd.arg0();
break;
default:
@@ -269,7 +269,7 @@
case glesv2debugger::Message_Function_CONTINUE:
ret = functionCall(&dbg->hooks->gl, msg);
while (GLenum error = dbg->hooks->gl.glGetError())
- LOGD("Function=%u glGetError() = 0x%.4X", function, error);
+ ALOGD("Function=%u glGetError() = 0x%.4X", function, error);
if (!msg.has_time()) // some has output data copy, so time inside call
msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
msg.set_context_id(reinterpret_cast<int>(dbg));
diff --git a/opengl/libs/GLES2_dbg/src/vertex.cpp b/opengl/libs/GLES2_dbg/src/vertex.cpp
index 28a2420..70c3433 100644
--- a/opengl/libs/GLES2_dbg/src/vertex.cpp
+++ b/opengl/libs/GLES2_dbg/src/vertex.cpp
@@ -72,7 +72,7 @@
if (dbg->captureDraw > 0) {
dbg->captureDraw--;
dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
-// LOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
+// ALOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType);
pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
dbg->readBytesPerPixel);
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index ee29f12..2d31a35 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -132,7 +132,7 @@
#define CHECK_GL_ERRORS(_api) \
do { GLint err = glGetError(); \
- LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \
+ ALOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \
} while(false);
#else
diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp
index c2fabe6..fa6bd93 100644
--- a/opengl/tests/gl2_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl2_jni/jni/gl_code.cpp
@@ -14,13 +14,13 @@
static void printGLString(const char *name, GLenum s) {
const char *v = (const char *) glGetString(s);
- LOGI("GL %s = %s\n", name, v);
+ ALOGI("GL %s = %s\n", name, v);
}
static void checkGlError(const char* op) {
for (GLint error = glGetError(); error; error
= glGetError()) {
- LOGI("after %s() glError (0x%x)\n", op, error);
+ ALOGI("after %s() glError (0x%x)\n", op, error);
}
}
@@ -48,7 +48,7 @@
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n",
+ ALOGE("Could not compile shader %d:\n%s\n",
shaderType, buf);
free(buf);
}
@@ -87,7 +87,7 @@
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -107,15 +107,15 @@
printGLString("Renderer", GL_RENDERER);
printGLString("Extensions", GL_EXTENSIONS);
- LOGI("setupGraphics(%d, %d)", w, h);
+ ALOGI("setupGraphics(%d, %d)", w, h);
gProgram = createProgram(gVertexShader, gFragmentShader);
if (!gProgram) {
- LOGE("Could not create program.");
+ ALOGE("Could not create program.");
return false;
}
gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
checkGlError("glGetAttribLocation");
- LOGI("glGetAttribLocation(\"vPosition\") = %d\n",
+ ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",
gvPositionHandle);
glViewport(0, 0, w, h);
diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp
index ef66841..cf86020 100644
--- a/opengl/tests/gl_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl_jni/jni/gl_code.cpp
@@ -18,7 +18,7 @@
static void printGLString(const char *name, GLenum s) {
const char *v = (const char *) glGetString(s);
- LOGI("GL %s = %s\n", name, v);
+ ALOGI("GL %s = %s\n", name, v);
}
static void gluLookAt(float eyeX, float eyeY, float eyeZ,
diff --git a/opengl/tests/gl_perf/fill_common.cpp b/opengl/tests/gl_perf/fill_common.cpp
index a069f67..389381f 100644
--- a/opengl/tests/gl_perf/fill_common.cpp
+++ b/opengl/tests/gl_perf/fill_common.cpp
@@ -26,7 +26,7 @@
static void checkGlError(const char* op) {
for (GLint error = glGetError(); error; error
= glGetError()) {
- LOGE("after %s() glError (0x%x)\n", op, error);
+ ALOGE("after %s() glError (0x%x)\n", op, error);
}
}
@@ -44,7 +44,7 @@
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n", shaderType, buf);
+ ALOGE("Could not compile shader %d:\n%s\n", shaderType, buf);
free(buf);
}
glDeleteShader(shader);
@@ -94,7 +94,7 @@
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -132,7 +132,7 @@
} else {
printf("%s, %f, %f\n", gCurrentTestName, mpps, dc60);
}
- LOGI("%s, %f, %f\r\n", gCurrentTestName, mpps, dc60);
+ ALOGI("%s, %f, %f\r\n", gCurrentTestName, mpps, dc60);
}
diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp
index f993371..2f04183 100644
--- a/opengl/tests/gl_perfapp/jni/gl_code.cpp
+++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp
@@ -43,7 +43,7 @@
int texSize = ((stateClock >> 1) & 0x1) + 1;
if (testNum >= gFragmentTestCount) {
- LOGI("done\n");
+ ALOGI("done\n");
if (fOut) {
fclose(fOut);
fOut = NULL;
@@ -52,7 +52,7 @@
return;
}
- // LOGI("doTest %d %d %d\n", texCount, extraMath, testSubState);
+ // ALOGI("doTest %d %d %d\n", texCount, extraMath, testSubState);
// for (uint32_t num = 0; num < gFragmentTestCount; num++) {
doSingleTest(testNum, texSize);
@@ -74,17 +74,17 @@
genTextures();
const char* fileName = "/sdcard/glperf.csv";
if (fOut != NULL) {
- LOGI("Closing partially written output.n");
+ ALOGI("Closing partially written output.n");
fclose(fOut);
fOut = NULL;
}
- LOGI("Writing to: %s\n",fileName);
+ ALOGI("Writing to: %s\n",fileName);
fOut = fopen(fileName, "w");
if (fOut == NULL) {
- LOGE("Could not open: %s\n", fileName);
+ ALOGE("Could not open: %s\n", fileName);
}
- LOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");
+ ALOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");
if (fOut) fprintf(fOut,"varColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\r\n");
}
}
diff --git a/opengl/tests/gldual/jni/gl_code.cpp b/opengl/tests/gldual/jni/gl_code.cpp
index f1f0a1f..22867ed 100644
--- a/opengl/tests/gldual/jni/gl_code.cpp
+++ b/opengl/tests/gldual/jni/gl_code.cpp
@@ -14,13 +14,13 @@
static void printGLString(const char *name, GLenum s) {
const char *v = (const char *) glGetString(s);
- LOGI("GL %s = %s\n", name, v);
+ ALOGI("GL %s = %s\n", name, v);
}
static void checkGlError(const char* op) {
for (GLint error = glGetError(); error; error
= glGetError()) {
- LOGI("after %s() glError (0x%x)\n", op, error);
+ ALOGI("after %s() glError (0x%x)\n", op, error);
}
}
@@ -48,7 +48,7 @@
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n",
+ ALOGE("Could not compile shader %d:\n%s\n",
shaderType, buf);
free(buf);
}
@@ -87,7 +87,7 @@
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -107,15 +107,15 @@
printGLString("Renderer", GL_RENDERER);
printGLString("Extensions", GL_EXTENSIONS);
- LOGI("setupGraphics(%d, %d)", w, h);
+ ALOGI("setupGraphics(%d, %d)", w, h);
gProgram = createProgram(gVertexShader, gFragmentShader);
if (!gProgram) {
- LOGE("Could not create program.");
+ ALOGE("Could not create program.");
return false;
}
gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
checkGlError("glGetAttribLocation");
- LOGI("glGetAttribLocation(\"vPosition\") = %d\n",
+ ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",
gvPositionHandle);
glViewport(0, 0, w, h);
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index f94d321..61096e5 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -53,7 +53,7 @@
GLenum error = glGetError();
if (error == GL_NO_ERROR)
break;
- LOGE("GL error 0x%04x", int(error));
+ ALOGE("GL error 0x%04x", int(error));
} while(true);
}
@@ -62,7 +62,7 @@
{
EGLint error = eglGetError();
if (error && error != EGL_SUCCESS) {
- LOGE("%s: EGL error 0x%04x (%s)",
+ ALOGE("%s: EGL error 0x%04x (%s)",
token, int(error), EGLUtils::strerror(error));
}
}
@@ -130,7 +130,7 @@
mNativeWindow = new FramebufferNativeWindow();
framebuffer_device_t const * fbDev = mNativeWindow->getDevice();
if (!fbDev) {
- LOGE("Display subsystem failed to initialize. check logs. exiting...");
+ ALOGE("Display subsystem failed to initialize. check logs. exiting...");
exit(0);
}
@@ -170,7 +170,7 @@
char property[PROPERTY_VALUE_MAX];
if (property_get("debug.sf.hw", property, NULL) > 0) {
if (atoi(property) == 0) {
- LOGW("H/W composition disabled");
+ ALOGW("H/W composition disabled");
attribs[2] = EGL_CONFIG_CAVEAT;
attribs[3] = EGL_SLOW_CONFIG;
}
@@ -185,7 +185,7 @@
EGLConfig config = NULL;
err = selectConfigForPixelFormat(display, attribs, format, &config);
- LOGE_IF(err, "couldn't find an EGLConfig matching the screen format");
+ ALOGE_IF(err, "couldn't find an EGLConfig matching the screen format");
EGLint r,g,b,a;
eglGetConfigAttrib(display, config, EGL_RED_SIZE, &r);
@@ -228,7 +228,7 @@
*/
if (property_get("qemu.sf.lcd_density", property, NULL) <= 0) {
if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
- LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
+ ALOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
strcpy(property, "160");
}
} else {
@@ -267,7 +267,7 @@
result = eglMakeCurrent(display, surface, surface, context);
if (!result) {
- LOGE("Couldn't create a working GLES context. check logs. exiting...");
+ ALOGE("Couldn't create a working GLES context. check logs. exiting...");
exit(0);
}
@@ -284,22 +284,22 @@
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, mMaxViewportDims);
- LOGI("EGL informations:");
- LOGI("# of configs : %d", numConfigs);
- LOGI("vendor : %s", extensions.getEglVendor());
- LOGI("version : %s", extensions.getEglVersion());
- LOGI("extensions: %s", extensions.getEglExtension());
- LOGI("Client API: %s", eglQueryString(display, EGL_CLIENT_APIS)?:"Not Supported");
- LOGI("EGLSurface: %d-%d-%d-%d, config=%p", r, g, b, a, config);
+ ALOGI("EGL informations:");
+ ALOGI("# of configs : %d", numConfigs);
+ ALOGI("vendor : %s", extensions.getEglVendor());
+ ALOGI("version : %s", extensions.getEglVersion());
+ ALOGI("extensions: %s", extensions.getEglExtension());
+ ALOGI("Client API: %s", eglQueryString(display, EGL_CLIENT_APIS)?:"Not Supported");
+ ALOGI("EGLSurface: %d-%d-%d-%d, config=%p", r, g, b, a, config);
- LOGI("OpenGL informations:");
- LOGI("vendor : %s", extensions.getVendor());
- LOGI("renderer : %s", extensions.getRenderer());
- LOGI("version : %s", extensions.getVersion());
- LOGI("extensions: %s", extensions.getExtension());
- LOGI("GL_MAX_TEXTURE_SIZE = %d", mMaxTextureSize);
- LOGI("GL_MAX_VIEWPORT_DIMS = %d x %d", mMaxViewportDims[0], mMaxViewportDims[1]);
- LOGI("flags = %08x", mFlags);
+ ALOGI("OpenGL informations:");
+ ALOGI("vendor : %s", extensions.getVendor());
+ ALOGI("renderer : %s", extensions.getRenderer());
+ ALOGI("version : %s", extensions.getVersion());
+ ALOGI("extensions: %s", extensions.getExtension());
+ ALOGI("GL_MAX_TEXTURE_SIZE = %d", mMaxTextureSize);
+ ALOGI("GL_MAX_VIEWPORT_DIMS = %d x %d", mMaxViewportDims[0], mMaxViewportDims[1]);
+ ALOGI("flags = %08x", mFlags);
// Unbind the context from this thread
eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
index 3b7c09e..f4afeea 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp
@@ -76,10 +76,10 @@
err = read(fd, &buf, 1);
} while (err < 0 && errno == EINTR);
close(fd);
- LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_SLEEP failed (%s)", strerror(errno));
+ ALOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_SLEEP failed (%s)", strerror(errno));
if (err >= 0) {
sp<SurfaceFlinger> flinger = mFlinger.promote();
- LOGD("About to give-up screen, flinger = %p", flinger.get());
+ ALOGD("About to give-up screen, flinger = %p", flinger.get());
if (flinger != 0) {
mBarrier.close();
flinger->screenReleased(0);
@@ -91,10 +91,10 @@
err = read(fd, &buf, 1);
} while (err < 0 && errno == EINTR);
close(fd);
- LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_WAKE failed (%s)", strerror(errno));
+ ALOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_WAKE failed (%s)", strerror(errno));
if (err >= 0) {
sp<SurfaceFlinger> flinger = mFlinger.promote();
- LOGD("Screen about to return, flinger = %p", flinger.get());
+ ALOGD("Screen about to return, flinger = %p", flinger.get());
if (flinger != 0)
flinger->screenAcquired(0);
}
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index be9b226..f17bf43 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -44,10 +44,10 @@
mDpy(EGL_NO_DISPLAY), mSur(EGL_NO_SURFACE)
{
int err = hw_get_module(HWC_HARDWARE_MODULE_ID, &mModule);
- LOGW_IF(err, "%s module not found", HWC_HARDWARE_MODULE_ID);
+ ALOGW_IF(err, "%s module not found", HWC_HARDWARE_MODULE_ID);
if (err == 0) {
err = hwc_open(mModule, &mHwc);
- LOGE_IF(err, "%s device failed to initialize (%s)",
+ ALOGE_IF(err, "%s device failed to initialize (%s)",
HWC_HARDWARE_COMPOSER, strerror(-err));
if (err == 0) {
if (mHwc->registerProcs) {
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index d3b0dbf..d4c4b1f 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -350,7 +350,7 @@
if (sizeChanged) {
// the size changed, we need to ask our client to request a new buffer
- LOGD_IF(DEBUG_RESIZE,
+ ALOGD_IF(DEBUG_RESIZE,
"doTransaction: "
"resize (layer=%p), requested (%dx%d), drawing (%d,%d), "
"scalingMode=%d",
@@ -485,7 +485,7 @@
recomputeVisibleRegions = true;
}
- LOGD_IF(DEBUG_RESIZE,
+ ALOGD_IF(DEBUG_RESIZE,
"lockPageFlip : "
" (layer=%p), buffer (%ux%u, tr=%02x), "
"requested (%dx%d)",
diff --git a/services/surfaceflinger/LayerScreenshot.cpp b/services/surfaceflinger/LayerScreenshot.cpp
index 68e6660..c127fa6 100644
--- a/services/surfaceflinger/LayerScreenshot.cpp
+++ b/services/surfaceflinger/LayerScreenshot.cpp
@@ -93,7 +93,7 @@
// we're going from hidden to visible
status_t err = captureLocked();
if (err != NO_ERROR) {
- LOGW("createScreenshotSurface failed (%s)", strerror(-err));
+ ALOGW("createScreenshotSurface failed (%s)", strerror(-err));
}
}
} else if (curr.flags & ISurfaceComposer::eLayerHidden) {
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
index aebe1b8..9441019 100644
--- a/services/surfaceflinger/MessageQueue.cpp
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -111,7 +111,7 @@
}
if (nextEventTime >= 0) {
- //LOGD("nextEventTime = %lld ms", nextEventTime);
+ //ALOGD("nextEventTime = %lld ms", nextEventTime);
if (nextEventTime > 0) {
// we're about to wait, flush the binder command buffer
IPCThreadState::self()->flushCommands();
@@ -121,7 +121,7 @@
}
}
} else {
- //LOGD("going to wait");
+ //ALOGD("going to wait");
// we're about to wait, flush the binder command buffer
IPCThreadState::self()->flushCommands();
mCondition.wait(mLock);
@@ -165,7 +165,7 @@
message->when = systemTime() + relTime;
mMessages.insert(message);
- //LOGD("MessageQueue::queueMessage time = %lld ms", message->when);
+ //ALOGD("MessageQueue::queueMessage time = %lld ms", message->when);
//dumpLocked(message);
mCondition.signal();
@@ -185,7 +185,7 @@
int c = 0;
while (cur != end) {
const char tick = (*cur == message) ? '>' : ' ';
- LOGD("%c %d: msg{.what=%08x, when=%lld}",
+ ALOGD("%c %d: msg{.what=%08x, when=%lld}",
tick, c, (*cur)->what, (*cur)->when);
++cur;
c++;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 24bd2a6..98277b4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -106,7 +106,7 @@
void SurfaceFlinger::init()
{
- LOGI("SurfaceFlinger is starting");
+ ALOGI("SurfaceFlinger is starting");
// debugging stuff...
char value[PROPERTY_VALUE_MAX];
@@ -123,9 +123,9 @@
DdmConnection::start(getServiceName());
}
- LOGI_IF(mDebugRegion, "showupdates enabled");
- LOGI_IF(mDebugBackground, "showbackground enabled");
- LOGI_IF(mDebugDDMS, "DDMS debugging enabled");
+ ALOGI_IF(mDebugRegion, "showupdates enabled");
+ ALOGI_IF(mDebugBackground, "showbackground enabled");
+ ALOGI_IF(mDebugDDMS, "DDMS debugging enabled");
}
SurfaceFlinger::~SurfaceFlinger()
@@ -157,7 +157,7 @@
const GraphicPlane& SurfaceFlinger::graphicPlane(int dpy) const
{
- LOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy);
+ ALOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy);
const GraphicPlane& plane(mGraphicPlanes[dpy]);
return plane;
}
@@ -172,7 +172,7 @@
{
const nsecs_t now = systemTime();
const nsecs_t duration = now - mBootTime;
- LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );
+ ALOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );
mBootFinished = true;
// wait patiently for the window manager death
@@ -211,7 +211,7 @@
status_t SurfaceFlinger::readyToRun()
{
- LOGI( "SurfaceFlinger's main thread ready to run. "
+ ALOGI( "SurfaceFlinger's main thread ready to run. "
"Initializing graphics H/W...");
// we only support one display currently
@@ -227,10 +227,10 @@
// create the shared control-block
mServerHeap = new MemoryHeapBase(4096,
MemoryHeapBase::READ_ONLY, "SurfaceFlinger read-only heap");
- LOGE_IF(mServerHeap==0, "can't create shared memory dealer");
+ ALOGE_IF(mServerHeap==0, "can't create shared memory dealer");
mServerCblk = static_cast<surface_flinger_cblk_t*>(mServerHeap->getBase());
- LOGE_IF(mServerCblk==0, "can't get to shared control block's address");
+ ALOGE_IF(mServerCblk==0, "can't get to shared control block's address");
new(mServerCblk) surface_flinger_cblk_t;
@@ -454,7 +454,7 @@
{
// this should never happen. we do the flip anyways so we don't
// risk to cause a deadlock with hwc
- LOGW_IF(mSwapRegion.isEmpty(), "mSwapRegion is empty");
+ ALOGW_IF(mSwapRegion.isEmpty(), "mSwapRegion is empty");
const DisplayHardware& hw(graphicPlane(0).displayHardware());
const nsecs_t now = systemTime();
mDebugInSwapBuffers = now;
@@ -870,7 +870,7 @@
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
size_t count = layers.size();
- LOGE_IF(hwc.getNumLayers() != count,
+ ALOGE_IF(hwc.getNumLayers() != count,
"HAL number of layers (%d) doesn't match surfaceflinger (%d)",
hwc.getNumLayers(), count);
@@ -889,7 +889,7 @@
}
const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER);
status_t err = hwc.prepare();
- LOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err));
+ ALOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err));
if (err == NO_ERROR) {
// what's happening here is tricky.
@@ -1216,7 +1216,7 @@
mCurrentState.orientation = orientation;
transactionFlags |= eTransactionNeeded;
} else if (orientation != eOrientationUnchanged) {
- LOGW("setTransactionState: ignoring unrecognized orientation: %d",
+ ALOGW("setTransactionState: ignoring unrecognized orientation: %d",
orientation);
}
}
@@ -1242,7 +1242,7 @@
if (CC_UNLIKELY(err != NO_ERROR)) {
// just in case something goes wrong in SF, return to the
// called after a few seconds.
- LOGW_IF(err == TIMED_OUT, "closeGlobalTransaction timed out!");
+ ALOGW_IF(err == TIMED_OUT, "closeGlobalTransaction timed out!");
mTransationPending = false;
break;
}
@@ -1281,12 +1281,12 @@
sp<ISurface> surfaceHandle;
if (int32_t(w|h) < 0) {
- LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
+ ALOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
int(w), int(h));
return surfaceHandle;
}
- //LOGD("createSurface for pid %d (%d x %d)", pid, w, h);
+ //ALOGD("createSurface for pid %d (%d x %d)", pid, w, h);
sp<Layer> normalLayer;
switch (flags & eFXSurfaceMask) {
case eFXSurfaceNormal:
@@ -1353,7 +1353,7 @@
sp<Layer> layer = new Layer(this, display, client);
status_t err = layer->setBuffers(w, h, format, flags);
if (LIKELY(err != NO_ERROR)) {
- LOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err));
+ ALOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err));
layer.clear();
}
return layer;
@@ -1411,10 +1411,10 @@
// removed already, which means it is in the purgatory,
// and need to be removed from there.
ssize_t idx = mLayerPurgatory.remove(l);
- LOGE_IF(idx < 0,
+ ALOGE_IF(idx < 0,
"layer=%p is not in the purgatory list", l.get());
}
- LOGE_IF(err<0 && err != NAME_NOT_FOUND,
+ ALOGE_IF(err<0 && err != NAME_NOT_FOUND,
"error removing layer=%p (%s)", l.get(), strerror(-err));
}
return err;
@@ -1640,7 +1640,7 @@
const int uid = ipc->getCallingUid();
if ((uid != AID_GRAPHICS) &&
!PermissionCache::checkPermission(sAccessSurfaceFlinger, pid, uid)) {
- LOGE("Permission Denial: "
+ ALOGE("Permission Denial: "
"can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
return PERMISSION_DENIED;
}
@@ -1654,7 +1654,7 @@
const int uid = ipc->getCallingUid();
if ((uid != AID_GRAPHICS) &&
!PermissionCache::checkPermission(sReadFramebuffer, pid, uid)) {
- LOGE("Permission Denial: "
+ ALOGE("Permission Denial: "
"can't read framebuffer pid=%d, uid=%d", pid, uid);
return PERMISSION_DENIED;
}
@@ -1669,7 +1669,7 @@
IPCThreadState* ipc = IPCThreadState::self();
const int pid = ipc->getCallingPid();
const int uid = ipc->getCallingUid();
- LOGE("Permission Denial: "
+ ALOGE("Permission Denial: "
"can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
return PERMISSION_DENIED;
}
@@ -2268,7 +2268,7 @@
sh = (!sh) ? hw_h : sh;
const size_t size = sw * sh * 4;
- //LOGD("screenshot: sw=%d, sh=%d, minZ=%d, maxZ=%d",
+ //ALOGD("screenshot: sw=%d, sh=%d, minZ=%d, maxZ=%d",
// sw, sh, minLayerZ, maxLayerZ);
// make sure to clear all GL error flags
@@ -2359,7 +2359,7 @@
hw.compositionComplete();
- // LOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
+ // ALOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
return result;
}
@@ -2486,7 +2486,7 @@
wp<LayerBaseClient> layer(mLayers.valueFor(i));
if (layer != 0) {
lbc = layer.promote();
- LOGE_IF(lbc==0, "getLayerUser(name=%d) is dead", int(i));
+ ALOGE_IF(lbc==0, "getLayerUser(name=%d) is dead", int(i));
}
return lbc;
}
@@ -2504,7 +2504,7 @@
// we're called from a different process, do the real check
if (!PermissionCache::checkCallingPermission(sAccessSurfaceFlinger))
{
- LOGE("Permission Denial: "
+ ALOGE("Permission Denial: "
"can't openGlobalTransaction pid=%d, uid=%d", pid, uid);
return PERMISSION_DENIED;
}
@@ -2576,7 +2576,7 @@
if (err == NO_MEMORY) {
GraphicBuffer::dumpAllocationsToSystemLog();
}
- LOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) "
+ ALOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) "
"failed (%s), handle=%p",
w, h, strerror(-err), graphicBuffer->handle);
return 0;
diff --git a/services/surfaceflinger/SurfaceTextureLayer.cpp b/services/surfaceflinger/SurfaceTextureLayer.cpp
index 5020e00..259b937 100644
--- a/services/surfaceflinger/SurfaceTextureLayer.cpp
+++ b/services/surfaceflinger/SurfaceTextureLayer.cpp
@@ -37,7 +37,7 @@
status_t SurfaceTextureLayer::setDefaultBufferSize(uint32_t w, uint32_t h)
{
- //LOGD("%s, w=%u, h=%u", __PRETTY_FUNCTION__, w, h);
+ //ALOGD("%s, w=%u, h=%u", __PRETTY_FUNCTION__, w, h);
return SurfaceTexture::setDefaultBufferSize(w, h);
}
@@ -73,7 +73,7 @@
if (format == 0)
format = mDefaultFormat;
uint32_t effectiveUsage = layer->getEffectiveUsage(usage);
- //LOGD("%s, w=%u, h=%u, format=%u, usage=%08x, effectiveUsage=%08x",
+ //ALOGD("%s, w=%u, h=%u, format=%u, usage=%08x, effectiveUsage=%08x",
// __PRETTY_FUNCTION__, w, h, format, usage, effectiveUsage);
res = SurfaceTexture::dequeueBuffer(buf, w, h, format, effectiveUsage);
}
diff --git a/services/surfaceflinger/Transform.cpp b/services/surfaceflinger/Transform.cpp
index ba345ce..ca3fa6e 100644
--- a/services/surfaceflinger/Transform.cpp
+++ b/services/surfaceflinger/Transform.cpp
@@ -344,10 +344,10 @@
if (mType&TRANSLATE)
type.append("TRANSLATE ");
- LOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
- LOGD("%.4f %.4f %.4f", m[0][0], m[1][0], m[2][0]);
- LOGD("%.4f %.4f %.4f", m[0][1], m[1][1], m[2][1]);
- LOGD("%.4f %.4f %.4f", m[0][2], m[1][2], m[2][2]);
+ ALOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
+ ALOGD("%.4f %.4f %.4f", m[0][0], m[1][0], m[2][0]);
+ ALOGD("%.4f %.4f %.4f", m[0][1], m[1][1], m[2][1]);
+ ALOGD("%.4f %.4f %.4f", m[0][2], m[1][2], m[2][2]);
}
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/tests/Transaction_test.cpp b/services/surfaceflinger/tests/Transaction_test.cpp
index afafd8a..396a3fd 100644
--- a/services/surfaceflinger/tests/Transaction_test.cpp
+++ b/services/surfaceflinger/tests/Transaction_test.cpp
@@ -204,11 +204,11 @@
sc->checkPixel(145, 145, 63, 63, 195);
}
- LOGD("resizing");
+ ALOGD("resizing");
SurfaceComposerClient::openGlobalTransaction();
ASSERT_EQ(NO_ERROR, mFGSurfaceControl->setSize(128, 128));
SurfaceComposerClient::closeGlobalTransaction(true);
- LOGD("resized");
+ ALOGD("resized");
{
// This should not reflect the new size or color because SurfaceFlinger
// has not yet received a buffer of the correct size.
@@ -219,10 +219,10 @@
sc->checkPixel(145, 145, 63, 63, 195);
}
- LOGD("drawing");
+ ALOGD("drawing");
fillSurfaceRGBA8(mFGSurfaceControl, 63, 195, 63);
waitForPostedBuffers();
- LOGD("drawn");
+ ALOGD("drawn");
{
// This should reflect the new size and the new color.
SCOPED_TRACE("after redraw");