summaryrefslogtreecommitdiffstats
path: root/libs/ui
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ui')
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp8
-rw-r--r--libs/ui/GraphicBuffer.cpp2
-rw-r--r--libs/ui/GraphicBufferAllocator.cpp8
-rw-r--r--libs/ui/GraphicBufferMapper.cpp10
-rw-r--r--libs/ui/Input.cpp44
-rw-r--r--libs/ui/InputTransport.cpp94
-rw-r--r--libs/ui/KeyCharacterMap.cpp78
-rw-r--r--libs/ui/KeyLayoutMap.cpp52
-rw-r--r--libs/ui/Keyboard.cpp6
-rw-r--r--libs/ui/Region.cpp24
-rw-r--r--libs/ui/VirtualKeyMap.cpp18
-rw-r--r--libs/ui/tests/region/region.cpp2
12 files changed, 173 insertions, 173 deletions
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 @@ FramebufferNativeWindow::FramebufferNativeWindow()
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 @@ FramebufferNativeWindow::FramebufferNativeWindow()
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 @@ FramebufferNativeWindow::FramebufferNativeWindow()
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 @@ status_t GraphicBuffer::lock(uint32_t usage, const Rect& rect, void** vaddr)
{
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 @@ GraphicBufferAllocator::GraphicBufferAllocator()
{
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 @@ void GraphicBufferAllocator::dumpToSystemLog()
{
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 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma
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 @@ status_t GraphicBufferAllocator::free(buffer_handle_t handle)
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 @@ GraphicBufferMapper::GraphicBufferMapper()
{
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 @@ status_t GraphicBufferMapper::registerBuffer(buffer_handle_t handle)
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 @@ status_t GraphicBufferMapper::unregisterBuffer(buffer_handle_t handle)
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 @@ status_t GraphicBufferMapper::lock(buffer_handle_t handle,
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 @@ status_t GraphicBufferMapper::unlock(buffer_handle_t handle)
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 @@ String8 getInputDeviceConfigurationFilePathByName(
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 @@ String8 getInputDeviceConfigurationFilePathByName(
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 @@ status_t PointerCoords::writeToParcel(Parcel* parcel) const {
#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 @@ void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Posi
}
#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 @@ void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Posi
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 @@ void VelocityTracker::addMovement(const MotionEvent* event) {
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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
}
}
#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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
}
}
#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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
}
}
}
- 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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
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 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
}
*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 @@ bool VelocityTracker::getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon
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 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
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 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
}
#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 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
#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 @@ InputChannel::InputChannel(const String8& name, int32_t ashmemFd, int32_t receiv
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(const String8& name, int32_t ashmemFd, int32_t receiv
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 @@ status_t InputChannel::openInputChannelPair(const String8& name,
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 @@ status_t InputChannel::openInputChannelPair(const String8& name,
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 @@ status_t InputChannel::sendSignal(char signal) {
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 @@ status_t InputChannel::receiveSignal(char* outSignal) {
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 @@ InputPublisher::~InputPublisher() {
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 @@ status_t InputPublisher::initialize() {
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::initialize() {
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 @@ status_t InputPublisher::reset() {
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 @@ status_t InputPublisher::reset() {
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 @@ status_t InputPublisher::reset() {
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 @@ status_t InputPublisher::publishInputEvent(
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 @@ status_t InputPublisher::publishInputEvent(
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 @@ status_t InputPublisher::publishInputEvent(
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 @@ status_t InputPublisher::publishKeyEvent(
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 @@ status_t InputPublisher::publishMotionEvent(
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 @@ status_t InputPublisher::publishMotionEvent(
#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 @@ status_t InputPublisher::appendMotionSample(
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 @@ status_t InputPublisher::appendMotionSample(
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 @@ status_t InputPublisher::appendMotionSample(
// 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 @@ status_t InputPublisher::appendMotionSample(
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::appendMotionSample(
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::sendDispatchSignal() {
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 @@ status_t InputPublisher::receiveFinishedSignal(bool* outHandled) {
} 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 @@ InputConsumer::~InputConsumer() {
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 @@ status_t InputConsumer::initialize() {
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::initialize() {
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 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
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 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
// 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 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
}
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::consume(InputEventFactoryInterface* factory, InputEvent*
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::sendFinishedSignal(bool handled) {
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 @@ status_t InputConsumer::receiveDispatchSignal() {
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 @@ status_t KeyCharacterMap::load(const String8& filename, KeyCharacterMap** outMap
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_t KeyCharacterMap::load(const String8& filename, KeyCharacterMap** outMap
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 @@ char16_t KeyCharacterMap::getDisplayLabel(int32_t keyCode) const {
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 @@ char16_t KeyCharacterMap::getNumber(int32_t keyCode) const {
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 @@ char16_t KeyCharacterMap::getCharacter(int32_t keyCode, int32_t metaState) const
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 @@ bool KeyCharacterMap::getFallbackAction(int32_t keyCode, int32_t metaState,
}
}
#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 @@ char16_t KeyCharacterMap::getMatch(int32_t keyCode, const char16_t* chars, size_
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 @@ bool KeyCharacterMap::getEvents(int32_t deviceId, const char16_t* chars, size_t
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 @@ bool KeyCharacterMap::getEvents(int32_t deviceId, const char16_t* chars, size_t
addMetaKeys(outEvents, deviceId, metaState, false, now, &currentMetaState);
}
#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 @@ KeyCharacterMap::Parser::~Parser() {
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 KeyCharacterMap::Parser::parse() {
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 @@ status_t KeyCharacterMap::Parser::parse() {
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 @@ status_t KeyCharacterMap::Parser::parse() {
}
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::parse() {
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 @@ status_t KeyCharacterMap::Parser::parseType() {
} 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 @@ status_t KeyCharacterMap::Parser::parseKey() {
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 @@ status_t KeyCharacterMap::Parser::parseKey() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
}
}
- LOGE("%s: Expected ',' or ':' after property name.",
+ ALOGE("%s: Expected ',' or ':' after property name.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -634,12 +634,12 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
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 @@ status_t KeyCharacterMap::Parser::parseModifier(const String8& token, int32_t* o
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 @@ status_t KeyCharacterMap::Parser::parseCharacterLiteral(char16_t* outCharacter)
}
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 @@ status_t KeyLayoutMap::load(const String8& filename, KeyLayoutMap** outMap) {
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_t KeyLayoutMap::load(const String8& filename, KeyLayoutMap** outMap) {
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 @@ status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t* keyCode, uint32_t* flag
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 @@ status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t* keyCode, uint32_t* flag
*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 @@ status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const {
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 @@ status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const {
*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 @@ KeyLayoutMap::Parser::~Parser() {
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 KeyLayoutMap::Parser::parse() {
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 @@ status_t KeyLayoutMap::Parser::parseKey() {
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 @@ status_t KeyLayoutMap::Parser::parseKey() {
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 @@ status_t KeyLayoutMap::Parser::parseKey() {
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 @@ status_t KeyLayoutMap::Parser::parseKey() {
}
#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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyLayoutMap::Parser::parseAxis() {
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 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
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 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
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 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
}
// 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 Rect& rhs)
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 @@ public:
}
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 @@ bool Region::validate(const Region& reg, const char* name)
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 @@ bool Region::validate(const Region& reg, const char* name)
}
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 @@ void Region::boolean_operation(int op, Region& dst,
}
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 @@ void Region::boolean_operation(int op, Region& dst,
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 Region::dump(const char* what, uint32_t flags) const
(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 @@ status_t VirtualKeyMap::load(const String8& filename, VirtualKeyMap** outMap) {
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_t VirtualKeyMap::load(const String8& filename, VirtualKeyMap** outMap) {
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 @@ VirtualKeyMap::Parser::~Parser() {
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 @@ status_t VirtualKeyMap::Parser::parse() {
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 @@ status_t VirtualKeyMap::Parser::parse() {
&& 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 @@ status_t VirtualKeyMap::Parser::parse() {
} 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 @@ bool VirtualKeyMap::Parser::parseNextIntField(int32_t* outValue) {
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 @@ int main()
//reg2.dump("reg2");
//reg3.dump("reg3");
- LOGD("---");
+ ALOGD("---");
reg2 = reg0 | reg0.translate(100, 0);
reg0.dump("reg0");
reg1.dump("reg1");