diff options
135 files changed, 821 insertions, 821 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 154dbb8..f250367 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -83,7 +83,7 @@ sp<SurfaceComposerClient> BootAnimation::session() const { void BootAnimation::binderDied(const wp<IBinder>& who) { // woah, surfaceflinger died! - LOGD("SurfaceFlinger died, exiting..."); + ALOGD("SurfaceFlinger died, exiting..."); // calling requestExit() is not enough here because the Surface code // might be blocked on a condition variable that will never be updated. @@ -394,13 +394,13 @@ bool BootAnimation::movie() int fps, width, height, count, pause; char path[256]; if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) { - //LOGD("> w=%d, h=%d, fps=%d", fps, width, height); + //ALOGD("> w=%d, h=%d, fps=%d", fps, width, height); animation.width = width; animation.height = height; animation.fps = fps; } if (sscanf(l, "p %d %d %s", &count, &pause, path) == 3) { - //LOGD("> count=%d, pause=%d, path=%s", count, pause, path); + //ALOGD("> count=%d, pause=%d, path=%s", count, pause, path); Animation::Part part; part.count = count; part.pause = pause; diff --git a/core/jni/ActivityManager.cpp b/core/jni/ActivityManager.cpp index 0bd14fa..0f9d0bb 100644 --- a/core/jni/ActivityManager.cpp +++ b/core/jni/ActivityManager.cpp @@ -48,7 +48,7 @@ int openContentProviderFile(const String16& uri) } } else { // An exception was thrown back; fall through to return failure - LOGD("openContentUri(%s) caught exception %d\n", + ALOGD("openContentUri(%s) caught exception %d\n", String8(uri).string(), exceptionCode); } } diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 6d1410c..23d36a6 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -286,7 +286,7 @@ status_t AndroidRuntime::callMain(const char* className, JNIEnv* env; jmethodID methodId; - LOGD("Calling main entry %s", className); + ALOGD("Calling main entry %s", className); env = getJNIEnv(); if (clazz == NULL || env == NULL) { @@ -416,7 +416,7 @@ static void readLocale(char* language, char* region) } strncat(language, propLang, 2); strncat(region, propRegn, 2); - //LOGD("language=%s region=%s\n", language, region); + //ALOGD("language=%s region=%s\n", language, region); } /* @@ -629,7 +629,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) "-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y"; mOptions.add(opt); - LOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF"); + ALOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF"); if (checkJni) { /* extended JNI checking */ opt.optionString = "-Xcheck:jni"; @@ -798,7 +798,7 @@ char* AndroidRuntime::toSlashClassName(const char* className) */ void AndroidRuntime::start(const char* className, const char* options) { - LOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n", + ALOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n", className != NULL ? className : "(unknown)"); blockSigpipe(); @@ -825,7 +825,7 @@ void AndroidRuntime::start(const char* className, const char* options) } //const char* kernelHack = getenv("LD_ASSUME_KERNEL"); - //LOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack); + //ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack); /* start the virtual machine */ JNIEnv* env; @@ -888,7 +888,7 @@ void AndroidRuntime::start(const char* className, const char* options) } free(slashClassName); - LOGD("Shutting down VM\n"); + ALOGD("Shutting down VM\n"); if (mJavaVM->DetachCurrentThread() != JNI_OK) LOGW("Warning: unable to detach main thread\n"); if (mJavaVM->DestroyJavaVM() != 0) @@ -1064,7 +1064,7 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env for (size_t i = 0; i < count; i++) { if (array[i].mProc(env) < 0) { #ifndef NDEBUG - LOGD("----------!!! %s failed to load\n", array[i].mName); + ALOGD("----------!!! %s failed to load\n", array[i].mName); #endif return -1; } diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp index 7724646..1362fc8 100644 --- a/core/jni/android/graphics/Canvas.cpp +++ b/core/jni/android/graphics/Canvas.cpp @@ -442,7 +442,7 @@ public: #endif canvas->drawPicture(*picture); #ifdef TIME_DRAW - LOGD("---- picture playback %d ms\n", get_thread_msec() - now); + ALOGD("---- picture playback %d ms\n", get_thread_msec() - now); #endif } diff --git a/core/jni/android/graphics/HarfbuzzSkia.cpp b/core/jni/android/graphics/HarfbuzzSkia.cpp index f6f7b45..29064e0 100644 --- a/core/jni/android/graphics/HarfbuzzSkia.cpp +++ b/core/jni/android/graphics/HarfbuzzSkia.cpp @@ -98,7 +98,7 @@ static void glyphsToAdvances(HB_Font hbFont, const HB_Glyph* glyphs, hb_uint32 n for (unsigned i = 0; i < numGlyphs; ++i) { advances[i] = SkScalarToHBFixed(scalarAdvances[i]); #if DEBUG_ADVANCES - LOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]); + ALOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]); #endif } delete glyphs16; diff --git a/core/jni/android/graphics/TextLayout.cpp b/core/jni/android/graphics/TextLayout.cpp index e1398e9..1705768 100644 --- a/core/jni/android/graphics/TextLayout.cpp +++ b/core/jni/android/graphics/TextLayout.cpp @@ -350,7 +350,7 @@ void TextLayout::computeAdvancesWithICU(SkPaint* paint, const UChar* chars, jfloat totalAdvance = 0; if (widths < count) { #if DEBUG_ADVANCES - LOGD("ICU -- count=%d", widths); + ALOGD("ICU -- count=%d", widths); #endif // Skia operates on code points, not code units, so surrogate pairs return only // one value. Expand the result so we have one value per UTF-16 code unit. @@ -367,17 +367,17 @@ void TextLayout::computeAdvancesWithICU(SkPaint* paint, const UChar* chars, outAdvances[p++] = 0; } #if DEBUG_ADVANCES - LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance); + ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance); #endif } } else { #if DEBUG_ADVANCES - LOGD("ICU -- count=%d", count); + ALOGD("ICU -- count=%d", count); #endif for (size_t i = 0; i < count; i++) { totalAdvance += outAdvances[i] = SkScalarToFloat(scalarArray[i]); #if DEBUG_ADVANCES - LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance); + ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance); #endif } } diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index 662d918..f7bf420 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -47,12 +47,12 @@ void TextLayoutCache::init() { mDebugLevel = readRtlDebugLevel(); mDebugEnabled = mDebugLevel & kRtlDebugCaches; - LOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled); + ALOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled); mCacheStartTime = systemTime(SYSTEM_TIME_MONOTONIC); if (mDebugEnabled) { - LOGD("Initialization is done - Start time: %lld", mCacheStartTime); + ALOGD("Initialization is done - Start time: %lld", mCacheStartTime); } mInitialized = true; @@ -89,7 +89,7 @@ void TextLayoutCache::operator()(TextLayoutCacheKey& text, sp<TextLayoutCacheVal size_t totalSizeToDelete = text.getSize() + desc->getSize(); mSize -= totalSizeToDelete; if (mDebugEnabled) { - LOGD("Cache value deleted, size = %d", totalSizeToDelete); + ALOGD("Cache value deleted, size = %d", totalSizeToDelete); } desc.clear(); } @@ -138,7 +138,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, // Cleanup to make some room if needed if (mSize + size > mMaxSize) { if (mDebugEnabled) { - LOGD("Need to clean some entries for making some room for a new entry"); + ALOGD("Need to clean some entries for making some room for a new entry"); } while (mSize + size > mMaxSize) { // This will call the callback @@ -157,7 +157,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, // Update timing information for statistics value->setElapsedTime(endTime - startTime); - LOGD("CACHE MISS: Added entry with " + ALOGD("CACHE MISS: Added entry with " "count=%d, entry size %d bytes, remaining space %d bytes" " - Compute time in nanos: %d - Text='%s' ", count, size, mMaxSize - mSize, value->getElapsedTime(), @@ -165,7 +165,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, } } else { if (mDebugEnabled) { - LOGD("CACHE MISS: Calculated but not storing entry because it is too big " + ALOGD("CACHE MISS: Calculated but not storing entry because it is too big " "with start=%d count=%d contextCount=%d, " "entry size %d bytes, remaining space %d bytes" " - Compute time in nanos: %lld - Text='%s'", @@ -184,7 +184,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, if (value->getElapsedTime() > 0) { float deltaPercent = 100 * ((value->getElapsedTime() - elapsedTimeThruCacheGet) / ((float)value->getElapsedTime())); - LOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d" + ALOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d" "- Compute time in nanos: %d - " "Cache get time in nanos: %lld - Gain in percent: %2.2f - Text='%s' ", mCacheHitCount, start, count, contextCount, @@ -202,17 +202,17 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint, void TextLayoutCache::dumpCacheStats() { float remainingPercent = 100 * ((mMaxSize - mSize) / ((float)mMaxSize)); float timeRunningInSec = (systemTime(SYSTEM_TIME_MONOTONIC) - mCacheStartTime) / 1000000000; - LOGD("------------------------------------------------"); - LOGD("Cache stats"); - LOGD("------------------------------------------------"); - LOGD("pid : %d", getpid()); - LOGD("running : %.0f seconds", timeRunningInSec); - LOGD("entries : %d", mCache.size()); - LOGD("size : %d bytes", mMaxSize); - LOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent); - LOGD("hits : %d", mCacheHitCount); - LOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000); - LOGD("------------------------------------------------"); + ALOGD("------------------------------------------------"); + ALOGD("Cache stats"); + ALOGD("------------------------------------------------"); + ALOGD("pid : %d", getpid()); + ALOGD("running : %.0f seconds", timeRunningInSec); + ALOGD("entries : %d", mCache.size()); + ALOGD("size : %d bytes", mMaxSize); + ALOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent); + ALOGD("hits : %d", mCacheHitCount); + ALOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000); + ALOGD("------------------------------------------------"); } /** @@ -320,7 +320,7 @@ void TextLayoutCacheValue::computeValues(SkPaint* paint, const UChar* chars, computeValuesWithHarfbuzz(paint, chars, start, count, contextCount, dirFlags, &mAdvances, &mTotalAdvance, &mGlyphs); #if DEBUG_ADVANCES - LOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count, + ALOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count, contextCount, mTotalAdvance); #endif } @@ -435,14 +435,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar if (bidi) { UErrorCode status = U_ZERO_ERROR; #if DEBUG_GLYPHS - LOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq); + ALOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq); #endif ubidi_setPara(bidi, chars, contextCount, bidiReq, NULL, &status); if (U_SUCCESS(status)) { int paraDir = ubidi_getParaLevel(bidi) & kDirection_Mask; // 0 if ltr, 1 if rtl ssize_t rc = ubidi_countRuns(bidi, &status); #if DEBUG_GLYPHS - LOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d", + ALOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d", dirFlags, rc, paraDir); #endif if (U_SUCCESS(status) && rc == 1) { @@ -490,7 +490,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar isRTL = (runDir == UBIDI_RTL); jfloat runTotalAdvance = 0; #if DEBUG_GLYPHS - LOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d", + ALOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d", startRun, lengthRun, isRTL); #endif computeRunValuesWithHarfbuzz(shaperItem, paint, @@ -516,7 +516,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar // Default single run case if (useSingleRun){ #if DEBUG_GLYPHS - LOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run " + ALOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run " "-- run-start=%d run-len=%d isRTL=%d", start, count, isRTL); #endif computeRunValuesWithHarfbuzz(shaperItem, paint, @@ -528,14 +528,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar freeShaperItem(shaperItem); #if DEBUG_GLYPHS - LOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size()); + ALOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size()); #endif } static void logGlyphs(HB_ShaperItem shaperItem) { - LOGD("Got glyphs - count=%d", shaperItem.num_glyphs); + ALOGD("Got glyphs - count=%d", shaperItem.num_glyphs); for (size_t i = 0; i < shaperItem.num_glyphs; i++) { - LOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i], + ALOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i], HBFixedToFloat(shaperItem.offsets[i].x), HBFixedToFloat(shaperItem.offsets[i].y)); } @@ -553,17 +553,17 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte shapeRun(shaperItem, start, count, isRTL); #if DEBUG_GLYPHS - LOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs, + ALOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs, shaperItem.kerning_applied); - LOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string()); - LOGD(" -- isDevKernText=%d", paint->isDevKernText()); + ALOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string()); + ALOGD(" -- isDevKernText=%d", paint->isDevKernText()); logGlyphs(shaperItem); #endif if (shaperItem.advances == NULL || shaperItem.num_glyphs == 0) { #if DEBUG_GLYPHS - LOGD("HARFBUZZ -- advances array is empty or num_glypth = 0"); + ALOGD("HARFBUZZ -- advances array is empty or num_glypth = 0"); #endif outAdvances->insertAt(0, outAdvances->size(), count); *outTotalAdvance = 0; @@ -589,7 +589,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte #if DEBUG_ADVANCES for (size_t i = 0; i < count; i++) { - LOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i, + ALOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i, (*outAdvances)[i], shaperItem.log_clusters[i], totalAdvance); } #endif @@ -600,7 +600,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte for (size_t i = 0; i < countGlyphs; i++) { jchar glyph = (jchar) shaperItem.glyphs[(!isRTL) ? i : countGlyphs - 1 - i]; #if DEBUG_GLYPHS - LOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph); + ALOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph); #endif outGlyphs->add(glyph); } diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp index c43e7e7..15bb543 100644 --- a/core/jni/android_app_NativeActivity.cpp +++ b/core/jni/android_app_NativeActivity.cpp @@ -1060,7 +1060,7 @@ static const char* const kNativeActivityPathName = "android/app/NativeActivity"; int register_android_app_NativeActivity(JNIEnv* env) { - //LOGD("register_android_app_NativeActivity"); + //ALOGD("register_android_app_NativeActivity"); jclass clazz; FIND_CLASS(clazz, kNativeActivityPathName); diff --git a/core/jni/android_backup_BackupDataInput.cpp b/core/jni/android_backup_BackupDataInput.cpp index c174a41..2fb0076 100644 --- a/core/jni/android_backup_BackupDataInput.cpp +++ b/core/jni/android_backup_BackupDataInput.cpp @@ -80,7 +80,7 @@ readNextHeader_native(JNIEnv* env, jobject clazz, int r, jobject entity) return 0; } default: - LOGD("Unknown header type: 0x%08x\n", type); + ALOGD("Unknown header type: 0x%08x\n", type); return -1; } @@ -133,7 +133,7 @@ static const JNINativeMethod g_methods[] = { int register_android_backup_BackupDataInput(JNIEnv* env) { - //LOGD("register_android_backup_BackupDataInput"); + //ALOGD("register_android_backup_BackupDataInput"); jclass clazz = env->FindClass("android/app/backup/BackupDataInput$EntityHeader"); LOG_FATAL_IF(clazz == NULL, "Unable to find class android.app.backup.BackupDataInput.EntityHeader"); diff --git a/core/jni/android_backup_BackupDataOutput.cpp b/core/jni/android_backup_BackupDataOutput.cpp index 144a10c..f4b5dca 100644 --- a/core/jni/android_backup_BackupDataOutput.cpp +++ b/core/jni/android_backup_BackupDataOutput.cpp @@ -107,7 +107,7 @@ static const JNINativeMethod g_methods[] = { int register_android_backup_BackupDataOutput(JNIEnv* env) { - //LOGD("register_android_backup_BackupDataOutput"); + //ALOGD("register_android_backup_BackupDataOutput"); return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupDataOutput", g_methods, NELEM(g_methods)); } diff --git a/core/jni/android_backup_BackupHelperDispatcher.cpp b/core/jni/android_backup_BackupHelperDispatcher.cpp index 49f1cd4..1f188ff 100644 --- a/core/jni/android_backup_BackupHelperDispatcher.cpp +++ b/core/jni/android_backup_BackupHelperDispatcher.cpp @@ -85,11 +85,11 @@ readHeader_native(JNIEnv* env, jobject clazz, jobject headerObj, jobject fdObj) } #if 0 - LOGD("chunk header:"); - LOGD(" headerSize=%d", flattenedHeader.headerSize); - LOGD(" version=0x%08x", flattenedHeader.version); - LOGD(" dataSize=%d", flattenedHeader.dataSize); - LOGD(" nameLength=%d", flattenedHeader.nameLength); + ALOGD("chunk header:"); + ALOGD(" headerSize=%d", flattenedHeader.headerSize); + ALOGD(" version=0x%08x", flattenedHeader.version); + ALOGD(" dataSize=%d", flattenedHeader.dataSize); + ALOGD(" nameLength=%d", flattenedHeader.nameLength); #endif if (flattenedHeader.dataSize < 0 || flattenedHeader.nameLength < 0 || diff --git a/core/jni/android_bluetooth_BluetoothSocket.cpp b/core/jni/android_bluetooth_BluetoothSocket.cpp index 32ceb2c..d9ff36a 100644 --- a/core/jni/android_bluetooth_BluetoothSocket.cpp +++ b/core/jni/android_bluetooth_BluetoothSocket.cpp @@ -240,7 +240,7 @@ connect: * retry the connect. Unfortunately we have to create a new fd. * It's not ideal to switch the fd underneath the object, but * is currently safe */ - LOGD("Hit bug 5082381 (EALREADY on ACL collision), trying workaround"); + ALOGD("Hit bug 5082381 (EALREADY on ACL collision), trying workaround"); usleep(100000); retry++; abortNative(env, obj); @@ -252,7 +252,7 @@ connect: goto connect; } if (!ret && retry > 0) - LOGD("...workaround ok"); + ALOGD("...workaround ok"); if (ret) jniThrowIOException(env, errno); diff --git a/core/jni/android_bluetooth_common.cpp b/core/jni/android_bluetooth_common.cpp index a3e99cb..c8dc9c2 100644 --- a/core/jni/android_bluetooth_common.cpp +++ b/core/jni/android_bluetooth_common.cpp @@ -855,7 +855,7 @@ bool debug_no_encrypt() { property_get("debug.bt.no_encrypt", value, ""); if (!strncmp("true", value, PROPERTY_VALUE_MAX) || !strncmp("1", value, PROPERTY_VALUE_MAX)) { - LOGD("mandatory bluetooth encryption disabled"); + ALOGD("mandatory bluetooth encryption disabled"); return true; } else { return false; diff --git a/core/jni/android_database_SQLiteDatabase.cpp b/core/jni/android_database_SQLiteDatabase.cpp index 605a11c..2966a71 100644 --- a/core/jni/android_database_SQLiteDatabase.cpp +++ b/core/jni/android_database_SQLiteDatabase.cpp @@ -439,7 +439,7 @@ static jint native_addCustomFunction(JNIEnv* env, jobject object, sqlite3 * handle = (sqlite3 *)env->GetIntField(object, offset_db_handle); char const *nameStr = env->GetStringUTFChars(name, NULL); jobject ref = env->NewGlobalRef(function); - LOGD_IF(DEBUG_JNI, "native_addCustomFunction %s ref: %p", nameStr, ref); + ALOGD_IF(DEBUG_JNI, "native_addCustomFunction %s ref: %p", nameStr, ref); int err = sqlite3_create_function(handle, nameStr, numArgs, SQLITE_UTF8, (void *)ref, custom_function_callback, NULL, NULL); env->ReleaseStringUTFChars(name, nameStr); @@ -456,7 +456,7 @@ static jint native_addCustomFunction(JNIEnv* env, jobject object, static void native_releaseCustomFunction(JNIEnv* env, jobject object, jint ref) { - LOGD_IF(DEBUG_JNI, "native_releaseCustomFunction %d", ref); + ALOGD_IF(DEBUG_JNI, "native_releaseCustomFunction %d", ref); env->DeleteGlobalRef((jobject)ref); } diff --git a/core/jni/android_ddm_DdmHandleNativeHeap.cpp b/core/jni/android_ddm_DdmHandleNativeHeap.cpp index c3b4e3c..42d408d 100644 --- a/core/jni/android_ddm_DdmHandleNativeHeap.cpp +++ b/core/jni/android_ddm_DdmHandleNativeHeap.cpp @@ -87,7 +87,7 @@ static jbyteArray getLeakInfo(JNIEnv *env, jobject clazz) header.mapSize += amount; } while (header.mapSize < MAPS_FILE_SIZE); - LOGD("**** read %d bytes from '%s'", (int) header.mapSize, path); + ALOGD("**** read %d bytes from '%s'", (int) header.mapSize, path); } } @@ -105,7 +105,7 @@ static jbyteArray getLeakInfo(JNIEnv *env, jobject clazz) bytes = env->GetByteArrayElements(array, NULL); ptr = bytes; -// LOGD("*** mapSize: %d allocSize: %d allocInfoSize: %d totalMemory: %d", +// ALOGD("*** mapSize: %d allocSize: %d allocInfoSize: %d totalMemory: %d", // header.mapSize, header.allocSize, header.allocInfoSize, header.totalMemory); memcpy(ptr, &header, sizeof(header)); diff --git a/core/jni/android_hardware_UsbDeviceConnection.cpp b/core/jni/android_hardware_UsbDeviceConnection.cpp index 68be9e1..f53e2f7 100644 --- a/core/jni/android_hardware_UsbDeviceConnection.cpp +++ b/core/jni/android_hardware_UsbDeviceConnection.cpp @@ -64,7 +64,7 @@ android_hardware_UsbDeviceConnection_open(JNIEnv *env, jobject thiz, jstring dev static void android_hardware_UsbDeviceConnection_close(JNIEnv *env, jobject thiz) { - LOGD("close\n"); + ALOGD("close\n"); struct usb_device* device = get_device_from_object(env, thiz); if (device) { usb_device_close(device); diff --git a/core/jni/android_hardware_UsbRequest.cpp b/core/jni/android_hardware_UsbRequest.cpp index 6bd67d1..6e1d443 100644 --- a/core/jni/android_hardware_UsbRequest.cpp +++ b/core/jni/android_hardware_UsbRequest.cpp @@ -42,7 +42,7 @@ static jboolean android_hardware_UsbRequest_init(JNIEnv *env, jobject thiz, jobject java_device, jint ep_address, jint ep_attributes, jint ep_max_packet_size, jint ep_interval) { - LOGD("init\n"); + ALOGD("init\n"); struct usb_device* device = get_device_from_object(env, java_device); if (!device) { @@ -68,7 +68,7 @@ android_hardware_UsbRequest_init(JNIEnv *env, jobject thiz, jobject java_device, static void android_hardware_UsbRequest_close(JNIEnv *env, jobject thiz) { - LOGD("close\n"); + ALOGD("close\n"); struct usb_request* request = get_request_from_object(env, thiz); if (request) { usb_request_free(request); diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp index d9bd50e..724d9fb 100644 --- a/core/jni/android_net_NetUtils.cpp +++ b/core/jni/android_net_NetUtils.cpp @@ -97,7 +97,7 @@ static jint android_net_utils_resetConnections(JNIEnv* env, jobject clazz, const char *nameStr = env->GetStringUTFChars(ifname, NULL); - LOGD("android_net_utils_resetConnections in env=%p clazz=%p iface=%s mask=0x%x\n", + ALOGD("android_net_utils_resetConnections in env=%p clazz=%p iface=%s mask=0x%x\n", env, clazz, nameStr, mask); result = ::ifc_reset_connections(nameStr, mask); diff --git a/core/jni/android_nfc_NdefMessage.cpp b/core/jni/android_nfc_NdefMessage.cpp index 41099cb..82476cd 100644 --- a/core/jni/android_nfc_NdefMessage.cpp +++ b/core/jni/android_nfc_NdefMessage.cpp @@ -117,19 +117,19 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o, type = e->NewByteArray(record.TypeLength); if (type == NULL) { - LOGD("NFC_Set Record Type Error\n"); + ALOGD("NFC_Set Record Type Error\n"); goto end; } id = e->NewByteArray(record.IdLength); if(id == NULL) { - LOGD("NFC_Set Record ID Error\n"); + ALOGD("NFC_Set Record ID Error\n"); goto end; } payload = e->NewByteArray(record.PayloadLength); if(payload == NULL) { - LOGD("NFC_Set Record Payload Error\n"); + ALOGD("NFC_Set Record Payload Error\n"); goto end; } diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 85fac5f..f8dc618 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -530,9 +530,9 @@ static void android_os_Debug_dumpNativeHeap(JNIEnv* env, jobject clazz, return; } - LOGD("Native heap dump starting...\n"); + ALOGD("Native heap dump starting...\n"); dumpNativeHeap(fp); - LOGD("Native heap dump complete.\n"); + ALOGD("Native heap dump complete.\n"); fclose(fp); } diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index bd62268..9e3d04a 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -50,7 +50,7 @@ #define DEBUG_DEATH 0 #if DEBUG_DEATH -#define LOGDEATH LOGD +#define LOGDEATH ALOGD #else #define LOGDEATH ALOGV #endif diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp index e7626bc..bc7e47c 100644 --- a/core/jni/android_util_Process.cpp +++ b/core/jni/android_util_Process.cpp @@ -205,9 +205,9 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin } if (grp == ANDROID_TGROUP_BG_NONINTERACT) { - LOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline); + ALOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline); } else { - LOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline); + ALOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline); } #endif sprintf(proc_path, "/proc/%d/task", pid); diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index 426f4f7..d0c6be7 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -66,7 +66,7 @@ using namespace uirenderer; // Debug #if DEBUG_RENDERER - #define RENDERER_LOGD(...) LOGD(__VA_ARGS__) + #define RENDERER_LOGD(...) ALOGD(__VA_ARGS__) #else #define RENDERER_LOGD(...) #endif diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp index 300c04a..d44dbc0 100644 --- a/core/jni/android_view_InputQueue.cpp +++ b/core/jni/android_view_InputQueue.cpp @@ -138,7 +138,7 @@ status_t NativeInputQueue::registerInputChannel(JNIEnv* env, jobject inputChanne } #if DEBUG_REGISTRATION - LOGD("channel '%s' - Registered", inputChannel->getName().string()); + ALOGD("channel '%s' - Registered", inputChannel->getName().string()); #endif sp<Looper> looper = android_os_MessageQueue_getLooper(env, messageQueueObj); @@ -183,7 +183,7 @@ status_t NativeInputQueue::unregisterInputChannel(JNIEnv* env, jobject inputChan } #if DEBUG_REGISTRATION - LOGD("channel '%s' - Unregistered", inputChannel->getName().string()); + ALOGD("channel '%s' - Unregistered", inputChannel->getName().string()); #endif { // acquire lock @@ -277,7 +277,7 @@ status_t NativeInputQueue::finished(JNIEnv* env, jlong finishedToken, } #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ Finished event.", + ALOGD("channel '%s' ~ Finished event.", connection->getInputChannelName()); #endif } // release lock @@ -369,7 +369,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat switch (inputEventType) { case AINPUT_EVENT_TYPE_KEY: #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ Received key event.", connection->getInputChannelName()); + ALOGD("channel '%s' ~ Received key event.", connection->getInputChannelName()); #endif inputEventObj = android_view_KeyEvent_fromNative(env, static_cast<KeyEvent*>(inputEvent)); @@ -378,7 +378,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat case AINPUT_EVENT_TYPE_MOTION: #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ Received motion event.", connection->getInputChannelName()); + ALOGD("channel '%s' ~ Received motion event.", connection->getInputChannelName()); #endif inputEventObj = android_view_MotionEvent_obtainAsCopy(env, static_cast<MotionEvent*>(inputEvent)); @@ -399,13 +399,13 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat } #if DEBUG_DISPATCH_CYCLE - LOGD("Invoking input handler."); + ALOGD("Invoking input handler."); #endif env->CallStaticVoidMethod(gInputQueueClassInfo.clazz, dispatchMethodId, inputHandlerObjLocal, inputEventObj, jlong(finishedToken)); #if DEBUG_DISPATCH_CYCLE - LOGD("Returned from input handler."); + ALOGD("Returned from input handler."); #endif if (env->ExceptionCheck()) { diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp index 9d2ab28..62ea277 100644 --- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp +++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp @@ -174,7 +174,7 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr time_t modTime; if (!zipFile->getEntryInfo(zipEntry, NULL, &uncompLen, NULL, NULL, &when, &crc)) { - LOGD("Couldn't read zip entry info\n"); + ALOGD("Couldn't read zip entry info\n"); return INSTALL_FAILED_INVALID_APK; } else { struct tm t; @@ -187,7 +187,7 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr char localFileName[nativeLibPath.size() + fileNameLen + 2]; if (strlcpy(localFileName, nativeLibPath.c_str(), sizeof(localFileName)) != nativeLibPath.size()) { - LOGD("Couldn't allocate local file name for library"); + ALOGD("Couldn't allocate local file name for library"); return INSTALL_FAILED_INTERNAL_ERROR; } @@ -195,7 +195,7 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr if (strlcpy(localFileName + nativeLibPath.size() + 1, fileName, sizeof(localFileName) - nativeLibPath.size() - 1) != fileNameLen) { - LOGD("Couldn't allocate local file name for library"); + ALOGD("Couldn't allocate local file name for library"); return INSTALL_FAILED_INTERNAL_ERROR; } @@ -208,7 +208,7 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr char localTmpFileName[nativeLibPath.size() + TMP_FILE_PATTERN_LEN + 2]; if (strlcpy(localTmpFileName, nativeLibPath.c_str(), sizeof(localTmpFileName)) != nativeLibPath.size()) { - LOGD("Couldn't allocate local file name for library"); + ALOGD("Couldn't allocate local file name for library"); return INSTALL_FAILED_INTERNAL_ERROR; } diff --git a/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp b/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp index 57ef799..576ed15 100644 --- a/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp +++ b/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp @@ -24,7 +24,7 @@ namespace android { #ifdef DRM_OMA_FL_ENGINE_DEBUG #define LOG_NDEBUG 0 -#define LOG_DEBUG(...) LOGD(__VA_ARGS__) +#define LOG_DEBUG(...) ALOGD(__VA_ARGS__) #else #define LOG_DEBUG(...) #endif diff --git a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp index 976978f..0ffc0a7 100644 --- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp +++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp @@ -58,7 +58,7 @@ DrmMetadata* DrmPassthruPlugIn::onGetMetadata(int uniqueId, const String8* path) DrmConstraints* DrmPassthruPlugIn::onGetConstraints( int uniqueId, const String8* path, int action) { - LOGD("DrmPassthruPlugIn::onGetConstraints From Path: %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onGetConstraints From Path: %d", uniqueId); DrmConstraints* drmConstraints = new DrmConstraints(); String8 value("dummy_available_time"); @@ -73,7 +73,7 @@ DrmConstraints* DrmPassthruPlugIn::onGetConstraints( } DrmInfoStatus* DrmPassthruPlugIn::onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo) { - LOGD("DrmPassthruPlugIn::onProcessDrmInfo - Enter : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onProcessDrmInfo - Enter : %d", uniqueId); DrmInfoStatus* drmInfoStatus = NULL; if (NULL != drmInfo) { switch (drmInfo->getInfoType()) { @@ -102,28 +102,28 @@ DrmInfoStatus* DrmPassthruPlugIn::onProcessDrmInfo(int uniqueId, const DrmInfo* } } } - LOGD("DrmPassthruPlugIn::onProcessDrmInfo - Exit"); + ALOGD("DrmPassthruPlugIn::onProcessDrmInfo - Exit"); return drmInfoStatus; } status_t DrmPassthruPlugIn::onSetOnInfoListener( int uniqueId, const IDrmEngine::OnInfoListener* infoListener) { - LOGD("DrmPassthruPlugIn::onSetOnInfoListener : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onSetOnInfoListener : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onInitialize(int uniqueId) { - LOGD("DrmPassthruPlugIn::onInitialize : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onInitialize : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onTerminate(int uniqueId) { - LOGD("DrmPassthruPlugIn::onTerminate : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onTerminate : %d", uniqueId); return DRM_NO_ERROR; } DrmSupportInfo* DrmPassthruPlugIn::onGetSupportInfo(int uniqueId) { - LOGD("DrmPassthruPlugIn::onGetSupportInfo : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onGetSupportInfo : %d", uniqueId); DrmSupportInfo* drmSupportInfo = new DrmSupportInfo(); // Add mimetype's drmSupportInfo->addMimeType(String8("application/vnd.passthru.drm")); @@ -136,12 +136,12 @@ DrmSupportInfo* DrmPassthruPlugIn::onGetSupportInfo(int uniqueId) { status_t DrmPassthruPlugIn::onSaveRights(int uniqueId, const DrmRights& drmRights, const String8& rightsPath, const String8& contentPath) { - LOGD("DrmPassthruPlugIn::onSaveRights : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onSaveRights : %d", uniqueId); return DRM_NO_ERROR; } DrmInfo* DrmPassthruPlugIn::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest) { - LOGD("DrmPassthruPlugIn::onAcquireDrmInfo : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onAcquireDrmInfo : %d", uniqueId); DrmInfo* drmInfo = NULL; if (NULL != drmInfoRequest) { @@ -157,65 +157,65 @@ DrmInfo* DrmPassthruPlugIn::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* } bool DrmPassthruPlugIn::onCanHandle(int uniqueId, const String8& path) { - LOGD("DrmPassthruPlugIn::canHandle: %s ", path.string()); + ALOGD("DrmPassthruPlugIn::canHandle: %s ", path.string()); String8 extension = path.getPathExtension(); extension.toLower(); return (String8(".passthru") == extension); } String8 DrmPassthruPlugIn::onGetOriginalMimeType(int uniqueId, const String8& path) { - LOGD("DrmPassthruPlugIn::onGetOriginalMimeType() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onGetOriginalMimeType() : %d", uniqueId); return String8("video/passthru"); } int DrmPassthruPlugIn::onGetDrmObjectType( int uniqueId, const String8& path, const String8& mimeType) { - LOGD("DrmPassthruPlugIn::onGetDrmObjectType() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onGetDrmObjectType() : %d", uniqueId); return DrmObjectType::UNKNOWN; } int DrmPassthruPlugIn::onCheckRightsStatus(int uniqueId, const String8& path, int action) { - LOGD("DrmPassthruPlugIn::onCheckRightsStatus() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onCheckRightsStatus() : %d", uniqueId); int rightsStatus = RightsStatus::RIGHTS_VALID; return rightsStatus; } status_t DrmPassthruPlugIn::onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve) { - LOGD("DrmPassthruPlugIn::onConsumeRights() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onConsumeRights() : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) { - LOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId); return DRM_NO_ERROR; } bool DrmPassthruPlugIn::onValidateAction(int uniqueId, const String8& path, int action, const ActionDescription& description) { - LOGD("DrmPassthruPlugIn::onValidateAction() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onValidateAction() : %d", uniqueId); return true; } status_t DrmPassthruPlugIn::onRemoveRights(int uniqueId, const String8& path) { - LOGD("DrmPassthruPlugIn::onRemoveRights() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onRemoveRights() : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onRemoveAllRights(int uniqueId) { - LOGD("DrmPassthruPlugIn::onRemoveAllRights() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onRemoveAllRights() : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onOpenConvertSession(int uniqueId, int convertId) { - LOGD("DrmPassthruPlugIn::onOpenConvertSession() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onOpenConvertSession() : %d", uniqueId); return DRM_NO_ERROR; } DrmConvertedStatus* DrmPassthruPlugIn::onConvertData( int uniqueId, int convertId, const DrmBuffer* inputData) { - LOGD("DrmPassthruPlugIn::onConvertData() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onConvertData() : %d", uniqueId); DrmBuffer* convertedData = NULL; if (NULL != inputData && 0 < inputData->length) { @@ -229,13 +229,13 @@ DrmConvertedStatus* DrmPassthruPlugIn::onConvertData( } DrmConvertedStatus* DrmPassthruPlugIn::onCloseConvertSession(int uniqueId, int convertId) { - LOGD("DrmPassthruPlugIn::onCloseConvertSession() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onCloseConvertSession() : %d", uniqueId); return new DrmConvertedStatus(DrmConvertedStatus::STATUS_OK, NULL, 0 /*offset*/); } status_t DrmPassthruPlugIn::onOpenDecryptSession( int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) { - LOGD("DrmPassthruPlugIn::onOpenDecryptSession() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onOpenDecryptSession() : %d", uniqueId); #ifdef ENABLE_PASSTHRU_DECRYPTION decryptHandle->mimeType = String8("video/passthru"); @@ -254,7 +254,7 @@ status_t DrmPassthruPlugIn::onOpenDecryptSession( } status_t DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { - LOGD("DrmPassthruPlugIn::onCloseDecryptSession() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onCloseDecryptSession() : %d", uniqueId); if (NULL != decryptHandle) { if (NULL != decryptHandle->decryptInfo) { delete decryptHandle->decryptInfo; decryptHandle->decryptInfo = NULL; @@ -266,13 +266,13 @@ status_t DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* d status_t DrmPassthruPlugIn::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo) { - LOGD("DrmPassthruPlugIn::onInitializeDecryptUnit() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onInitializeDecryptUnit() : %d", uniqueId); return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) { - LOGD("DrmPassthruPlugIn::onDecrypt() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onDecrypt() : %d", uniqueId); /** * As a workaround implementation passthru would copy the given * encrypted buffer as it is to decrypted buffer. Note, decBuffer @@ -287,13 +287,13 @@ status_t DrmPassthruPlugIn::onDecrypt(int uniqueId, DecryptHandle* decryptHandle status_t DrmPassthruPlugIn::onFinalizeDecryptUnit( int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) { - LOGD("DrmPassthruPlugIn::onFinalizeDecryptUnit() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onFinalizeDecryptUnit() : %d", uniqueId); return DRM_NO_ERROR; } ssize_t DrmPassthruPlugIn::onPread(int uniqueId, DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off64_t offset) { - LOGD("DrmPassthruPlugIn::onPread() : %d", uniqueId); + ALOGD("DrmPassthruPlugIn::onPread() : %d", uniqueId); return 0; } diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp index 1ace8f8..2111fe8 100644 --- a/libs/binder/IMemory.cpp +++ b/libs/binder/IMemory.cpp @@ -244,7 +244,7 @@ BpMemoryHeap::~BpMemoryHeap() { 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(); @@ -393,7 +393,7 @@ HeapCache::~HeapCache() 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 @@ sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder) 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 @@ sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder) 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 @@ void HeapCache::free_heap(const wp<IBinder>& binder) 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, @@ -468,7 +468,7 @@ void HeapCache::dump_heaps() 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/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp index 18669f7..825edb8 100644 --- a/libs/binder/MemoryDealer.cpp +++ b/libs/binder/MemoryDealer.cpp @@ -411,7 +411,7 @@ void SimpleBestFitAllocator::dump_l(const char* what) const { 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..e171374 100644 --- a/libs/binder/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp @@ -132,7 +132,7 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset) 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 @@ void MemoryHeapBase::dispose() 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/Parcel.cpp b/libs/binder/Parcel.cpp index 26571ce..d987178 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -103,7 +103,7 @@ void acquire_object(const sp<ProcessState>& proc, } } - LOGD("Invalid object type 0x%08lx", obj.type); + ALOGD("Invalid object type 0x%08lx", obj.type); } void release_object(const sp<ProcessState>& proc, @@ -703,7 +703,7 @@ status_t Parcel::writeNativeHandle(const native_handle* handle) 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); 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 @@ bool PermissionCache::checkPermission( 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/camera/Camera.cpp b/libs/camera/Camera.cpp index da21d1a..eef1dd2 100644 --- a/libs/camera/Camera.cpp +++ b/libs/camera/Camera.cpp @@ -178,7 +178,7 @@ status_t Camera::setPreviewDisplay(const sp<Surface>& surface) if (surface != 0) { return c->setPreviewDisplay(surface); } else { - LOGD("app passed NULL surface"); + ALOGD("app passed NULL surface"); return c->setPreviewDisplay(0); } } @@ -192,7 +192,7 @@ status_t Camera::setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture) if (surfaceTexture != 0) { return c->setPreviewTexture(surfaceTexture); } else { - LOGD("app passed NULL surface"); + ALOGD("app passed NULL surface"); return c->setPreviewTexture(0); } } diff --git a/libs/camera/CameraParameters.cpp b/libs/camera/CameraParameters.cpp index c6087b4..209d84a 100644 --- a/libs/camera/CameraParameters.cpp +++ b/libs/camera/CameraParameters.cpp @@ -449,12 +449,12 @@ const char *CameraParameters::getPictureFormat() const void CameraParameters::dump() const { - LOGD("dump: mMap.size = %d", mMap.size()); + ALOGD("dump: mMap.size = %d", mMap.size()); for (size_t i = 0; i < mMap.size(); i++) { String8 k, v; k = mMap.keyAt(i); v = mMap.valueAt(i); - LOGD("%s: %s\n", k.string(), v.string()); + ALOGD("%s: %s\n", k.string(), v.string()); } } diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 0014c88..c86be7f 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -61,7 +61,7 @@ // Macros for including the SurfaceTexture name in log messages #define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__) -#define ST_LOGD(x, ...) LOGD("[%s] "x, mName.string(), ##__VA_ARGS__) +#define ST_LOGD(x, ...) ALOGD("[%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__) diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp index 3d47f05..b7d3fe7 100644 --- a/libs/gui/SurfaceTextureClient.cpp +++ b/libs/gui/SurfaceTextureClient.cpp @@ -183,13 +183,13 @@ int SurfaceTextureClient::getSlotFromBufferLocked( // 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; diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index f293cba..c4fecb6 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -37,7 +37,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// #if DEBUG_CACHE_FLUSH - #define FLUSH_LOGD(...) LOGD(__VA_ARGS__) + #define FLUSH_LOGD(...) ALOGD(__VA_ARGS__) #else #define FLUSH_LOGD(...) #endif @@ -58,7 +58,7 @@ Caches::Caches(): Singleton<Caches>(), mInitialized(false) { init(); mDebugLevel = readDebugLevel(); - LOGD("Enabling debug mode %d", mDebugLevel); + ALOGD("Enabling debug mode %d", mDebugLevel); #if RENDER_LAYERS_AS_REGIONS INIT_LOGD("Layers will be composited as regions"); @@ -108,7 +108,7 @@ void Caches::terminate() { void Caches::dumpMemoryUsage() { String8 stringLog; dumpMemoryUsage(stringLog); - LOGD("%s", stringLog.string()); + ALOGD("%s", stringLog.string()); } void Caches::dumpMemoryUsage(String8 &log) { diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h index 7cbb39d..0ad0c2a 100644 --- a/libs/hwui/Debug.h +++ b/libs/hwui/Debug.h @@ -66,7 +66,7 @@ #define DEBUG_DISPLAY_LIST 0 #if DEBUG_INIT - #define INIT_LOGD(...) LOGD(__VA_ARGS__) + #define INIT_LOGD(...) ALOGD(__VA_ARGS__) #else #define INIT_LOGD(...) #endif diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 3372d1c..751da44 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -214,7 +214,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { indent[i] = ' '; } indent[count] = '\0'; - LOGD("%sStart display list (%p)", (char*) indent + 2, this); + ALOGD("%sStart display list (%p)", (char*) indent + 2, this); int saveCount = renderer.getSaveCount() - 1; @@ -226,21 +226,21 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { switch (op) { case DrawGLFunction: { Functor *functor = (Functor *) getInt(); - LOGD("%s%s %p", (char*) indent, OP_NAMES[op], functor); + ALOGD("%s%s %p", (char*) indent, OP_NAMES[op], functor); } break; case Save: { int rendererNum = getInt(); - LOGD("%s%s %d", (char*) indent, OP_NAMES[op], rendererNum); + ALOGD("%s%s %d", (char*) indent, OP_NAMES[op], rendererNum); } break; case Restore: { - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case RestoreToCount: { int restoreCount = saveCount + getInt(); - LOGD("%s%s %d", (char*) indent, OP_NAMES[op], restoreCount); + ALOGD("%s%s %d", (char*) indent, OP_NAMES[op], restoreCount); } break; case SaveLayer: { @@ -250,7 +250,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f4 = getFloat(); SkPaint* paint = getPaint(); int flags = getInt(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p, 0x%x", (char*) indent, + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p, 0x%x", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, paint, flags); } break; @@ -261,41 +261,41 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f4 = getFloat(); int alpha = getInt(); int flags = getInt(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", (char*) indent, + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, alpha, flags); } break; case Translate: { float f1 = getFloat(); float f2 = getFloat(); - LOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], f1, f2); + ALOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], f1, f2); } break; case Rotate: { float rotation = getFloat(); - LOGD("%s%s %.2f", (char*) indent, OP_NAMES[op], rotation); + ALOGD("%s%s %.2f", (char*) indent, OP_NAMES[op], rotation); } break; case Scale: { float sx = getFloat(); float sy = getFloat(); - LOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], sx, sy); + ALOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], sx, sy); } break; case Skew: { float sx = getFloat(); float sy = getFloat(); - LOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], sx, sy); + ALOGD("%s%s %.2f, %.2f", (char*) indent, OP_NAMES[op], sx, sy); } break; case SetMatrix: { SkMatrix* matrix = getMatrix(); - LOGD("%s%s %p", (char*) indent, OP_NAMES[op], matrix); + ALOGD("%s%s %p", (char*) indent, OP_NAMES[op], matrix); } break; case ConcatMatrix: { SkMatrix* matrix = getMatrix(); - LOGD("%s%s %p", (char*) indent, OP_NAMES[op], matrix); + ALOGD("%s%s %p", (char*) indent, OP_NAMES[op], matrix); } break; case ClipRect: { @@ -304,7 +304,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f3 = getFloat(); float f4 = getFloat(); int regionOp = getInt(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, regionOp); } break; @@ -312,7 +312,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { DisplayList* displayList = getDisplayList(); uint32_t width = getUInt(); uint32_t height = getUInt(); - LOGD("%s%s %p, %dx%d, %d", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %p, %dx%d, %d", (char*) indent, OP_NAMES[op], displayList, width, height, level + 1); renderer.outputDisplayList(displayList, level + 1); } @@ -322,7 +322,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float x = getFloat(); float y = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], layer, x, y, paint); } break; @@ -331,7 +331,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float x = getFloat(); float y = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %p, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], bitmap, x, y, paint); } break; @@ -339,7 +339,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { SkBitmap* bitmap = getBitmap(); SkMatrix* matrix = getMatrix(); SkPaint* paint = getPaint(); - LOGD("%s%s %p, %p, %p", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %p, %p, %p", (char*) indent, OP_NAMES[op], bitmap, matrix, paint); } break; @@ -354,7 +354,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f7 = getFloat(); float f8 = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p", + ALOGD("%s%s %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], bitmap, f1, f2, f3, f4, f5, f6, f7, f8, paint); } break; @@ -368,7 +368,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { bool hasColors = getInt(); int* colors = hasColors ? getInts(colorsCount) : NULL; SkPaint* paint = getPaint(); - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case DrawPatch: { @@ -387,14 +387,14 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float right = getFloat(); float bottom = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f", (char*) indent, OP_NAMES[op], left, top, right, bottom); } break; case DrawColor: { int color = getInt(); int xferMode = getInt(); - LOGD("%s%s 0x%x %d", (char*) indent, OP_NAMES[op], color, xferMode); + ALOGD("%s%s 0x%x %d", (char*) indent, OP_NAMES[op], color, xferMode); } break; case DrawRect: { @@ -403,7 +403,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f3 = getFloat(); float f4 = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, paint); } break; @@ -415,7 +415,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f5 = getFloat(); float f6 = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p", + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, f5, f6, paint); } break; @@ -424,7 +424,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f2 = getFloat(); float f3 = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %p", + ALOGD("%s%s %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], f1, f2, f3, paint); } break; @@ -434,7 +434,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f3 = getFloat(); float f4 = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p", + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, paint); } break; @@ -447,28 +447,28 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float f6 = getFloat(); int i1 = getInt(); SkPaint* paint = getPaint(); - LOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %d, %p", + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %d, %p", (char*) indent, OP_NAMES[op], f1, f2, f3, f4, f5, f6, i1, paint); } break; case DrawPath: { SkPath* path = getPath(); SkPaint* paint = getPaint(); - LOGD("%s%s %p, %p", (char*) indent, OP_NAMES[op], path, paint); + ALOGD("%s%s %p, %p", (char*) indent, OP_NAMES[op], path, paint); } break; case DrawLines: { int count = 0; float* points = getFloats(count); SkPaint* paint = getPaint(); - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case DrawPoints: { int count = 0; float* points = getFloats(count); SkPaint* paint = getPaint(); - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case DrawText: { @@ -477,30 +477,30 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float x = getFloat(); float y = getFloat(); SkPaint* paint = getPaint(); - LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %s, %d, %d, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op], text.text(), text.length(), count, x, y, paint); } break; case ResetShader: { - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case SetupShader: { SkiaShader* shader = getShader(); - LOGD("%s%s %p", (char*) indent, OP_NAMES[op], shader); + ALOGD("%s%s %p", (char*) indent, OP_NAMES[op], shader); } break; case ResetColorFilter: { - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case SetupColorFilter: { SkiaColorFilter *colorFilter = getColorFilter(); - LOGD("%s%s %p", (char*) indent, OP_NAMES[op], colorFilter); + ALOGD("%s%s %p", (char*) indent, OP_NAMES[op], colorFilter); } break; case ResetShadow: { - LOGD("%s%s", (char*) indent, OP_NAMES[op]); + ALOGD("%s%s", (char*) indent, OP_NAMES[op]); } break; case SetupShadow: { @@ -508,18 +508,18 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) { float dx = getFloat(); float dy = getFloat(); int color = getInt(); - LOGD("%s%s %.2f, %.2f, %.2f, 0x%x", (char*) indent, OP_NAMES[op], + ALOGD("%s%s %.2f, %.2f, %.2f, 0x%x", (char*) indent, OP_NAMES[op], radius, dx, dy, color); } break; default: - LOGD("Display List error: op not handled: %s%s", + ALOGD("Display List error: op not handled: %s%s", (char*) indent, OP_NAMES[op]); break; } } - LOGD("%sDone", (char*) indent + 2); + ALOGD("%sDone", (char*) indent + 2); } /** diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index ab475bf..f4ae573 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -43,7 +43,7 @@ namespace uirenderer { // Debug #if DEBUG_DISPLAY_LIST - #define DISPLAY_LIST_LOGD(...) LOGD(__VA_ARGS__) + #define DISPLAY_LIST_LOGD(...) ALOGD(__VA_ARGS__) #else #define DISPLAY_LIST_LOGD(...) #endif diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h index 38d1130..68e33cd 100644 --- a/libs/hwui/Extensions.h +++ b/libs/hwui/Extensions.h @@ -34,7 +34,7 @@ namespace uirenderer { // Debug #if DEBUG_EXTENSIONS - #define EXT_LOGD(...) LOGD(__VA_ARGS__) + #define EXT_LOGD(...) ALOGD(__VA_ARGS__) #else #define EXT_LOGD(...) #endif @@ -87,7 +87,7 @@ public: } void dump() { - LOGD("Supported extensions:\n%s", mExtensions); + ALOGD("Supported extensions:\n%s", mExtensions); } private: diff --git a/libs/hwui/LayerCache.h b/libs/hwui/LayerCache.h index c14c9ca..fd698e2 100644 --- a/libs/hwui/LayerCache.h +++ b/libs/hwui/LayerCache.h @@ -31,7 +31,7 @@ namespace uirenderer { // Debug #if DEBUG_LAYERS - #define LAYER_LOGD(...) LOGD(__VA_ARGS__) + #define LAYER_LOGD(...) ALOGD(__VA_ARGS__) #else #define LAYER_LOGD(...) #endif diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index e38b479..1fd9b54 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -216,7 +216,7 @@ Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque layer->allocateTexture(GL_RGBA, GL_UNSIGNED_BYTE); if (glGetError() != GL_NO_ERROR) { - LOGD("Could not allocate texture for layer (fbo=%d %dx%d)", + ALOGD("Could not allocate texture for layer (fbo=%d %dx%d)", fbo, width, height); glBindFramebuffer(GL_FRAMEBUFFER, previousFbo); @@ -439,7 +439,7 @@ bool LayerRenderer::copyLayer(Layer* layer, SkBitmap* bitmap) { error: #if DEBUG_OPENGL if (error != GL_NO_ERROR) { - LOGD("GL error while copying layer into bitmap = 0x%x", error); + ALOGD("GL error while copying layer into bitmap = 0x%x", error); } #endif diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h index 6104301..fe28e31 100644 --- a/libs/hwui/LayerRenderer.h +++ b/libs/hwui/LayerRenderer.h @@ -33,7 +33,7 @@ namespace uirenderer { // Debug #if DEBUG_LAYER_RENDERER - #define LAYER_RENDERER_LOGD(...) LOGD(__VA_ARGS__) + #define LAYER_RENDERER_LOGD(...) ALOGD(__VA_ARGS__) #else #define LAYER_RENDERER_LOGD(...) #endif diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 769c99c..a8f937d 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -374,12 +374,12 @@ void Matrix4::mapRect(Rect& r) const { } void Matrix4::dump() const { - LOGD("Matrix4[simple=%d", mSimpleMatrix); - LOGD(" %f %f %f %f", data[kScaleX], data[kSkewX], data[8], data[kTranslateX]); - LOGD(" %f %f %f %f", data[kSkewY], data[kScaleY], data[9], data[kTranslateY]); - LOGD(" %f %f %f %f", data[2], data[6], data[kScaleZ], data[kTranslateZ]); - LOGD(" %f %f %f %f", data[kPerspective0], data[kPerspective1], data[11], data[kPerspective2]); - LOGD("]"); + ALOGD("Matrix4[simple=%d", mSimpleMatrix); + ALOGD(" %f %f %f %f", data[kScaleX], data[kSkewX], data[8], data[kTranslateX]); + ALOGD(" %f %f %f %f", data[kSkewY], data[kScaleY], data[9], data[kTranslateY]); + ALOGD(" %f %f %f %f", data[2], data[6], data[kScaleZ], data[kTranslateZ]); + ALOGD(" %f %f %f %f", data[kPerspective0], data[kPerspective1], data[11], data[kPerspective2]); + ALOGD("]"); } }; // namespace uirenderer diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 4d22646..fb8664e 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -173,7 +173,7 @@ void OpenGLRenderer::finish() { #if DEBUG_OPENGL GLenum status = GL_NO_ERROR; while ((status = glGetError()) != GL_NO_ERROR) { - LOGD("GL error from OpenGLRenderer: 0x%x", status); + ALOGD("GL error from OpenGLRenderer: 0x%x", status); switch (status) { case GL_OUT_OF_MEMORY: LOGE(" OpenGLRenderer is out of memory!"); diff --git a/libs/hwui/PatchCache.h b/libs/hwui/PatchCache.h index 91b603f..505798a 100644 --- a/libs/hwui/PatchCache.h +++ b/libs/hwui/PatchCache.h @@ -32,7 +32,7 @@ namespace uirenderer { // Debug #if DEBUG_PATCHES - #define PATCH_LOGD(...) LOGD(__VA_ARGS__) + #define PATCH_LOGD(...) ALOGD(__VA_ARGS__) #else #define PATCH_LOGD(...) #endif diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h index 5c7197b..0ff2148 100644 --- a/libs/hwui/ProgramCache.h +++ b/libs/hwui/ProgramCache.h @@ -37,7 +37,7 @@ namespace uirenderer { // Debug #if DEBUG_PROGRAMS - #define PROGRAM_LOGD(...) LOGD(__VA_ARGS__) + #define PROGRAM_LOGD(...) ALOGD(__VA_ARGS__) #else #define PROGRAM_LOGD(...) #endif diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h index edc90e1..5baada3 100644 --- a/libs/hwui/Rect.h +++ b/libs/hwui/Rect.h @@ -169,7 +169,7 @@ public: } void dump() const { - LOGD("Rect[l=%f t=%f r=%f b=%f]", left, top, right, bottom); + ALOGD("Rect[l=%f t=%f r=%f b=%f]", left, top, right, bottom); } }; // class Rect diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp index ee73983..9ffad88 100644 --- a/libs/hwui/ResourceCache.cpp +++ b/libs/hwui/ResourceCache.cpp @@ -26,12 +26,12 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// void ResourceCache::logCache() { - LOGD("ResourceCache: cacheReport:"); + ALOGD("ResourceCache: cacheReport:"); for (size_t i = 0; i < mCache->size(); ++i) { ResourceReference* ref = mCache->valueAt(i); - LOGD(" ResourceCache: mCache(%d): resource, ref = 0x%p, 0x%p", + ALOGD(" ResourceCache: mCache(%d): resource, ref = 0x%p, 0x%p", i, mCache->keyAt(i), mCache->valueAt(i)); - LOGD(" ResourceCache: mCache(%d): refCount, recycled, destroyed, type = %d, %d, %d, %d", + ALOGD(" ResourceCache: mCache(%d): refCount, recycled, destroyed, type = %d, %d, %d, %d", i, ref->refCount, ref->recycled, ref->destroyed, ref->resourceType); } } diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h index 0660b69..1d7ac5e 100644 --- a/libs/hwui/ShapeCache.h +++ b/libs/hwui/ShapeCache.h @@ -40,7 +40,7 @@ namespace uirenderer { // Debug #if DEBUG_SHAPES - #define SHAPE_LOGD(...) LOGD(__VA_ARGS__) + #define SHAPE_LOGD(...) ALOGD(__VA_ARGS__) #else #define SHAPE_LOGD(...) #endif @@ -481,7 +481,7 @@ void ShapeCache<Entry>::removeTexture(PathTexture* texture) { SHAPE_LOGD("ShapeCache::callback: delete %s: name, size, mSize = %d, %d, %d", mName, texture->id, size, mSize); if (mDebugEnabled) { - LOGD("Shape %s deleted, size = %d", mName, size); + ALOGD("Shape %s deleted, size = %d", mName, size); } glDeleteTextures(1, &texture->id); @@ -551,7 +551,7 @@ PathTexture* ShapeCache<Entry>::addTexture(const Entry& entry, const SkPath *pat SHAPE_LOGD("ShapeCache::get: create %s: name, size, mSize = %d, %d, %d", mName, texture->id, size, mSize); if (mDebugEnabled) { - LOGD("Shape %s created, size = %d", mName, size); + ALOGD("Shape %s created, size = %d", mName, size); } mCache.put(entry, texture); } else { diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp index a3ee63b..ee8d828 100644 --- a/libs/hwui/TextDropShadowCache.cpp +++ b/libs/hwui/TextDropShadowCache.cpp @@ -85,7 +85,7 @@ void TextDropShadowCache::operator()(ShadowText& text, ShadowTexture*& texture) mSize -= texture->bitmapSize; if (mDebugEnabled) { - LOGD("Shadow texture deleted, size = %d", texture->bitmapSize); + ALOGD("Shadow texture deleted, size = %d", texture->bitmapSize); } glDeleteTextures(1, &texture->id); @@ -142,7 +142,7 @@ ShadowTexture* TextDropShadowCache::get(SkPaint* paint, const char* text, uint32 if (size < mMaxSize) { if (mDebugEnabled) { - LOGD("Shadow texture created, size = %d", texture->bitmapSize); + ALOGD("Shadow texture created, size = %d", texture->bitmapSize); } entry.copyTextLocally(); diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 018ce3e..c031c19 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -109,7 +109,7 @@ void TextureCache::operator()(SkBitmap*& bitmap, Texture*& texture) { TEXTURE_LOGD("TextureCache::callback: name, removed size, mSize = %d, %d, %d", texture->id, texture->bitmapSize, mSize); if (mDebugEnabled) { - LOGD("Texture deleted, size = %d", texture->bitmapSize); + ALOGD("Texture deleted, size = %d", texture->bitmapSize); } glDeleteTextures(1, &texture->id); delete texture; @@ -146,7 +146,7 @@ Texture* TextureCache::get(SkBitmap* bitmap) { TEXTURE_LOGD("TextureCache::get: create texture(%p): name, size, mSize = %d, %d, %d", bitmap, texture->id, size, mSize); if (mDebugEnabled) { - LOGD("Texture created, size = %d", size); + ALOGD("Texture created, size = %d", size); } mCache.put(bitmap, texture); } else { diff --git a/libs/hwui/TextureCache.h b/libs/hwui/TextureCache.h index ce924b4..d879392 100644 --- a/libs/hwui/TextureCache.h +++ b/libs/hwui/TextureCache.h @@ -34,7 +34,7 @@ namespace uirenderer { // Debug #if DEBUG_TEXTURES - #define TEXTURE_LOGD(...) LOGD(__VA_ARGS__) + #define TEXTURE_LOGD(...) ALOGD(__VA_ARGS__) #else #define TEXTURE_LOGD(...) #endif diff --git a/libs/hwui/Vector.h b/libs/hwui/Vector.h index 46dded5..497924e 100644 --- a/libs/hwui/Vector.h +++ b/libs/hwui/Vector.h @@ -103,7 +103,7 @@ struct Vector2 { } void dump() { - LOGD("Vector2[%.2f, %.2f]", x, y); + ALOGD("Vector2[%.2f, %.2f]", x, y); } }; // class Vector2 diff --git a/libs/rs/driver/rsdRuntimeStubs.cpp b/libs/rs/driver/rsdRuntimeStubs.cpp index 90c8928..b457d8b 100644 --- a/libs/rs/driver/rsdRuntimeStubs.cpp +++ b/libs/rs/driver/rsdRuntimeStubs.cpp @@ -439,51 +439,51 @@ unsigned int SC_umodsi3(unsigned int a, unsigned int b) { } static void SC_debugF(const char *s, float f) { - LOGD("%s %f, 0x%08x", s, f, *((int *) (&f))); + ALOGD("%s %f, 0x%08x", s, f, *((int *) (&f))); } static void SC_debugFv2(const char *s, float f1, float f2) { - LOGD("%s {%f, %f}", s, f1, f2); + ALOGD("%s {%f, %f}", s, f1, f2); } static void SC_debugFv3(const char *s, float f1, float f2, float f3) { - LOGD("%s {%f, %f, %f}", s, f1, f2, f3); + ALOGD("%s {%f, %f, %f}", s, f1, f2, f3); } static void SC_debugFv4(const char *s, float f1, float f2, float f3, float f4) { - LOGD("%s {%f, %f, %f, %f}", s, f1, f2, f3, f4); + ALOGD("%s {%f, %f, %f, %f}", s, f1, f2, f3, f4); } static void SC_debugD(const char *s, double d) { - LOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d))); + ALOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d))); } static void SC_debugFM4v4(const char *s, const float *f) { - LOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]); - LOGD("%s %f, %f, %f, %f", s, f[1], f[5], f[9], f[13]); - LOGD("%s %f, %f, %f, %f", s, f[2], f[6], f[10], f[14]); - LOGD("%s %f, %f, %f, %f}", s, f[3], f[7], f[11], f[15]); + ALOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]); + ALOGD("%s %f, %f, %f, %f", s, f[1], f[5], f[9], f[13]); + ALOGD("%s %f, %f, %f, %f", s, f[2], f[6], f[10], f[14]); + ALOGD("%s %f, %f, %f, %f}", s, f[3], f[7], f[11], f[15]); } static void SC_debugFM3v3(const char *s, const float *f) { - LOGD("%s {%f, %f, %f", s, f[0], f[3], f[6]); - LOGD("%s %f, %f, %f", s, f[1], f[4], f[7]); - LOGD("%s %f, %f, %f}",s, f[2], f[5], f[8]); + ALOGD("%s {%f, %f, %f", s, f[0], f[3], f[6]); + ALOGD("%s %f, %f, %f", s, f[1], f[4], f[7]); + ALOGD("%s %f, %f, %f}",s, f[2], f[5], f[8]); } static void SC_debugFM2v2(const char *s, const float *f) { - LOGD("%s {%f, %f", s, f[0], f[2]); - LOGD("%s %f, %f}",s, f[1], f[3]); + ALOGD("%s {%f, %f", s, f[0], f[2]); + ALOGD("%s %f, %f}",s, f[1], f[3]); } static void SC_debugI32(const char *s, int32_t i) { - LOGD("%s %i 0x%x", s, i, i); + ALOGD("%s %i 0x%x", s, i, i); } static void SC_debugU32(const char *s, uint32_t i) { - LOGD("%s %u 0x%x", s, i, i); + ALOGD("%s %u 0x%x", s, i, i); } static void SC_debugLL64(const char *s, long long ll) { - LOGD("%s %lld 0x%llx", s, ll, ll); + ALOGD("%s %lld 0x%llx", s, ll, ll); } static void SC_debugULL64(const char *s, unsigned long long ll) { - LOGD("%s %llu 0x%llx", s, ll, ll); + ALOGD("%s %llu 0x%llx", s, ll, ll); } static void SC_debugP(const char *s, const void *p) { - LOGD("%s %p", s, p); + ALOGD("%s %p", s, p); } diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp index 8ddbeae..4ec8b25 100644 --- a/libs/storage/IMountService.cpp +++ b/libs/storage/IMountService.cpp @@ -66,12 +66,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeStrongBinder(listener->asBinder()); if (remote()->transact(TRANSACTION_registerListener, data, &reply) != NO_ERROR) { - LOGD("registerListener could not contact remote\n"); + ALOGD("registerListener could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("registerListener caught exception %d\n", err); + ALOGD("registerListener caught exception %d\n", err); return; } } @@ -82,12 +82,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeStrongBinder(listener->asBinder()); if (remote()->transact(TRANSACTION_unregisterListener, data, &reply) != NO_ERROR) { - LOGD("unregisterListener could not contact remote\n"); + ALOGD("unregisterListener could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("unregisterListener caught exception %d\n", err); + ALOGD("unregisterListener caught exception %d\n", err); return; } } @@ -97,12 +97,12 @@ public: Parcel data, reply; data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); if (remote()->transact(TRANSACTION_isUsbMassStorageConnected, data, &reply) != NO_ERROR) { - LOGD("isUsbMassStorageConnected could not contact remote\n"); + ALOGD("isUsbMassStorageConnected could not contact remote\n"); return false; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("isUsbMassStorageConnected caught exception %d\n", err); + ALOGD("isUsbMassStorageConnected caught exception %d\n", err); return false; } return reply.readInt32() != 0; @@ -114,12 +114,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeInt32(enable != 0); if (remote()->transact(TRANSACTION_setUsbMassStorageEnabled, data, &reply) != NO_ERROR) { - LOGD("setUsbMassStorageEnabled could not contact remote\n"); + ALOGD("setUsbMassStorageEnabled could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("setUsbMassStorageEnabled caught exception %d\n", err); + ALOGD("setUsbMassStorageEnabled caught exception %d\n", err); return; } } @@ -129,12 +129,12 @@ public: Parcel data, reply; data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); if (remote()->transact(TRANSACTION_isUsbMassStorageEnabled, data, &reply) != NO_ERROR) { - LOGD("isUsbMassStorageEnabled could not contact remote\n"); + ALOGD("isUsbMassStorageEnabled could not contact remote\n"); return false; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("isUsbMassStorageEnabled caught exception %d\n", err); + ALOGD("isUsbMassStorageEnabled caught exception %d\n", err); return false; } return reply.readInt32() != 0; @@ -146,12 +146,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); if (remote()->transact(TRANSACTION_mountVolume, data, &reply) != NO_ERROR) { - LOGD("mountVolume could not contact remote\n"); + ALOGD("mountVolume could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("mountVolume caught exception %d\n", err); + ALOGD("mountVolume caught exception %d\n", err); return err; } return reply.readInt32(); @@ -165,12 +165,12 @@ public: data.writeInt32(force ? 1 : 0); data.writeInt32(removeEncryption ? 1 : 0); if (remote()->transact(TRANSACTION_unmountVolume, data, &reply) != NO_ERROR) { - LOGD("unmountVolume could not contact remote\n"); + ALOGD("unmountVolume could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("unmountVolume caught exception %d\n", err); + ALOGD("unmountVolume caught exception %d\n", err); return err; } return reply.readInt32(); @@ -182,12 +182,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); if (remote()->transact(TRANSACTION_formatVolume, data, &reply) != NO_ERROR) { - LOGD("formatVolume could not contact remote\n"); + ALOGD("formatVolume could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("formatVolume caught exception %d\n", err); + ALOGD("formatVolume caught exception %d\n", err); return err; } return reply.readInt32(); @@ -199,12 +199,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); if (remote()->transact(TRANSACTION_getStorageUsers, data, &reply) != NO_ERROR) { - LOGD("getStorageUsers could not contact remote\n"); + ALOGD("getStorageUsers could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("getStorageUsers caught exception %d\n", err); + ALOGD("getStorageUsers caught exception %d\n", err); return err; } const int32_t numUsers = reply.readInt32(); @@ -221,12 +221,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); if (remote()->transact(TRANSACTION_getVolumeState, data, &reply) != NO_ERROR) { - LOGD("getVolumeState could not contact remote\n"); + ALOGD("getVolumeState could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("getVolumeState caught exception %d\n", err); + ALOGD("getVolumeState caught exception %d\n", err); return err; } return reply.readInt32(); @@ -243,12 +243,12 @@ public: data.writeString16(key); data.writeInt32(ownerUid); if (remote()->transact(TRANSACTION_createSecureContainer, data, &reply) != NO_ERROR) { - LOGD("createSecureContainer could not contact remote\n"); + ALOGD("createSecureContainer could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("createSecureContainer caught exception %d\n", err); + ALOGD("createSecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -260,12 +260,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(id); if (remote()->transact(TRANSACTION_finalizeSecureContainer, data, &reply) != NO_ERROR) { - LOGD("finalizeSecureContainer couldn't call remote\n"); + ALOGD("finalizeSecureContainer couldn't call remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("finalizeSecureContainer caught exception %d\n", err); + ALOGD("finalizeSecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -277,12 +277,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(id); if (remote()->transact(TRANSACTION_destroySecureContainer, data, &reply) != NO_ERROR) { - LOGD("destroySecureContainer couldn't call remote"); + ALOGD("destroySecureContainer couldn't call remote"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("destroySecureContainer caught exception %d\n", err); + ALOGD("destroySecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -296,12 +296,12 @@ public: data.writeString16(key); data.writeInt32(ownerUid); if (remote()->transact(TRANSACTION_mountSecureContainer, data, &reply) != NO_ERROR) { - LOGD("mountSecureContainer couldn't call remote"); + ALOGD("mountSecureContainer couldn't call remote"); return -1; } int32_t err = reply.readExceptionCode(); // What to do... if (err < 0) { - LOGD("mountSecureContainer caught exception %d\n", err); + ALOGD("mountSecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -314,12 +314,12 @@ public: data.writeString16(id); data.writeInt32(force ? 1 : 0); if (remote()->transact(TRANSACTION_getSecureContainerPath, data, &reply) != NO_ERROR) { - LOGD("unmountSecureContainer couldn't call remote"); + ALOGD("unmountSecureContainer couldn't call remote"); return -1; } int32_t err = reply.readExceptionCode(); // What to do... if (err < 0) { - LOGD("unmountSecureContainer caught exception %d\n", err); + ALOGD("unmountSecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -331,12 +331,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(id); if (remote()->transact(TRANSACTION_isSecureContainerMounted, data, &reply) != NO_ERROR) { - LOGD("isSecureContainerMounted couldn't call remote"); + ALOGD("isSecureContainerMounted couldn't call remote"); return false; } int32_t err = reply.readExceptionCode(); // What to do... if (err < 0) { - LOGD("isSecureContainerMounted caught exception %d\n", err); + ALOGD("isSecureContainerMounted caught exception %d\n", err); return false; } return reply.readInt32() != 0; @@ -349,12 +349,12 @@ public: data.writeString16(oldId); data.writeString16(newId); if (remote()->transact(TRANSACTION_renameSecureContainer, data, &reply) != NO_ERROR) { - LOGD("renameSecureContainer couldn't call remote"); + ALOGD("renameSecureContainer couldn't call remote"); return -1; } int32_t err = reply.readExceptionCode(); // What to do... if (err < 0) { - LOGD("renameSecureContainer caught exception %d\n", err); + ALOGD("renameSecureContainer caught exception %d\n", err); return err; } return reply.readInt32(); @@ -366,12 +366,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(id); if (remote()->transact(TRANSACTION_getSecureContainerPath, data, &reply) != NO_ERROR) { - LOGD("getSecureContainerPath couldn't call remote"); + ALOGD("getSecureContainerPath couldn't call remote"); return false; } int32_t err = reply.readExceptionCode(); // What to do... if (err < 0) { - LOGD("getSecureContainerPath caught exception %d\n", err); + ALOGD("getSecureContainerPath caught exception %d\n", err); return false; } path = reply.readString16(); @@ -384,12 +384,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(id); if (remote()->transact(TRANSACTION_getSecureContainerList, data, &reply) != NO_ERROR) { - LOGD("getSecureContainerList couldn't call remote"); + ALOGD("getSecureContainerList couldn't call remote"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("getSecureContainerList caught exception %d\n", err); + ALOGD("getSecureContainerList caught exception %d\n", err); return err; } const int32_t numStrings = reply.readInt32(); @@ -406,12 +406,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeStrongBinder(observer->asBinder()); if (remote()->transact(TRANSACTION_shutdown, data, &reply) != NO_ERROR) { - LOGD("shutdown could not contact remote\n"); + ALOGD("shutdown could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("shutdown caught exception %d\n", err); + ALOGD("shutdown caught exception %d\n", err); return; } reply.readExceptionCode(); @@ -422,12 +422,12 @@ public: Parcel data, reply; data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); if (remote()->transact(TRANSACTION_finishMediaUpdate, data, &reply) != NO_ERROR) { - LOGD("finishMediaUpdate could not contact remote\n"); + ALOGD("finishMediaUpdate could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("finishMediaUpdate caught exception %d\n", err); + ALOGD("finishMediaUpdate caught exception %d\n", err); return; } reply.readExceptionCode(); @@ -443,12 +443,12 @@ public: data.writeStrongBinder(token->asBinder()); data.writeInt32(nonce); if (remote()->transact(TRANSACTION_mountObb, data, &reply) != NO_ERROR) { - LOGD("mountObb could not contact remote\n"); + ALOGD("mountObb could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("mountObb caught exception %d\n", err); + ALOGD("mountObb caught exception %d\n", err); return; } } @@ -463,12 +463,12 @@ public: data.writeStrongBinder(token->asBinder()); data.writeInt32(nonce); if (remote()->transact(TRANSACTION_unmountObb, data, &reply) != NO_ERROR) { - LOGD("unmountObb could not contact remote\n"); + ALOGD("unmountObb could not contact remote\n"); return; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("unmountObb caught exception %d\n", err); + ALOGD("unmountObb caught exception %d\n", err); return; } } @@ -479,12 +479,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(filename); if (remote()->transact(TRANSACTION_isObbMounted, data, &reply) != NO_ERROR) { - LOGD("isObbMounted could not contact remote\n"); + ALOGD("isObbMounted could not contact remote\n"); return false; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("isObbMounted caught exception %d\n", err); + ALOGD("isObbMounted caught exception %d\n", err); return false; } return reply.readInt32() != 0; @@ -496,12 +496,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(filename); if (remote()->transact(TRANSACTION_getMountedObbPath, data, &reply) != NO_ERROR) { - LOGD("getMountedObbPath could not contact remote\n"); + ALOGD("getMountedObbPath could not contact remote\n"); return false; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("getMountedObbPath caught exception %d\n", err); + ALOGD("getMountedObbPath caught exception %d\n", err); return false; } path = reply.readString16(); @@ -514,12 +514,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(password); if (remote()->transact(TRANSACTION_decryptStorage, data, &reply) != NO_ERROR) { - LOGD("decryptStorage could not contact remote\n"); + ALOGD("decryptStorage could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("decryptStorage caught exception %d\n", err); + ALOGD("decryptStorage caught exception %d\n", err); return err; } return reply.readInt32(); @@ -531,12 +531,12 @@ public: data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(password); if (remote()->transact(TRANSACTION_encryptStorage, data, &reply) != NO_ERROR) { - LOGD("encryptStorage could not contact remote\n"); + ALOGD("encryptStorage could not contact remote\n"); return -1; } int32_t err = reply.readExceptionCode(); if (err < 0) { - LOGD("encryptStorage caught exception %d\n", err); + ALOGD("encryptStorage caught exception %d\n", err); return err; } return reply.readInt32(); diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index e75415b..b2b70c1 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -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, diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index 3de75ba..267a9f7 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(); @@ -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..00716d7 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 @@ -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,7 +213,7 @@ InputPublisher::~InputPublisher() { status_t InputPublisher::initialize() { #if DEBUG_TRANSPORT_ACTIONS - LOGD("channel '%s' publisher ~ initialize", + ALOGD("channel '%s' publisher ~ initialize", mChannel->getName().string()); #endif @@ -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 @@ -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, " @@ -439,7 +439,7 @@ 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 @@ -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,7 +473,7 @@ 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; @@ -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 @@ -552,7 +552,7 @@ InputConsumer::~InputConsumer() { status_t InputConsumer::initialize() { #if DEBUG_TRANSPORT_ACTIONS - LOGD("channel '%s' consumer ~ initialize", + ALOGD("channel '%s' consumer ~ initialize", mChannel->getName().string()); #endif @@ -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 @@ -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 diff --git a/libs/ui/KeyCharacterMap.cpp b/libs/ui/KeyCharacterMap.cpp index 77f18de..e1d5e8b 100644 --- a/libs/ui/KeyCharacterMap.cpp +++ b/libs/ui/KeyCharacterMap.cpp @@ -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, ¤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 @@ 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 @@ -541,7 +541,7 @@ status_t KeyCharacterMap::Parser::parseType() { } #if DEBUG_PARSER - LOGD("Parsed type: type=%d.", type); + ALOGD("Parsed type: type=%d.", type); #endif mMap->mType = type; return NO_ERROR; @@ -570,7 +570,7 @@ status_t KeyCharacterMap::Parser::parseKey() { } #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()); @@ -694,7 +694,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { } 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: @@ -705,7 +705,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { } 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: { @@ -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; diff --git a/libs/ui/KeyLayoutMap.cpp b/libs/ui/KeyLayoutMap.cpp index 8626a03..7ba654a 100644 --- a/libs/ui/KeyLayoutMap.cpp +++ b/libs/ui/KeyLayoutMap.cpp @@ -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 @@ -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; @@ -328,7 +328,7 @@ status_t KeyLayoutMap::Parser::parseAxis() { } #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/Region.cpp b/libs/ui/Region.cpp index 5656088..d9ad863 100644 --- a/libs/ui/Region.cpp +++ b/libs/ui/Region.cpp @@ -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) { @@ -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, @@ -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..90c092d 100644 --- a/libs/ui/VirtualKeyMap.cpp +++ b/libs/ui/VirtualKeyMap.cpp @@ -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 @@ -122,7 +122,7 @@ status_t VirtualKeyMap::Parser::parse() { } #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 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"); diff --git a/libs/utils/Asset.cpp b/libs/utils/Asset.cpp index 7fd2c87..7c34c6a 100644 --- a/libs/utils/Asset.cpp +++ b/libs/utils/Asset.cpp @@ -210,7 +210,7 @@ Asset::~Asset(void) offset = ftell(fp); fclose(fp); if (!scanResult) { - LOGD("File '%s' is not in gzip format\n", fileName); + ALOGD("File '%s' is not in gzip format\n", fileName); ::close(fd); return NULL; } @@ -384,12 +384,12 @@ status_t _FileAsset::openChunk(const char* fileName, int fd, off64_t offset, siz fileLength = lseek64(fd, 0, SEEK_END); if (fileLength == (off64_t) -1) { // probably a bad file descriptor - LOGD("failed lseek (errno=%d)\n", errno); + ALOGD("failed lseek (errno=%d)\n", errno); return UNKNOWN_ERROR; } if ((off64_t) (offset + length) > fileLength) { - LOGD("start (%ld) + len (%ld) > end (%ld)\n", + ALOGD("start (%ld) + len (%ld) > end (%ld)\n", (long) offset, (long) length, (long) fileLength); return BAD_INDEX; } diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp index 203e6fa..e7c4d47 100644 --- a/libs/utils/AssetManager.cpp +++ b/libs/utils/AssetManager.cpp @@ -283,7 +283,7 @@ bool AssetManager::getZipEntryCrcLocked(const String8& zipPath, const char* entr 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 }; @@ -923,7 +923,7 @@ Asset* AssetManager::openInLocaleVendorLocked(const char* fileName, AccessMode m */ 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; } } @@ -1333,7 +1333,7 @@ bool AssetManager::scanAndMergeDirLocked(SortedVector<AssetDir::FileInfo>* pMerg //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 @@ -1652,7 +1652,7 @@ void AssetManager::loadFileNameCacheLocked(void) #ifdef DO_TIMINGS timer.stop(); - LOGD("Cache scan took %.3fms\n", + ALOGD("Cache scan took %.3fms\n", timer.durationUsecs() / 1000.0); #endif @@ -1784,7 +1784,7 @@ AssetManager::SharedZip::SharedZip(const String8& path, time_t modWhen) mZipFile = new ZipFileRO; 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; } diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp index 87912639..5afe2dc 100644 --- a/libs/utils/BackupData.cpp +++ b/libs/utils/BackupData.cpp @@ -112,8 +112,8 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize) 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; @@ -151,11 +151,11 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize) 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 @@ BackupDataWriter::WriteEntityData(const void* data, size_t size) 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 @@ BackupDataReader::Status() 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 @@ BackupDataReader::Status() 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 @@ BackupDataReader::ReadNextHeader(bool* done, int* type) { 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 @@ BackupDataReader::ReadNextHeader(bool* done, int* type) 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 @@ BackupDataReader::ReadEntityData(void* data, size_t size) 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 @@ BackupDataReader::ReadEntityData(void* data, size_t size) 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..aee7ff0 100644 --- a/libs/utils/BackupHelpers.cpp +++ b/libs/utils/BackupHelpers.cpp @@ -74,7 +74,7 @@ const static int CURRENT_METADATA_VERSION = 1; #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 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 @@ void CallStack::dump(const char* prefix) const * 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 294f7b6..b2a61f1 100644 --- a/libs/utils/FileMap.cpp +++ b/libs/utils/FileMap.cpp @@ -64,12 +64,12 @@ FileMap::~FileMap(void) } #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) { diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp index b54fb9d..1bc92cf 100644 --- a/libs/utils/Looper.cpp +++ b/libs/utils/Looper.cpp @@ -185,7 +185,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa 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 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa 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::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa 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 @@ int Looper::pollInner(int timeoutMillis) { 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 } @@ -270,7 +270,7 @@ int Looper::pollInner(int timeoutMillis) { // 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 @@ int Looper::pollInner(int timeoutMillis) { // 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 @@ -353,7 +353,7 @@ Done: - 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 @@ Done: 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 @@ Done: 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 @@ int Looper::pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat void Looper::wake() { #if DEBUG_POLL_AND_WAKE - LOGD("%p ~ wake", this); + ALOGD("%p ~ wake", this); #endif #ifdef LOOPER_STATISTICS @@ -475,12 +475,12 @@ void Looper::wake() { 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 @@ void Looper::awoken() { 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,7 +514,7 @@ void Looper::pushResponse(int events, const Request& request) { 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 @@ -598,7 +598,7 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, 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 @@ -675,7 +675,7 @@ void Looper::sendMessageDelayed(nsecs_t uptimeDelay, const sp<MessageHandler>& h 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::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler 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) { 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/PropertyMap.cpp b/libs/utils/PropertyMap.cpp index d472d45..99603ab 100644 --- a/libs/utils/PropertyMap.cpp +++ b/libs/utils/PropertyMap.cpp @@ -135,7 +135,7 @@ status_t PropertyMap::load(const String8& filename, PropertyMap** outMap) { 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 @@ PropertyMap::Parser::~Parser() { 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 diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp index 959b382..0b7dd92 100644 --- a/libs/utils/RefBase.cpp +++ b/libs/utils/RefBase.cpp @@ -103,7 +103,7 @@ public: 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 @@ -121,7 +121,7 @@ public: 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 @@ -137,13 +137,13 @@ public: } 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 @@ public: } 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,7 +203,7 @@ public: 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, name, strerror(errno)); @@ -270,7 +270,7 @@ private: 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; } @@ -334,7 +334,7 @@ void RefBase::incStrong(const void* id) const const int32_t c = android_atomic_inc(&refs->mStrong); LOG_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,7 +350,7 @@ void RefBase::decStrong(const void* id) const 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); if (c == 1) { @@ -372,7 +372,7 @@ void RefBase::forceIncStrong(const void* id) const LOG_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) { @@ -487,7 +487,7 @@ bool RefBase::weakref_type::attemptIncStrong(const void* id) 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) { diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 6a9e91d2..559afd8 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -4368,7 +4368,7 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui } #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/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 @@ StopWatch::~StopWatch() { 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/SystemClock.cpp b/libs/utils/SystemClock.cpp index 062e6d7..89a052f 100644 --- a/libs/utils/SystemClock.cpp +++ b/libs/utils/SystemClock.cpp @@ -64,7 +64,7 @@ int setCurrentTimeMillis(int64_t millis) 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); diff --git a/libs/utils/Tokenizer.cpp b/libs/utils/Tokenizer.cpp index b3445b7..68752b4 100644 --- a/libs/utils/Tokenizer.cpp +++ b/libs/utils/Tokenizer.cpp @@ -118,7 +118,7 @@ String8 Tokenizer::peekRemainderOfLine() const { 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 @@ String8 Tokenizer::nextToken(const char* delimiters) { void Tokenizer::nextLine() { #if DEBUG_TOKENIZER - LOGD("nextLine"); + ALOGD("nextLine"); #endif const char* end = getEnd(); while (mCurrent != end) { @@ -148,7 +148,7 @@ void Tokenizer::nextLine() { 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/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp index d880f55..3069352 100644 --- a/libs/utils/ZipFileRO.cpp +++ b/libs/utils/ZipFileRO.cpp @@ -269,7 +269,7 @@ bool ZipFileRO::mapCentralDirectory(void) } } 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; } diff --git a/libs/utils/ZipUtils.cpp b/libs/utils/ZipUtils.cpp index 76725b4..cc5c68a 100644 --- a/libs/utils/ZipUtils.cpp +++ b/libs/utils/ZipUtils.cpp @@ -100,7 +100,7 @@ using namespace android; 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 @@ using namespace android; /* 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; } @@ -212,7 +212,7 @@ bail: 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 @@ bail: /* 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; } diff --git a/media/jni/android_mtp_MtpDevice.cpp b/media/jni/android_mtp_MtpDevice.cpp index 6b73f6c..c71410b 100644 --- a/media/jni/android_mtp_MtpDevice.cpp +++ b/media/jni/android_mtp_MtpDevice.cpp @@ -132,12 +132,12 @@ android_mtp_MtpDevice_get_device_info(JNIEnv *env, jobject thiz) { MtpDevice* device = get_device_from_object(env, thiz); if (!device) { - LOGD("android_mtp_MtpDevice_get_device_info device is null"); + ALOGD("android_mtp_MtpDevice_get_device_info device is null"); return NULL; } MtpDeviceInfo* deviceInfo = device->getDeviceInfo(); if (!deviceInfo) { - LOGD("android_mtp_MtpDevice_get_device_info deviceInfo is null"); + ALOGD("android_mtp_MtpDevice_get_device_info deviceInfo is null"); return NULL; } jobject info = env->NewObject(clazz_deviceInfo, constructor_deviceInfo); @@ -429,7 +429,7 @@ int register_android_mtp_MtpDevice(JNIEnv *env) { jclass clazz; - LOGD("register_android_mtp_MtpDevice\n"); + ALOGD("register_android_mtp_MtpDevice\n"); clazz = env->FindClass("android/mtp/MtpDeviceInfo"); if (clazz == NULL) { diff --git a/media/libdrm/mobile1/src/parser/parser_dm.c b/media/libdrm/mobile1/src/parser/parser_dm.c index 567e650..f5b7aaf 100644 --- a/media/libdrm/mobile1/src/parser/parser_dm.c +++ b/media/libdrm/mobile1/src/parser/parser_dm.c @@ -138,7 +138,7 @@ int32_t drm_parseDM(const uint8_t *buffer, int32_t bufferLen, T_DRM_DM_Info *pDm /* error: more than one content id */ if(drm_strnstr(pStart, (uint8_t*)HEADERS_CONTENT_ID, pBufferEnd - pStart)){ - LOGD("drm_dmParser: error: more than one content id\r\n"); + ALOGD("drm_dmParser: error: more than one content id\r\n"); return FALSE; } diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index b9a5bc5..61d0dad 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -190,7 +190,7 @@ static const float dBConvertInverse = 1.0f / dBConvert; float AudioSystem::linearToLog(int volume) { // float v = volume ? exp(float(100 - volume) * dBConvert) : 0; - // LOGD("linearToLog(%d)=%f", volume, v); + // ALOGD("linearToLog(%d)=%f", volume, v); // return v; return volume ? exp(float(100 - volume) * dBConvert) : 0; } @@ -198,7 +198,7 @@ float AudioSystem::linearToLog(int volume) int AudioSystem::logToLinear(float volume) { // int v = volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0; - // LOGD("logTolinear(%d)=%f", v, volume); + // ALOGD("logTolinear(%d)=%f", v, volume); // return v; return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0; } diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp index b304f8c..cda185f 100644 --- a/media/libmedia/MediaScanner.cpp +++ b/media/libmedia/MediaScanner.cpp @@ -135,7 +135,7 @@ MediaScanResult MediaScanner::doProcessDirectory( struct dirent* entry; if (shouldSkipDirectory(path)) { - LOGD("Skipping: %s", path); + ALOGD("Skipping: %s", path); return MEDIA_SCAN_RESULT_OK; } @@ -199,7 +199,7 @@ MediaScanResult MediaScanner::doProcessDirectoryEntry( type = DT_DIR; } } else { - LOGD("stat() failed for %s: %s", path, strerror(errno) ); + ALOGD("stat() failed for %s: %s", path, strerror(errno) ); } } if (type == DT_DIR) { diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 5853144..695c4a8 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -201,7 +201,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) status_t MediaPlayer::setMetadataFilter(const Parcel& filter) { - LOGD("setMetadataFilter"); + ALOGD("setMetadataFilter"); Mutex::Autolock lock(mLock); if (mPlayer == NULL) { return NO_INIT; @@ -211,7 +211,7 @@ status_t MediaPlayer::setMetadataFilter(const Parcel& filter) status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *metadata) { - LOGD("getMetadata"); + ALOGD("getMetadata"); Mutex::Autolock lock(mLock); if (mPlayer == NULL) { return NO_INIT; diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 588bd6a..bf0a626 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -489,7 +489,7 @@ MediaPlayerService::Client::Client( mUID = uid; #if CALLBACK_ANTAGONIZER - LOGD("create Antagonizer"); + ALOGD("create Antagonizer"); mAntagonizer = new Antagonizer(notify, this); #endif } @@ -523,7 +523,7 @@ void MediaPlayerService::Client::disconnect() if (p != 0) { p->setNotifyCallback(0, 0); #if CALLBACK_ANTAGONIZER - LOGD("kill Antagonizer"); + ALOGD("kill Antagonizer"); mAntagonizer->kill(); #endif p->reset(); @@ -925,7 +925,7 @@ status_t MediaPlayerService::Client::prepareAsync() if (p == 0) return UNKNOWN_ERROR; status_t ret = p->prepareAsync(); #if CALLBACK_ANTAGONIZER - LOGD("start Antagonizer"); + ALOGD("start Antagonizer"); if (ret == NO_ERROR) mAntagonizer->start(); #endif return ret; @@ -1131,7 +1131,7 @@ void Antagonizer::kill() int Antagonizer::callbackThread(void* user) { - LOGD("Antagonizer started"); + ALOGD("Antagonizer started"); Antagonizer* p = reinterpret_cast<Antagonizer*>(user); while (!p->mExit) { if (p->mActive) { @@ -1142,7 +1142,7 @@ int Antagonizer::callbackThread(void* user) } Mutex::Autolock _l(p->mLock); p->mCondition.signal(); - LOGD("Antagonizer stopped"); + ALOGD("Antagonizer stopped"); return 0; } #endif @@ -1160,7 +1160,7 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i // If the application wants to decode those, it should open a // filedescriptor for them and use that. if (url != NULL && strncmp(url, "http://", 7) != 0) { - LOGD("Can't decode %s by path, use filedescriptor instead", url); + ALOGD("Can't decode %s by path, use filedescriptor instead", url); return mem; } @@ -1347,7 +1347,7 @@ status_t MediaPlayerService::AudioOutput::open( // Check argument "bufferCount" against the mininum buffer count if (bufferCount < mMinBufferCount) { - LOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount); + ALOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount); bufferCount = mMinBufferCount; } diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 964cb1f..6fb16f5 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -2256,7 +2256,7 @@ status_t AwesomePlayer::setParameter(int key, const Parcel &request) { status_t AwesomePlayer::setCacheStatCollectFreq(const Parcel &request) { if (mCachedSource != NULL) { int32_t freqMs = request.readInt32(); - LOGD("Request to keep cache stats in the past %d ms", + ALOGD("Request to keep cache stats in the past %d ms", freqMs); return mCachedSource->setCacheStatCollectFreq(freqMs); } diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 927e122..080faa6 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -254,7 +254,7 @@ static void getSupportedVideoSizes( *isSetVideoSizeSupported = true; params.getSupportedVideoSizes(sizes); if (sizes.size() == 0) { - LOGD("Camera does not support setVideoSize()"); + ALOGD("Camera does not support setVideoSize()"); params.getSupportedPreviewSizes(sizes); *isSetVideoSizeSupported = false; } @@ -633,7 +633,7 @@ void CameraSource::releaseCamera() { } status_t CameraSource::stop() { - LOGD("stop: E"); + ALOGD("stop: E"); Mutex::Autolock autoLock(mLock); mStarted = false; mFrameAvailableCondition.signal(); @@ -670,7 +670,7 @@ status_t CameraSource::stop() { } CHECK_EQ(mNumFramesReceived, mNumFramesEncoded + mNumFramesDropped); - LOGD("stop: X"); + ALOGD("stop: X"); return OK; } diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 4f6c8d1..22c3182 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -69,7 +69,7 @@ CameraSourceTimeLapse::CameraSourceTimeLapse( mSkipCurrentFrame(false) { mTimeBetweenFrameCaptureUs = timeBetweenFrameCaptureUs; - LOGD("starting time lapse mode: %lld us", + ALOGD("starting time lapse mode: %lld us", mTimeBetweenFrameCaptureUs); mVideoWidth = videoSize.width; diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index dfee281..a368e0a 100755 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -539,7 +539,7 @@ status_t MPEG4Writer::pause() { } void MPEG4Writer::stopWriterThread() { - LOGD("Stopping writer thread"); + ALOGD("Stopping writer thread"); if (!mWriterThreadStarted) { return; } @@ -554,7 +554,7 @@ void MPEG4Writer::stopWriterThread() { void *dummy; pthread_join(mThread, &dummy); mWriterThreadStarted = false; - LOGD("Writer thread stopped"); + ALOGD("Writer thread stopped"); } /* @@ -650,7 +650,7 @@ status_t MPEG4Writer::stop() { } if (mTracks.size() > 1) { - LOGD("Duration from tracks range is [%lld, %lld] us", + ALOGD("Duration from tracks range is [%lld, %lld] us", minDurationUs, maxDurationUs); } @@ -1338,7 +1338,7 @@ void MPEG4Writer::writeAllChunks() { sendSessionSummary(); mChunkInfos.clear(); - LOGD("%d chunks are written in the last batch", outstandingChunks); + ALOGD("%d chunks are written in the last batch", outstandingChunks); } bool MPEG4Writer::findChunkToWrite(Chunk *chunk) { @@ -1523,7 +1523,7 @@ status_t MPEG4Writer::Track::pause() { } status_t MPEG4Writer::Track::stop() { - LOGD("Stopping %s track", mIsAudio? "Audio": "Video"); + ALOGD("Stopping %s track", mIsAudio? "Audio": "Video"); if (!mStarted) { LOGE("Stop() called but track is not started"); return ERROR_END_OF_STREAM; @@ -1539,7 +1539,7 @@ status_t MPEG4Writer::Track::stop() { status_t err = (status_t) dummy; - LOGD("Stopping %s track source", mIsAudio? "Audio": "Video"); + ALOGD("Stopping %s track source", mIsAudio? "Audio": "Video"); { status_t status = mSource->stop(); if (err == OK && status != OK && status != ERROR_END_OF_STREAM) { @@ -1547,7 +1547,7 @@ status_t MPEG4Writer::Track::stop() { } } - LOGD("%s track stopped", mIsAudio? "Audio": "Video"); + ALOGD("%s track stopped", mIsAudio? "Audio": "Video"); return err; } diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index 8a8d493..b370225 100644 --- a/media/mtp/MtpDevice.cpp +++ b/media/mtp/MtpDevice.cpp @@ -72,7 +72,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { { char* manufacturerName = usb_device_get_manufacturer_name(device); char* productName = usb_device_get_product_name(device); - LOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName); + ALOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName); free(manufacturerName); free(productName); } else if (interface->bInterfaceClass == 0xFF && @@ -90,7 +90,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) { // Looks like an android style MTP device char* manufacturerName = usb_device_get_manufacturer_name(device); char* productName = usb_device_get_product_name(device); - LOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName); + ALOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName); free(manufacturerName); free(productName); } @@ -666,7 +666,7 @@ fail: // reads the object's data and writes it to the specified file path bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int group, int perm) { - LOGD("readObject: %s", destPath); + ALOGD("readObject: %s", destPath); int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC); if (fd < 0) { LOGE("open failed for %s", destPath); @@ -790,7 +790,7 @@ bool MtpDevice::readData() { ALOGV("readData returned %d\n", ret); if (ret >= MTP_CONTAINER_HEADER_SIZE) { if (mData.getContainerType() == MTP_CONTAINER_TYPE_RESPONSE) { - LOGD("got response packet instead of data packet"); + ALOGD("got response packet instead of data packet"); // we got a response packet rather than data // copy it to mResponse mResponse.copyFrom(mData); @@ -827,7 +827,7 @@ MtpResponseCode MtpDevice::readResponse() { mResponse.dump(); return mResponse.getResponseCode(); } else { - LOGD("readResponse failed\n"); + ALOGD("readResponse failed\n"); return -1; } } diff --git a/media/mtp/MtpObjectInfo.cpp b/media/mtp/MtpObjectInfo.cpp index ea68c3b..cd15343 100644 --- a/media/mtp/MtpObjectInfo.cpp +++ b/media/mtp/MtpObjectInfo.cpp @@ -91,17 +91,17 @@ void MtpObjectInfo::read(MtpDataPacket& packet) { } void MtpObjectInfo::print() { - LOGD("MtpObject Info %08X: %s\n", mHandle, mName); - LOGD(" mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n", + ALOGD("MtpObject Info %08X: %s\n", mHandle, mName); + ALOGD(" mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n", mStorageID, mFormat, mProtectionStatus); - LOGD(" mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n", + ALOGD(" mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n", mCompressedSize, mFormat, mThumbCompressedSize); - LOGD(" mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight); - LOGD(" mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n", + ALOGD(" mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight); + ALOGD(" mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n", mImagePixWidth, mImagePixHeight, mImagePixDepth); - LOGD(" mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n", + ALOGD(" mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n", mParent, mAssociationType, mAssociationDesc); - LOGD(" mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n", + ALOGD(" mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n", mSequenceNumber, mDateCreated, mDateModified, mKeywords); } diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 1334e6c..838c13e 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -878,7 +878,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() { return MTP_RESPONSE_OBJECT_TOO_LARGE; } -LOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID); + ALOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID); MtpObjectHandle handle = mDatabase->beginSendObject((const char*)path, format, parent, storageID, mSendObjectFileSize, modifiedTime); if (handle == kInvalidObjectHandle) { @@ -1104,7 +1104,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { // can't start writing past the end of the file if (offset > edit->mSize) { - LOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize); + ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize); return MTP_RESPONSE_GENERAL_ERROR; } diff --git a/media/mtp/MtpStorageInfo.cpp b/media/mtp/MtpStorageInfo.cpp index ca64ac0..dcd37cd 100644 --- a/media/mtp/MtpStorageInfo.cpp +++ b/media/mtp/MtpStorageInfo.cpp @@ -61,11 +61,11 @@ void MtpStorageInfo::read(MtpDataPacket& packet) { } void MtpStorageInfo::print() { - LOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n", + ALOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n", mStorageID, mStorageType, mFileSystemType, mAccessCapability); - LOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n", + ALOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n", mMaxCapacity, mFreeSpaceBytes, mFreeSpaceObjects); - LOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n", + ALOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n", mStorageDescription, mVolumeIdentifier); } diff --git a/media/tests/players/invoke_mock_media_player.cpp b/media/tests/players/invoke_mock_media_player.cpp index db1b011..1289dfa 100644 --- a/media/tests/players/invoke_mock_media_player.cpp +++ b/media/tests/players/invoke_mock_media_player.cpp @@ -118,13 +118,13 @@ void Player::ping(const Parcel& request, Parcel *reply) extern "C" android::MediaPlayerBase* newPlayer() { - LOGD("New invoke test player"); + ALOGD("New invoke test player"); return new Player(); } extern "C" android::status_t deletePlayer(android::MediaPlayerBase *player) { - LOGD("Delete invoke test player"); + ALOGD("Delete invoke test player"); delete player; return OK; } 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 @@ void Tokenizer::dump() const { 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..9ceb5e9 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -263,7 +263,7 @@ private: 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); } 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 mvui_transform_t::picker() 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::multiply(matrixf_t& r, const matrixf_t& lhs, const matrixf_t& rh } 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/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index 325193c..a23955f 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -131,7 +131,7 @@ Loader::Loader() /* 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 @@ Loader::Loader() 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 @@ void Loader::init_api(void* dso, 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 @@ void Loader::init_api(void* dso, 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; @@ -282,7 +282,7 @@ void *Loader::load_driver(const char* kind, const char *tag, return 0; } - LOGD("loaded %s", driver_absolute_path); + ALOGD("loaded %s", driver_absolute_path); if (mask & EGL) { getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress"); diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 6ad06af..e30e84a 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -270,7 +270,7 @@ static EGLBoolean egl_init_drivers_locked() { 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"); } } diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp index 31119f9..ad5bdfc 100644 --- a/opengl/libs/EGL/egl_display.cpp +++ b/opengl/libs/EGL/egl_display.cpp @@ -184,7 +184,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) { 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 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 @@ public: 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 @@ static void TraceValue(int elementCount, char type, 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 @@ static void TraceValue(int elementCount, char type, 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 @@ static void TraceGL(const char* name, int numArgs, ...) { } } 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 @@ using namespace android; _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 @@ static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg, 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..e525d02 100644 --- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp +++ b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp @@ -242,7 +242,7 @@ unsigned int DbgContext::GetBufferSize() 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 @@ void DbgContext::glUseProgram(GLuint program) } 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 @@ using namespace com::android; #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 @@ int timeMode = SYSTEM_TIME_THREAD; 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 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile, { 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 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile, 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 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile, 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 @@ void Receive(glesv2debugger::Message & cmd) 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 TryReceive(glesv2debugger::Message & cmd) 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 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd) 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 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd) 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 @@ void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd) { 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 @@ int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg, 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 @@ void Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count) 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/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index b48f23d..54a306f 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1949,7 +1949,7 @@ bool AudioFlinger::MixerThread::threadLoop() char value[PROPERTY_VALUE_MAX]; property_get("ro.audio.silent", value, "0"); if (atoi(value)) { - LOGD("Silence is golden"); + ALOGD("Silence is golden"); setMasterMute(true); } } @@ -2618,7 +2618,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() char value[PROPERTY_VALUE_MAX]; property_get("ro.audio.silent", value, "0"); if (atoi(value)) { - LOGD("Silence is golden"); + ALOGD("Silence is golden"); setMasterMute(true); } } @@ -3012,7 +3012,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop() char value[PROPERTY_VALUE_MAX]; property_get("ro.audio.silent", value, "0"); if (atoi(value)) { - LOGD("Silence is golden"); + ALOGD("Silence is golden"); setMasterMute(true); } } @@ -3193,7 +3193,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( { ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); - // LOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize); + // ALOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize); size_t size = sizeof(audio_track_cblk_t); uint8_t channelCount = popcount(channelMask); size_t bufferSize = frameCount*channelCount*sizeof(int16_t); diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 7c7fa56..56214db 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -606,7 +606,7 @@ void AudioMixer::volumeRampStereo(track_t* t, int32_t* out, size_t frameCount, i const int32_t vlInc = t->volumeInc[0]; const int32_t vrInc = t->volumeInc[1]; - //LOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", + //ALOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", // t, vlInc/65536.0f, vl/65536.0f, t->volume[0], // (vl + vlInc*frameCount)/65536.0f, frameCount); @@ -684,7 +684,7 @@ void AudioMixer::track__16BitsStereo(track_t* t, int32_t* out, size_t frameCount const int32_t vlInc = t->volumeInc[0]; const int32_t vrInc = t->volumeInc[1]; const int32_t vaInc = t->auxInc; - // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", + // ALOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", // t, vlInc/65536.0f, vl/65536.0f, t->volume[0], // (vl + vlInc*frameCount)/65536.0f, frameCount); @@ -728,7 +728,7 @@ void AudioMixer::track__16BitsStereo(track_t* t, int32_t* out, size_t frameCount const int32_t vlInc = t->volumeInc[0]; const int32_t vrInc = t->volumeInc[1]; - // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", + // ALOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", // t, vlInc/65536.0f, vl/65536.0f, t->volume[0], // (vl + vlInc*frameCount)/65536.0f, frameCount); @@ -773,7 +773,7 @@ void AudioMixer::track__16BitsMono(track_t* t, int32_t* out, size_t frameCount, const int32_t vrInc = t->volumeInc[1]; const int32_t vaInc = t->auxInc; - // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", + // ALOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", // t, vlInc/65536.0f, vl/65536.0f, t->volume[0], // (vl + vlInc*frameCount)/65536.0f, frameCount); @@ -814,7 +814,7 @@ void AudioMixer::track__16BitsMono(track_t* t, int32_t* out, size_t frameCount, const int32_t vlInc = t->volumeInc[0]; const int32_t vrInc = t->volumeInc[1]; - // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", + // ALOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d", // t, vlInc/65536.0f, vl/65536.0f, t->volume[0], // (vl + vlInc*frameCount)/65536.0f, frameCount); diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index d18a6fb..41770dc 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -87,7 +87,7 @@ AudioResampler* AudioResampler::create(int bitDepth, int inChannelCount, char value[PROPERTY_VALUE_MAX]; if (property_get("af.resampler.quality", value, 0)) { quality = atoi(value); - LOGD("forcing AudioResampler quality to %d", quality); + ALOGD("forcing AudioResampler quality to %d", quality); } if (quality == DEFAULT) diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp index 8558fdd..f922630 100644 --- a/services/camera/libcameraservice/CameraHardwareStub.cpp +++ b/services/camera/libcameraservice/CameraHardwareStub.cpp @@ -70,7 +70,7 @@ void CameraHardwareStub::initHeapLocked() int preview_width, preview_height; mParameters.getPreviewSize(&preview_width, &preview_height); - LOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height); + ALOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height); // Note that we enforce yuv420sp in setParameters(). int how_big = preview_width * preview_height * 3 / 2; diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index bb0e664..e2905fe 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -47,8 +47,8 @@ namespace android { // Use "adb shell dumpsys media.camera -v 1" to change it. static volatile int32_t gLogLevel = 0; -#define LOG1(...) LOGD_IF(gLogLevel >= 1, __VA_ARGS__); -#define LOG2(...) LOGD_IF(gLogLevel >= 2, __VA_ARGS__); +#define LOG1(...) ALOGD_IF(gLogLevel >= 1, __VA_ARGS__); +#define LOG2(...) ALOGD_IF(gLogLevel >= 2, __VA_ARGS__); static void setLogLevel(int level) { android_atomic_write(level, &gLogLevel); diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp index e390ae2..69f60ca 100644 --- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp +++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp @@ -46,7 +46,7 @@ using namespace android; do { \ printf(__VA_ARGS__); \ printf("\n"); \ - LOGD(__VA_ARGS__); \ + ALOGD(__VA_ARGS__); \ } while(0) void assert_fail(const char *file, int line, const char *func, const char *expr) { @@ -797,7 +797,7 @@ public: int w, h; const char *s = param.get(CameraParameters::KEY_SUPPORTED_PICTURE_SIZES); while (getNextSize(&s, &w, &h)) { - LOGD("checking picture size %dx%d", w, h); + ALOGD("checking picture size %dx%d", w, h); checkOnePicture(w, h); } } @@ -811,7 +811,7 @@ public: // Try all flag combinations. for (int v = 0; v < 8; v++) { - LOGD("TestPreviewCallbackFlag: flag=%d", v); + ALOGD("TestPreviewCallbackFlag: flag=%d", v); usleep(100000); // sleep a while to clear the in-flight callbacks. cc->clearStat(); c->setPreviewCallbackFlag(v); @@ -875,7 +875,7 @@ public: int w, h; const char *s = param.get(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES); while (getNextSize(&s, &w, &h)) { - LOGD("checking preview size %dx%d", w, h); + ALOGD("checking preview size %dx%d", w, h); checkOnePicture(w, h); } } diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index 838a03f..f179208 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -1097,7 +1097,7 @@ void EventHub::loadConfigurationLocked(Device* device) { device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier( device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); if (device->configurationFile.isEmpty()) { - LOGD("No input device configuration file found for device '%s'.", + ALOGD("No input device configuration file found for device '%s'.", device->identifier.name.string()); } else { status_t status = PropertyMap::load(device->configurationFile, diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 5630738..7320406 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -224,7 +224,7 @@ InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& polic #if DEBUG_THROTTLING mThrottleState.originalSampleCount = 0; - LOGD("Throttling - Max events per second = %d", mConfig.maxEventsPerSecond); + ALOGD("Throttling - Max events per second = %d", mConfig.maxEventsPerSecond); #endif } @@ -272,7 +272,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) { // If dispatching is frozen, do not process timeouts or try to deliver any new events. if (mDispatchFrozen) { #if DEBUG_FOCUS - LOGD("Dispatch frozen. Waiting some more."); + ALOGD("Dispatch frozen. Waiting some more."); #endif return; } @@ -342,7 +342,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) { if (currentTime < nextTime) { // Throttle it! #if DEBUG_THROTTLING - LOGD("Throttling - Delaying motion event for " + ALOGD("Throttling - Delaying motion event for " "device %d, source 0x%08x by up to %0.3fms.", deviceId, source, (nextTime - currentTime) * 0.000001); #endif @@ -360,7 +360,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) { #if DEBUG_THROTTLING if (mThrottleState.originalSampleCount != 0) { uint32_t count = motionEntry->countSamples(); - LOGD("Throttling - Motion event sample count grew by %d from %d to %d.", + ALOGD("Throttling - Motion event sample count grew by %d from %d to %d.", count - mThrottleState.originalSampleCount, mThrottleState.originalSampleCount, count); mThrottleState.originalSampleCount = 0; @@ -469,7 +469,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) { void InputDispatcher::dispatchIdleLocked() { #if DEBUG_FOCUS - LOGD("Dispatcher idle. There are no pending events or active connections."); + ALOGD("Dispatcher idle. There are no pending events or active connections."); #endif // Reset targets when idle, to release input channels and other resources @@ -493,7 +493,7 @@ bool InputDispatcher::enqueueInboundEventLocked(EventEntry* entry) { } else if (keyEntry->action == AKEY_EVENT_ACTION_UP) { if (mAppSwitchSawKeyDown) { #if DEBUG_APP_SWITCH - LOGD("App switch is pending!"); + ALOGD("App switch is pending!"); #endif mAppSwitchDueTime = keyEntry->eventTime + APP_SWITCH_TIMEOUT; mAppSwitchSawKeyDown = false; @@ -567,7 +567,7 @@ void InputDispatcher::dropInboundEventLocked(EventEntry* entry, DropReason dropR switch (dropReason) { case DROP_REASON_POLICY: #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("Dropped event because policy consumed it."); + ALOGD("Dropped event because policy consumed it."); #endif reason = "inbound event was dropped because the policy consumed it"; break; @@ -634,9 +634,9 @@ void InputDispatcher::resetPendingAppSwitchLocked(bool handled) { #if DEBUG_APP_SWITCH if (handled) { - LOGD("App switch has arrived."); + ALOGD("App switch has arrived."); } else { - LOGD("App switch was abandoned."); + ALOGD("App switch was abandoned."); } #endif } @@ -686,7 +686,7 @@ void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) { InjectionState* injectionState = entry->injectionState; if (injectionState && injectionState->injectionResult == INPUT_EVENT_INJECTION_PENDING) { #if DEBUG_DISPATCH_CYCLE - LOGD("Injected inbound event was dropped."); + ALOGD("Injected inbound event was dropped."); #endif setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED); } @@ -738,7 +738,7 @@ InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(nsecs_t cu bool InputDispatcher::dispatchConfigurationChangedLocked( nsecs_t currentTime, ConfigurationChangedEntry* entry) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("dispatchConfigurationChanged - eventTime=%lld", entry->eventTime); + ALOGD("dispatchConfigurationChanged - eventTime=%lld", entry->eventTime); #endif // Reset key repeating in case a keyboard device was added or removed or something. @@ -754,7 +754,7 @@ bool InputDispatcher::dispatchConfigurationChangedLocked( bool InputDispatcher::dispatchDeviceResetLocked( nsecs_t currentTime, DeviceResetEntry* entry) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("dispatchDeviceReset - eventTime=%lld, deviceId=%d", entry->eventTime, entry->deviceId); + ALOGD("dispatchDeviceReset - eventTime=%lld, deviceId=%d", entry->eventTime, entry->deviceId); #endif CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS, @@ -868,7 +868,7 @@ bool InputDispatcher::dispatchKeyLocked(nsecs_t currentTime, KeyEntry* entry, void InputDispatcher::logOutboundKeyDetailsLocked(const char* prefix, const KeyEntry* entry) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " + ALOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " "action=0x%x, flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, " "repeatCount=%d, downTime=%lld", prefix, @@ -952,7 +952,7 @@ bool InputDispatcher::dispatchMotionLocked( } #if DEBUG_BATCHING - LOGD("Split batch of %d samples into two parts, first part has %d samples, " + ALOGD("Split batch of %d samples into two parts, first part has %d samples, " "second part has %d samples.", originalSampleCount, entry->countSamples(), nextEntry->countSamples()); #endif @@ -974,7 +974,7 @@ bool InputDispatcher::dispatchMotionLocked( void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const MotionEntry* entry) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " + ALOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " "action=0x%x, flags=0x%x, " "metaState=0x%x, buttonState=0x%x, " "edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, downTime=%lld", @@ -992,7 +992,7 @@ void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const M sampleCount += 1; } for (uint32_t i = 0; i < entry->pointerCount; i++) { - LOGD(" Pointer %d: id=%d, toolType=%d, " + ALOGD(" Pointer %d: id=%d, toolType=%d, " "x=%f, y=%f, pressure=%f, size=%f, " "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, " "orientation=%f", @@ -1012,7 +1012,7 @@ void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const M // Keep in mind that due to batching, it is possible for the number of samples actually // dispatched to change before the application finally consumed them. if (entry->action == AMOTION_EVENT_ACTION_MOVE) { - LOGD(" ... Total movement samples currently batched %d ...", sampleCount); + ALOGD(" ... Total movement samples currently batched %d ...", sampleCount); } #endif } @@ -1020,7 +1020,7 @@ void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const M void InputDispatcher::dispatchEventToCurrentInputTargetsLocked(nsecs_t currentTime, EventEntry* eventEntry, bool resumeWithAppendedMotionSample) { #if DEBUG_DISPATCH_CYCLE - LOGD("dispatchEventToCurrentInputTargets - " + ALOGD("dispatchEventToCurrentInputTargets - " "resumeWithAppendedMotionSample=%s", toString(resumeWithAppendedMotionSample)); #endif @@ -1039,7 +1039,7 @@ void InputDispatcher::dispatchEventToCurrentInputTargetsLocked(nsecs_t currentTi resumeWithAppendedMotionSample); } else { #if DEBUG_FOCUS - LOGD("Dropping event delivery to target with channel '%s' because it " + ALOGD("Dropping event delivery to target with channel '%s' because it " "is no longer registered with the input dispatcher.", inputTarget.inputChannel->getName().string()); #endif @@ -1065,7 +1065,7 @@ int32_t InputDispatcher::handleTargetsNotReadyLocked(nsecs_t currentTime, if (applicationHandle == NULL && windowHandle == NULL) { if (mInputTargetWaitCause != INPUT_TARGET_WAIT_CAUSE_SYSTEM_NOT_READY) { #if DEBUG_FOCUS - LOGD("Waiting for system to become ready for input."); + ALOGD("Waiting for system to become ready for input."); #endif mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_SYSTEM_NOT_READY; mInputTargetWaitStartTime = currentTime; @@ -1076,7 +1076,7 @@ int32_t InputDispatcher::handleTargetsNotReadyLocked(nsecs_t currentTime, } else { if (mInputTargetWaitCause != INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY) { #if DEBUG_FOCUS - LOGD("Waiting for application to become ready for input: %s", + ALOGD("Waiting for application to become ready for input: %s", getApplicationWindowLabelLocked(applicationHandle, windowHandle).string()); #endif nsecs_t timeout; @@ -1162,7 +1162,7 @@ nsecs_t InputDispatcher::getTimeSpentWaitingForApplicationLocked( void InputDispatcher::resetANRTimeoutsLocked() { #if DEBUG_FOCUS - LOGD("Resetting ANR timeouts."); + ALOGD("Resetting ANR timeouts."); #endif // Reset input target wait timeout. @@ -1181,7 +1181,7 @@ int32_t InputDispatcher::findFocusedWindowTargetsLocked(nsecs_t currentTime, if (mFocusedWindowHandle == NULL) { if (mFocusedApplicationHandle != NULL) { #if DEBUG_FOCUS - LOGD("Waiting because there is no focused window but there is a " + ALOGD("Waiting because there is no focused window but there is a " "focused application that may eventually add a window: %s.", getApplicationWindowLabelLocked(mFocusedApplicationHandle, NULL).string()); #endif @@ -1204,7 +1204,7 @@ int32_t InputDispatcher::findFocusedWindowTargetsLocked(nsecs_t currentTime, // If the currently focused window is paused then keep waiting. if (mFocusedWindowHandle->getInfo()->paused) { #if DEBUG_FOCUS - LOGD("Waiting because focused window is paused."); + ALOGD("Waiting because focused window is paused."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, mFocusedApplicationHandle, mFocusedWindowHandle, nextWakeupTime); @@ -1214,7 +1214,7 @@ int32_t InputDispatcher::findFocusedWindowTargetsLocked(nsecs_t currentTime, // If the currently focused window is still working on previous events then keep waiting. if (! isWindowFinishedWithPreviousInputLocked(mFocusedWindowHandle)) { #if DEBUG_FOCUS - LOGD("Waiting because focused window still processing previous input."); + ALOGD("Waiting because focused window still processing previous input."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, mFocusedApplicationHandle, mFocusedWindowHandle, nextWakeupTime); @@ -1233,7 +1233,7 @@ Unresponsive: updateDispatchStatisticsLocked(currentTime, entry, injectionResult, timeSpentWaitingForApplication); #if DEBUG_FOCUS - LOGD("findFocusedWindow finished: injectionResult=%d, " + ALOGD("findFocusedWindow finished: injectionResult=%d, " "timeSpendWaitingForApplication=%0.1fms", injectionResult, timeSpentWaitingForApplication / 1000000.0); #endif @@ -1302,7 +1302,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, bool down = maskedAction == AMOTION_EVENT_ACTION_DOWN; if (switchedDevice && mTouchState.down && !down) { #if DEBUG_FOCUS - LOGD("Dropping event because a pointer for a different device is already down."); + ALOGD("Dropping event because a pointer for a different device is already down."); #endif mTempTouchState.copyFrom(mTouchState); injectionResult = INPUT_EVENT_INJECTION_FAILED; @@ -1376,7 +1376,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // fact be in ANR state. if (topErrorWindowHandle != NULL && newTouchedWindowHandle != topErrorWindowHandle) { #if DEBUG_FOCUS - LOGD("Waiting because system error window is pending."); + ALOGD("Waiting because system error window is pending."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, NULL, NULL, nextWakeupTime); @@ -1400,7 +1400,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, if (newTouchedWindowHandle == NULL) { if (mFocusedApplicationHandle != NULL) { #if DEBUG_FOCUS - LOGD("Waiting because there is no touched window but there is a " + ALOGD("Waiting because there is no touched window but there is a " "focused application that may eventually add a new window: %s.", getApplicationWindowLabelLocked(mFocusedApplicationHandle, NULL).string()); #endif @@ -1458,7 +1458,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // If the pointer is not currently down, then ignore the event. if (! mTempTouchState.down) { #if DEBUG_FOCUS - LOGD("Dropping event because the pointer is not down or we previously " + ALOGD("Dropping event because the pointer is not down or we previously " "dropped the pointer down event."); #endif injectionResult = INPUT_EVENT_INJECTION_FAILED; @@ -1479,7 +1479,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, if (oldTouchedWindowHandle != newTouchedWindowHandle && newTouchedWindowHandle != NULL) { #if DEBUG_FOCUS - LOGD("Touch is slipping out of window %s into window %s.", + ALOGD("Touch is slipping out of window %s into window %s.", oldTouchedWindowHandle->getName().string(), newTouchedWindowHandle->getName().string()); #endif @@ -1520,7 +1520,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // Let the previous window know that the hover sequence is over. if (mLastHoverWindowHandle != NULL) { #if DEBUG_HOVER - LOGD("Sending hover exit event to window %s.", + ALOGD("Sending hover exit event to window %s.", mLastHoverWindowHandle->getName().string()); #endif mTempTouchState.addOrUpdateWindow(mLastHoverWindowHandle, @@ -1530,7 +1530,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // Let the new window know that the hover sequence is starting. if (newHoverWindowHandle != NULL) { #if DEBUG_HOVER - LOGD("Sending hover enter event to window %s.", + ALOGD("Sending hover enter event to window %s.", newHoverWindowHandle->getName().string()); #endif mTempTouchState.addOrUpdateWindow(newHoverWindowHandle, @@ -1556,7 +1556,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, } if (! haveForegroundWindow) { #if DEBUG_FOCUS - LOGD("Dropping event because there is no touched foreground window to receive it."); + ALOGD("Dropping event because there is no touched foreground window to receive it."); #endif injectionResult = INPUT_EVENT_INJECTION_FAILED; goto Failed; @@ -1591,7 +1591,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // If the touched window is paused then keep waiting. if (touchedWindow.windowHandle->getInfo()->paused) { #if DEBUG_FOCUS - LOGD("Waiting because touched window is paused."); + ALOGD("Waiting because touched window is paused."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, NULL, touchedWindow.windowHandle, nextWakeupTime); @@ -1601,7 +1601,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // If the touched window is still working on previous events then keep waiting. if (! isWindowFinishedWithPreviousInputLocked(touchedWindow.windowHandle)) { #if DEBUG_FOCUS - LOGD("Waiting because touched window still processing previous input."); + ALOGD("Waiting because touched window still processing previous input."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, NULL, touchedWindow.windowHandle, nextWakeupTime); @@ -1661,7 +1661,7 @@ Failed: if (!wrongDevice) { if (switchedDevice) { #if DEBUG_FOCUS - LOGD("Conflicting pointer actions: Switched to a different device."); + ALOGD("Conflicting pointer actions: Switched to a different device."); #endif *outConflictingPointerActions = true; } @@ -1670,7 +1670,7 @@ Failed: // Started hovering, therefore no longer down. if (mTouchState.down) { #if DEBUG_FOCUS - LOGD("Conflicting pointer actions: Hover received while pointer was down."); + ALOGD("Conflicting pointer actions: Hover received while pointer was down."); #endif *outConflictingPointerActions = true; } @@ -1688,7 +1688,7 @@ Failed: // First pointer went down. if (mTouchState.down) { #if DEBUG_FOCUS - LOGD("Conflicting pointer actions: Down received while already down."); + ALOGD("Conflicting pointer actions: Down received while already down."); #endif *outConflictingPointerActions = true; } @@ -1724,7 +1724,7 @@ Failed: } } else { #if DEBUG_FOCUS - LOGD("Not updating touch focus because injection was denied."); + ALOGD("Not updating touch focus because injection was denied."); #endif } @@ -1736,7 +1736,7 @@ Unresponsive: updateDispatchStatisticsLocked(currentTime, entry, injectionResult, timeSpentWaitingForApplication); #if DEBUG_FOCUS - LOGD("findTouchedWindow finished: injectionResult=%d, injectionPermission=%d, " + ALOGD("findTouchedWindow finished: injectionResult=%d, injectionPermission=%d, " "timeSpentWaitingForApplication=%0.1fms", injectionResult, injectionPermission, timeSpentWaitingForApplication / 1000000.0); #endif @@ -1874,7 +1874,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget, bool resumeWithAppendedMotionSample) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ prepareDispatchCycle - flags=0x%08x, " + ALOGD("channel '%s' ~ prepareDispatchCycle - flags=0x%08x, " "xOffset=%f, yOffset=%f, scaleFactor=%f, " "pointerIds=0x%x, " "resumeWithAppendedMotionSample=%s", @@ -1892,7 +1892,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, // We don't want to enqueue additional outbound events if the connection is broken. if (connection->status != Connection::STATUS_NORMAL) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ Dropping event because the channel status is %s", + ALOGD("channel '%s' ~ Dropping event because the channel status is %s", connection->getInputChannelName(), connection->getStatusLabel()); #endif return; @@ -1910,7 +1910,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, return; // split event was dropped } #if DEBUG_FOCUS - LOGD("channel '%s' ~ Split motion event.", + ALOGD("channel '%s' ~ Split motion event.", connection->getInputChannelName()); logOutboundMotionDetailsLocked(" ", splitMotionEntry); #endif @@ -1933,7 +1933,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, // be dispatched later. if (! motionEventDispatchEntry->inProgress) { #if DEBUG_BATCHING - LOGD("channel '%s' ~ Not streaming because the motion event has " + ALOGD("channel '%s' ~ Not streaming because the motion event has " "not yet been dispatched. " "(Waiting for earlier events to be consumed.)", connection->getInputChannelName()); @@ -1948,7 +1948,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, // appended motion sample. if (motionEventDispatchEntry->tailMotionSample) { #if DEBUG_BATCHING - LOGD("channel '%s' ~ Not streaming because no new samples can " + ALOGD("channel '%s' ~ Not streaming because no new samples can " "be appended to the motion event in this dispatch cycle. " "(Waiting for next dispatch cycle to start.)", connection->getInputChannelName()); @@ -1960,7 +1960,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, if ((motionEventDispatchEntry->targetFlags & InputTarget::FLAG_DISPATCH_MASK) != InputTarget::FLAG_DISPATCH_AS_IS) { #if DEBUG_BATCHING - LOGD("channel '%s' ~ Not streaming because the motion event was not " + ALOGD("channel '%s' ~ Not streaming because the motion event was not " "being dispatched as-is. " "(Waiting for next dispatch cycle to start.)", connection->getInputChannelName()); @@ -1988,7 +1988,7 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, } if (status == OK) { #if DEBUG_BATCHING - LOGD("channel '%s' ~ Successfully streamed new motion sample.", + ALOGD("channel '%s' ~ Successfully streamed new motion sample.", connection->getInputChannelName()); #endif return; @@ -1996,17 +1996,17 @@ void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime, #if DEBUG_BATCHING if (status == NO_MEMORY) { - LOGD("channel '%s' ~ Could not append motion sample to currently " + ALOGD("channel '%s' ~ Could not append motion sample to currently " "dispatched move event because the shared memory buffer is full. " "(Waiting for next dispatch cycle to start.)", connection->getInputChannelName()); } else if (status == status_t(FAILED_TRANSACTION)) { - LOGD("channel '%s' ~ Could not append motion sample to currently " + ALOGD("channel '%s' ~ Could not append motion sample to currently " "dispatched move event because the event has already been consumed. " "(Waiting for next dispatch cycle to start.)", connection->getInputChannelName()); } else { - LOGD("channel '%s' ~ Could not append motion sample to currently " + ALOGD("channel '%s' ~ Could not append motion sample to currently " "dispatched move event due to an error, status=%d. " "(Waiting for next dispatch cycle to start.)", connection->getInputChannelName(), status); @@ -2064,7 +2064,7 @@ void InputDispatcher::enqueueDispatchEntryLocked( // to the list starting with the newly appended motion sample. if (resumeWithAppendedMotionSample) { #if DEBUG_BATCHING - LOGD("channel '%s' ~ Preparing a new dispatch cycle for additional motion samples " + ALOGD("channel '%s' ~ Preparing a new dispatch cycle for additional motion samples " "that cannot be streamed because the motion event has already been consumed.", connection->getInputChannelName()); #endif @@ -2082,7 +2082,7 @@ void InputDispatcher::enqueueDispatchEntryLocked( if (!connection->inputState.trackKey(keyEntry, dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags)) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent key event", + ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent key event", connection->getInputChannelName()); #endif return; // skip the inconsistent event @@ -2109,7 +2109,7 @@ void InputDispatcher::enqueueDispatchEntryLocked( && !connection->inputState.isHovering( motionEntry->deviceId, motionEntry->source)) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ enqueueDispatchEntryLocked: filling in missing hover enter event", + ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: filling in missing hover enter event", connection->getInputChannelName()); #endif dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_HOVER_ENTER; @@ -2123,7 +2123,7 @@ void InputDispatcher::enqueueDispatchEntryLocked( if (!connection->inputState.trackMotion(motionEntry, dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags)) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent motion event", + ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent motion event", connection->getInputChannelName()); #endif return; // skip the inconsistent event @@ -2139,7 +2139,7 @@ void InputDispatcher::enqueueDispatchEntryLocked( void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ startDispatchCycle", + ALOGD("channel '%s' ~ startDispatchCycle", connection->getInputChannelName()); #endif @@ -2256,7 +2256,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, nextMotionSample->eventTime, usingCoords); if (status == NO_MEMORY) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ Shared memory buffer full. Some motion samples will " + ALOGD("channel '%s' ~ Shared memory buffer full. Some motion samples will " "be sent in the next dispatch cycle.", connection->getInputChannelName()); #endif @@ -2303,7 +2303,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection, bool handled) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ finishDispatchCycle - %01.1fms since event, " + ALOGD("channel '%s' ~ finishDispatchCycle - %01.1fms since event, " "%01.1fms since dispatch, handled=%s", connection->getInputChannelName(), connection->getEventLatencyMillis(currentTime), @@ -2369,7 +2369,7 @@ void InputDispatcher::startNextDispatchCycleLocked(nsecs_t currentTime, void InputDispatcher::abortBrokenDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection, bool notify) { #if DEBUG_DISPATCH_CYCLE - LOGD("channel '%s' ~ abortBrokenDispatchCycle - notify=%s", + ALOGD("channel '%s' ~ abortBrokenDispatchCycle - notify=%s", connection->getInputChannelName(), toString(notify)); #endif @@ -2479,7 +2479,7 @@ void InputDispatcher::synthesizeCancelationEventsForConnectionLocked( if (! mTempCancelationEvents.isEmpty() && connection->status != Connection::STATUS_BROKEN) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("channel '%s' ~ Synthesized %d cancelation events to bring channel back in sync " + ALOGD("channel '%s' ~ Synthesized %d cancelation events to bring channel back in sync " "with reality: %s, mode=%d.", connection->getInputChannelName(), mTempCancelationEvents.size(), options.reason, options.mode); @@ -2627,7 +2627,7 @@ InputDispatcher::splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet void InputDispatcher::notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("notifyConfigurationChanged - eventTime=%lld", args->eventTime); + ALOGD("notifyConfigurationChanged - eventTime=%lld", args->eventTime); #endif bool needWake; @@ -2645,7 +2645,7 @@ void InputDispatcher::notifyConfigurationChanged(const NotifyConfigurationChange void InputDispatcher::notifyKey(const NotifyKeyArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("notifyKey - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, action=0x%x, " + ALOGD("notifyKey - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, action=0x%x, " "flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, downTime=%lld", args->eventTime, args->deviceId, args->source, args->policyFlags, args->action, args->flags, args->keyCode, args->scanCode, @@ -2723,14 +2723,14 @@ void InputDispatcher::notifyKey(const NotifyKeyArgs* args) { void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("notifyMotion - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " + ALOGD("notifyMotion - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, " "action=0x%x, flags=0x%x, metaState=0x%x, buttonState=0x%x, edgeFlags=0x%x, " "xPrecision=%f, yPrecision=%f, downTime=%lld", args->eventTime, args->deviceId, args->source, args->policyFlags, args->action, args->flags, args->metaState, args->buttonState, args->edgeFlags, args->xPrecision, args->yPrecision, args->downTime); for (uint32_t i = 0; i < args->pointerCount; i++) { - LOGD(" Pointer %d: id=%d, toolType=%d, " + ALOGD(" Pointer %d: id=%d, toolType=%d, " "x=%f, y=%f, pressure=%f, size=%f, " "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, " "orientation=%f", @@ -2892,7 +2892,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { if (args->action == AMOTION_EVENT_ACTION_HOVER_MOVE) { if (mLastHoverWindowHandle == NULL) { #if DEBUG_BATCHING - LOGD("Not streaming hover move because there is no " + ALOGD("Not streaming hover move because there is no " "last hovered window."); #endif goto NoBatchingOrStreaming; @@ -2903,7 +2903,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { args->pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y)); if (mLastHoverWindowHandle != hoverWindowHandle) { #if DEBUG_BATCHING - LOGD("Not streaming hover move because the last hovered window " + ALOGD("Not streaming hover move because the last hovered window " "is '%s' but the currently hovered window is '%s'.", mLastHoverWindowHandle->getName().string(), hoverWindowHandle != NULL @@ -2917,7 +2917,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { // that we can stream onto. Append the motion sample and resume dispatch. motionEntry->appendSample(args->eventTime, args->pointerCoords); #if DEBUG_BATCHING - LOGD("Appended motion sample onto batch for most recently dispatched " + ALOGD("Appended motion sample onto batch for most recently dispatched " "motion event for this device and source in the outbound queues. " "Attempting to stream the motion sample."); #endif @@ -2966,7 +2966,7 @@ void InputDispatcher::batchMotionLocked(MotionEntry* entry, nsecs_t eventTime, } lastSample->eventTime = eventTime; #if DEBUG_BATCHING - LOGD("Coalesced motion into last sample of batch for %s, events were %0.3f ms apart", + ALOGD("Coalesced motion into last sample of batch for %s, events were %0.3f ms apart", eventDescription, interval * 0.000001f); #endif return; @@ -2975,14 +2975,14 @@ void InputDispatcher::batchMotionLocked(MotionEntry* entry, nsecs_t eventTime, // Append the sample. entry->appendSample(eventTime, pointerCoords); #if DEBUG_BATCHING - LOGD("Appended motion sample onto batch for %s, events were %0.3f ms apart", + ALOGD("Appended motion sample onto batch for %s, events were %0.3f ms apart", eventDescription, interval * 0.000001f); #endif } void InputDispatcher::notifySwitch(const NotifySwitchArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("notifySwitch - eventTime=%lld, policyFlags=0x%x, switchCode=%d, switchValue=%d", + ALOGD("notifySwitch - eventTime=%lld, policyFlags=0x%x, switchCode=%d, switchValue=%d", args->eventTime, args->policyFlags, args->switchCode, args->switchValue); #endif @@ -2995,7 +2995,7 @@ void InputDispatcher::notifySwitch(const NotifySwitchArgs* args) { void InputDispatcher::notifyDeviceReset(const NotifyDeviceResetArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("notifyDeviceReset - eventTime=%lld, deviceId=%d", + ALOGD("notifyDeviceReset - eventTime=%lld, deviceId=%d", args->eventTime, args->deviceId); #endif @@ -3016,7 +3016,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event, int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis, uint32_t policyFlags) { #if DEBUG_INBOUND_EVENT_DETAILS - LOGD("injectInputEvent - eventType=%d, injectorPid=%d, injectorUid=%d, " + ALOGD("injectInputEvent - eventType=%d, injectorPid=%d, injectorUid=%d, " "syncMode=%d, timeoutMillis=%d, policyFlags=0x%08x", event->getType(), injectorPid, injectorUid, syncMode, timeoutMillis, policyFlags); #endif @@ -3129,7 +3129,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event, nsecs_t remainingTimeout = endTime - now(); if (remainingTimeout <= 0) { #if DEBUG_INJECTION - LOGD("injectInputEvent - Timed out waiting for injection result " + ALOGD("injectInputEvent - Timed out waiting for injection result " "to become available."); #endif injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT; @@ -3143,13 +3143,13 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event, && syncMode == INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_FINISHED) { while (injectionState->pendingForegroundDispatches != 0) { #if DEBUG_INJECTION - LOGD("injectInputEvent - Waiting for %d pending foreground dispatches.", + ALOGD("injectInputEvent - Waiting for %d pending foreground dispatches.", injectionState->pendingForegroundDispatches); #endif nsecs_t remainingTimeout = endTime - now(); if (remainingTimeout <= 0) { #if DEBUG_INJECTION - LOGD("injectInputEvent - Timed out waiting for pending foreground " + ALOGD("injectInputEvent - Timed out waiting for pending foreground " "dispatches to finish."); #endif injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT; @@ -3165,7 +3165,7 @@ int32_t InputDispatcher::injectInputEvent(const InputEvent* event, } // release lock #if DEBUG_INJECTION - LOGD("injectInputEvent - Finished with result %d. " + ALOGD("injectInputEvent - Finished with result %d. " "injectorPid=%d, injectorUid=%d", injectionResult, injectorPid, injectorUid); #endif @@ -3182,7 +3182,7 @@ void InputDispatcher::setInjectionResultLocked(EventEntry* entry, int32_t inject InjectionState* injectionState = entry->injectionState; if (injectionState) { #if DEBUG_INJECTION - LOGD("Setting input event injection result to %d. " + ALOGD("Setting input event injection result to %d. " "injectorPid=%d, injectorUid=%d", injectionResult, injectionState->injectorPid, injectionState->injectorUid); #endif @@ -3254,7 +3254,7 @@ bool InputDispatcher::hasWindowHandleLocked( void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inputWindowHandles) { #if DEBUG_FOCUS - LOGD("setInputWindows"); + ALOGD("setInputWindows"); #endif { // acquire lock AutoMutex _l(mLock); @@ -3285,7 +3285,7 @@ void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inpu if (mFocusedWindowHandle != newFocusedWindowHandle) { if (mFocusedWindowHandle != NULL) { #if DEBUG_FOCUS - LOGD("Focus left window: %s", + ALOGD("Focus left window: %s", mFocusedWindowHandle->getName().string()); #endif sp<InputChannel> focusedInputChannel = mFocusedWindowHandle->getInputChannel(); @@ -3298,7 +3298,7 @@ void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inpu } if (newFocusedWindowHandle != NULL) { #if DEBUG_FOCUS - LOGD("Focus entered window: %s", + ALOGD("Focus entered window: %s", newFocusedWindowHandle->getName().string()); #endif } @@ -3309,7 +3309,7 @@ void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inpu TouchedWindow& touchedWindow = mTouchState.windows.editItemAt(i); if (!hasWindowHandleLocked(touchedWindow.windowHandle)) { #if DEBUG_FOCUS - LOGD("Touched window was removed: %s", + ALOGD("Touched window was removed: %s", touchedWindow.windowHandle->getName().string()); #endif sp<InputChannel> touchedInputChannel = @@ -3332,7 +3332,7 @@ void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inpu const sp<InputWindowHandle>& oldWindowHandle = oldWindowHandles.itemAt(i); if (!hasWindowHandleLocked(oldWindowHandle)) { #if DEBUG_FOCUS - LOGD("Window went away: %s", oldWindowHandle->getName().string()); + ALOGD("Window went away: %s", oldWindowHandle->getName().string()); #endif oldWindowHandle->releaseInfo(); } @@ -3346,7 +3346,7 @@ void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inpu void InputDispatcher::setFocusedApplication( const sp<InputApplicationHandle>& inputApplicationHandle) { #if DEBUG_FOCUS - LOGD("setFocusedApplication"); + ALOGD("setFocusedApplication"); #endif { // acquire lock AutoMutex _l(mLock); @@ -3376,7 +3376,7 @@ void InputDispatcher::setFocusedApplication( void InputDispatcher::setInputDispatchMode(bool enabled, bool frozen) { #if DEBUG_FOCUS - LOGD("setInputDispatchMode: enabled=%d, frozen=%d", enabled, frozen); + ALOGD("setInputDispatchMode: enabled=%d, frozen=%d", enabled, frozen); #endif bool changed; @@ -3412,7 +3412,7 @@ void InputDispatcher::setInputDispatchMode(bool enabled, bool frozen) { void InputDispatcher::setInputFilterEnabled(bool enabled) { #if DEBUG_FOCUS - LOGD("setInputFilterEnabled: enabled=%d", enabled); + ALOGD("setInputFilterEnabled: enabled=%d", enabled); #endif { // acquire lock @@ -3433,7 +3433,7 @@ void InputDispatcher::setInputFilterEnabled(bool enabled) { bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel, const sp<InputChannel>& toChannel) { #if DEBUG_FOCUS - LOGD("transferTouchFocus: fromChannel=%s, toChannel=%s", + ALOGD("transferTouchFocus: fromChannel=%s, toChannel=%s", fromChannel->getName().string(), toChannel->getName().string()); #endif { // acquire lock @@ -3443,13 +3443,13 @@ bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel, sp<InputWindowHandle> toWindowHandle = getWindowHandleLocked(toChannel); if (fromWindowHandle == NULL || toWindowHandle == NULL) { #if DEBUG_FOCUS - LOGD("Cannot transfer focus because from or to window not found."); + ALOGD("Cannot transfer focus because from or to window not found."); #endif return false; } if (fromWindowHandle == toWindowHandle) { #if DEBUG_FOCUS - LOGD("Trivial transfer to same window."); + ALOGD("Trivial transfer to same window."); #endif return true; } @@ -3475,7 +3475,7 @@ bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel, if (! found) { #if DEBUG_FOCUS - LOGD("Focus transfer failed because from window did not have focus."); + ALOGD("Focus transfer failed because from window did not have focus."); #endif return false; } @@ -3504,7 +3504,7 @@ bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel, void InputDispatcher::resetAndDropEverythingLocked(const char* reason) { #if DEBUG_FOCUS - LOGD("Resetting and dropping all events (%s).", reason); + ALOGD("Resetting and dropping all events (%s).", reason); #endif CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS, reason); @@ -3530,7 +3530,7 @@ void InputDispatcher::logDispatchStateLocked() { if (*end == '\n') { *(end++) = '\0'; } - LOGD("%s", start); + ALOGD("%s", start); start = end; } } @@ -3635,7 +3635,7 @@ void InputDispatcher::dumpDispatchStateLocked(String8& dump) { status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChannel, const sp<InputWindowHandle>& inputWindowHandle, bool monitor) { #if DEBUG_REGISTRATION - LOGD("channel '%s' ~ registerInputChannel - monitor=%s", inputChannel->getName().string(), + ALOGD("channel '%s' ~ registerInputChannel - monitor=%s", inputChannel->getName().string(), toString(monitor)); #endif @@ -3672,7 +3672,7 @@ status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChan status_t InputDispatcher::unregisterInputChannel(const sp<InputChannel>& inputChannel) { #if DEBUG_REGISTRATION - LOGD("channel '%s' ~ unregisterInputChannel", inputChannel->getName().string()); + ALOGD("channel '%s' ~ unregisterInputChannel", inputChannel->getName().string()); #endif { // acquire lock @@ -3915,7 +3915,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con && keyEntry->repeatCount == 0; if (fallbackKeyCode == -1 && !initialDown) { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Unhandled key event: Skipping unhandled key event processing " + ALOGD("Unhandled key event: Skipping unhandled key event processing " "since this is not an initial down. " "keyCode=%d, action=%d, repeatCount=%d", originalKeyCode, keyEntry->action, keyEntry->repeatCount); @@ -3925,7 +3925,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con // Dispatch the unhandled key to the policy. #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Unhandled key event: Asking policy to perform fallback action. " + ALOGD("Unhandled key event: Asking policy to perform fallback action. " "keyCode=%d, action=%d, repeatCount=%d", keyEntry->keyCode, keyEntry->action, keyEntry->repeatCount); #endif @@ -3966,12 +3966,12 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con && (!fallback || fallbackKeyCode != event.getKeyCode())) { #if DEBUG_OUTBOUND_EVENT_DETAILS if (fallback) { - LOGD("Unhandled key event: Policy requested to send key %d" + ALOGD("Unhandled key event: Policy requested to send key %d" "as a fallback for %d, but on the DOWN it had requested " "to send %d instead. Fallback canceled.", event.getKeyCode(), originalKeyCode, fallbackKeyCode); } else { - LOGD("Unhandled key event: Policy did not request fallback for %d," + ALOGD("Unhandled key event: Policy did not request fallback for %d," "but on the DOWN it had requested to send %d. " "Fallback canceled.", originalKeyCode, fallbackKeyCode); @@ -4000,7 +4000,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con msg.appendFormat(", %d->%d", fallbackKeys.keyAt(i), fallbackKeys.valueAt(i)); } - LOGD("Unhandled key event: %d currently tracked fallback keys%s.", + ALOGD("Unhandled key event: %d currently tracked fallback keys%s.", fallbackKeys.size(), msg.string()); } #endif @@ -4019,7 +4019,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con keyEntry->syntheticRepeat = false; #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Unhandled key event: Dispatching fallback key. " + ALOGD("Unhandled key event: Dispatching fallback key. " "originalKeyCode=%d, fallbackKeyCode=%d, fallbackMetaState=%08x", originalKeyCode, fallbackKeyCode, keyEntry->metaState); #endif @@ -4029,7 +4029,7 @@ bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& con return true; // already started next cycle } else { #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Unhandled key event: No fallback key."); + ALOGD("Unhandled key event: No fallback key."); #endif } } @@ -4330,7 +4330,7 @@ bool InputDispatcher::InputState::trackKey(const KeyEntry* entry, * So for now, allow inconsistent key up events to be dispatched. * #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Dropping inconsistent key up event: deviceId=%d, source=%08x, " + ALOGD("Dropping inconsistent key up event: deviceId=%d, source=%08x, " "keyCode=%d, scanCode=%d", entry->deviceId, entry->source, entry->keyCode, entry->scanCode); #endif @@ -4365,7 +4365,7 @@ bool InputDispatcher::InputState::trackMotion(const MotionEntry* entry, return true; } #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Dropping inconsistent motion up or cancel event: deviceId=%d, source=%08x, " + ALOGD("Dropping inconsistent motion up or cancel event: deviceId=%d, source=%08x, " "actionMasked=%d", entry->deviceId, entry->source, actionMasked); #endif @@ -4397,7 +4397,7 @@ bool InputDispatcher::InputState::trackMotion(const MotionEntry* entry, return true; } #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Dropping inconsistent motion pointer up/down or move event: " + ALOGD("Dropping inconsistent motion pointer up/down or move event: " "deviceId=%d, source=%08x, actionMasked=%d", entry->deviceId, entry->source, actionMasked); #endif @@ -4411,7 +4411,7 @@ bool InputDispatcher::InputState::trackMotion(const MotionEntry* entry, return true; } #if DEBUG_OUTBOUND_EVENT_DETAILS - LOGD("Dropping inconsistent motion hover exit event: deviceId=%d, source=%08x", + ALOGD("Dropping inconsistent motion hover exit event: deviceId=%d, source=%08x", entry->deviceId, entry->source); #endif return false; diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index b34ff25..50f26da 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -285,7 +285,7 @@ void InputReader::loopOnce() { if (!count || timeoutMillis == 0) { nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); #if DEBUG_RAW_EVENTS - LOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f); + ALOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f); #endif mNextTimeout = LLONG_MAX; timeoutExpiredLocked(now); @@ -316,7 +316,7 @@ void InputReader::processEventsLocked(const RawEvent* rawEvents, size_t count) { batchSize += 1; } #if DEBUG_RAW_EVENTS - LOGD("BatchSize: %d Count: %d", batchSize, count); + ALOGD("BatchSize: %d Count: %d", batchSize, count); #endif processEventsForDeviceLocked(deviceId, rawEvent, batchSize); } else { @@ -452,7 +452,7 @@ void InputReader::processEventsForDeviceLocked(int32_t deviceId, InputDevice* device = mDevices.valueAt(deviceIndex); if (device->isIgnored()) { - //LOGD("Discarding event for ignored deviceId %d.", deviceId); + //ALOGD("Discarding event for ignored deviceId %d.", deviceId); return; } @@ -934,7 +934,7 @@ void InputDevice::process(const RawEvent* rawEvents, size_t count) { size_t numMappers = mMappers.size(); for (const RawEvent* rawEvent = rawEvents; count--; rawEvent++) { #if DEBUG_RAW_EVENTS - LOGD("Input event: device=%d type=0x%04x scancode=0x%04x " + ALOGD("Input event: device=%d type=0x%04x scancode=0x%04x " "keycode=0x%04x value=0x%08x flags=0x%08x", rawEvent->deviceId, rawEvent->type, rawEvent->scanCode, rawEvent->keyCode, rawEvent->value, rawEvent->flags); @@ -944,11 +944,11 @@ void InputDevice::process(const RawEvent* rawEvents, size_t count) { if (rawEvent->type == EV_SYN && rawEvent->scanCode == SYN_REPORT) { mDropUntilNextSync = false; #if DEBUG_RAW_EVENTS - LOGD("Recovered from input event buffer overrun."); + ALOGD("Recovered from input event buffer overrun."); #endif } else { #if DEBUG_RAW_EVENTS - LOGD("Dropped input event while waiting for next input sync."); + ALOGD("Dropped input event while waiting for next input sync."); #endif } } else if (rawEvent->type == EV_SYN && rawEvent->scanCode == SYN_DROPPED) { @@ -1513,7 +1513,7 @@ void MultiTouchMotionAccumulator::reset(InputDevice* device) { status_t status = device->getEventHub()->getAbsoluteAxisValue(device->getId(), ABS_MT_SLOT, &initialSlot); if (status) { - LOGD("Could not retrieve current multitouch slot index. status=%d", status); + ALOGD("Could not retrieve current multitouch slot index. status=%d", status); initialSlot = -1; } clearSlots(initialSlot); @@ -3317,11 +3317,11 @@ void TouchInputMapper::sync(nsecs_t when) { #if DEBUG_RAW_EVENTS if (!havePointerIds) { - LOGD("syncTouch: pointerCount %d -> %d, no pointer ids", + ALOGD("syncTouch: pointerCount %d -> %d, no pointer ids", mLastRawPointerData.pointerCount, mCurrentRawPointerData.pointerCount); } else { - LOGD("syncTouch: pointerCount %d -> %d, touching ids 0x%08x -> 0x%08x, " + ALOGD("syncTouch: pointerCount %d -> %d, touching ids 0x%08x -> 0x%08x, " "hovering ids 0x%08x -> 0x%08x", mLastRawPointerData.pointerCount, mCurrentRawPointerData.pointerCount, @@ -3472,7 +3472,7 @@ bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) { mCurrentVirtualKey.down = false; if (!mCurrentVirtualKey.ignored) { #if DEBUG_VIRTUAL_KEYS - LOGD("VirtualKeys: Generating key up: keyCode=%d, scanCode=%d", + ALOGD("VirtualKeys: Generating key up: keyCode=%d, scanCode=%d", mCurrentVirtualKey.keyCode, mCurrentVirtualKey.scanCode); #endif dispatchVirtualKey(when, policyFlags, @@ -3499,7 +3499,7 @@ bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) { mCurrentVirtualKey.down = false; if (!mCurrentVirtualKey.ignored) { #if DEBUG_VIRTUAL_KEYS - LOGD("VirtualKeys: Canceling key: keyCode=%d, scanCode=%d", + ALOGD("VirtualKeys: Canceling key: keyCode=%d, scanCode=%d", mCurrentVirtualKey.keyCode, mCurrentVirtualKey.scanCode); #endif dispatchVirtualKey(when, policyFlags, @@ -3529,7 +3529,7 @@ bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) { if (!mCurrentVirtualKey.ignored) { #if DEBUG_VIRTUAL_KEYS - LOGD("VirtualKeys: Generating key down: keyCode=%d, scanCode=%d", + ALOGD("VirtualKeys: Generating key down: keyCode=%d, scanCode=%d", mCurrentVirtualKey.keyCode, mCurrentVirtualKey.scanCode); #endif @@ -4191,7 +4191,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // Handle TAP timeout. if (isTimeout) { #if DEBUG_GESTURES - LOGD("Gestures: Processing timeout"); + ALOGD("Gestures: Processing timeout"); #endif if (mPointerGesture.lastGestureMode == PointerGesture::TAP) { @@ -4202,7 +4202,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, } else { // The tap is finished. #if DEBUG_GESTURES - LOGD("Gestures: TAP finished"); + ALOGD("Gestures: TAP finished"); #endif *outFinishPreviousGesture = true; @@ -4294,7 +4294,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, if (isQuietTime) { // Case 1: Quiet time. (QUIET) #if DEBUG_GESTURES - LOGD("Gestures: QUIET for next %0.3fms", (mPointerGesture.quietTime + ALOGD("Gestures: QUIET for next %0.3fms", (mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval - when) * 0.000001f); #endif if (mPointerGesture.lastGestureMode != PointerGesture::QUIET) { @@ -4321,7 +4321,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // finger to drag then the active pointer should switch to the finger that is // being dragged. #if DEBUG_GESTURES - LOGD("Gestures: BUTTON_CLICK_OR_DRAG activeTouchId=%d, " + ALOGD("Gestures: BUTTON_CLICK_OR_DRAG activeTouchId=%d, " "currentFingerCount=%d", activeTouchId, currentFingerCount); #endif // Reset state when just starting. @@ -4350,7 +4350,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.activeTouchId = activeTouchId = bestId; activeTouchChanged = true; #if DEBUG_GESTURES - LOGD("Gestures: BUTTON_CLICK_OR_DRAG switched pointers, " + ALOGD("Gestures: BUTTON_CLICK_OR_DRAG switched pointers, " "bestId=%d, bestSpeed=%0.3f", bestId, bestSpeed); #endif } @@ -4407,7 +4407,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, if (fabs(x - mPointerGesture.tapX) <= mConfig.pointerGestureTapSlop && fabs(y - mPointerGesture.tapY) <= mConfig.pointerGestureTapSlop) { #if DEBUG_GESTURES - LOGD("Gestures: TAP"); + ALOGD("Gestures: TAP"); #endif mPointerGesture.tapUpTime = when; @@ -4437,14 +4437,14 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, tapped = true; } else { #if DEBUG_GESTURES - LOGD("Gestures: Not a TAP, deltaX=%f, deltaY=%f", + ALOGD("Gestures: Not a TAP, deltaX=%f, deltaY=%f", x - mPointerGesture.tapX, y - mPointerGesture.tapY); #endif } } else { #if DEBUG_GESTURES - LOGD("Gestures: Not a TAP, %0.3fms since down", + ALOGD("Gestures: Not a TAP, %0.3fms since down", (when - mPointerGesture.tapDownTime) * 0.000001f); #endif } @@ -4454,7 +4454,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, if (!tapped) { #if DEBUG_GESTURES - LOGD("Gestures: NEUTRAL"); + ALOGD("Gestures: NEUTRAL"); #endif mPointerGesture.activeGestureId = -1; mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL; @@ -4477,14 +4477,14 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG; } else { #if DEBUG_GESTURES - LOGD("Gestures: Not a TAP_DRAG, deltaX=%f, deltaY=%f", + ALOGD("Gestures: Not a TAP_DRAG, deltaX=%f, deltaY=%f", x - mPointerGesture.tapX, y - mPointerGesture.tapY); #endif } } else { #if DEBUG_GESTURES - LOGD("Gestures: Not a TAP_DRAG, %0.3fms time since up", + ALOGD("Gestures: Not a TAP_DRAG, %0.3fms time since up", (when - mPointerGesture.tapUpTime) * 0.000001f); #endif } @@ -4515,12 +4515,12 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, bool down; if (mPointerGesture.currentGestureMode == PointerGesture::TAP_DRAG) { #if DEBUG_GESTURES - LOGD("Gestures: TAP_DRAG"); + ALOGD("Gestures: TAP_DRAG"); #endif down = true; } else { #if DEBUG_GESTURES - LOGD("Gestures: HOVER"); + ALOGD("Gestures: HOVER"); #endif if (mPointerGesture.lastGestureMode != PointerGesture::HOVER) { *outFinishPreviousGesture = true; @@ -4577,7 +4577,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // Additional pointers have gone down but not yet settled. // Reset the gesture. #if DEBUG_GESTURES - LOGD("Gestures: Resetting gesture since additional pointers went down for MULTITOUCH, " + ALOGD("Gestures: Resetting gesture since additional pointers went down for MULTITOUCH, " "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime + mConfig.pointerGestureMultitouchSettleInterval - when) * 0.000001f); @@ -4596,7 +4596,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // Use the centroid and pointer location as the reference points for the gesture. #if DEBUG_GESTURES - LOGD("Gestures: Using centroid as reference for MULTITOUCH, " + ALOGD("Gestures: Using centroid as reference for MULTITOUCH, " "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime + mConfig.pointerGestureMultitouchSettleInterval - when) * 0.000001f); @@ -4659,7 +4659,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, if (currentFingerCount > 2) { // There are more than two pointers, switch to FREEFORM. #if DEBUG_GESTURES - LOGD("Gestures: PRESS transitioned to FREEFORM, number of pointers %d > 2", + ALOGD("Gestures: PRESS transitioned to FREEFORM, number of pointers %d > 2", currentFingerCount); #endif *outCancelPreviousGesture = true; @@ -4676,7 +4676,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // There are two pointers but they are too far apart for a SWIPE, // switch to FREEFORM. #if DEBUG_GESTURES - LOGD("Gestures: PRESS transitioned to FREEFORM, distance %0.3f > %0.3f", + ALOGD("Gestures: PRESS transitioned to FREEFORM, distance %0.3f > %0.3f", mutualDistance, mPointerGestureMaxSwipeWidth); #endif *outCancelPreviousGesture = true; @@ -4703,7 +4703,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, if (cosine >= mConfig.pointerGestureSwipeTransitionAngleCosine) { // Pointers are moving in the same direction. Switch to SWIPE. #if DEBUG_GESTURES - LOGD("Gestures: PRESS transitioned to SWIPE, " + ALOGD("Gestures: PRESS transitioned to SWIPE, " "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, " "cosine %0.3f >= %0.3f", dist1, mConfig.pointerGestureMultitouchMinDistance, @@ -4714,7 +4714,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, } else { // Pointers are moving in different directions. Switch to FREEFORM. #if DEBUG_GESTURES - LOGD("Gestures: PRESS transitioned to FREEFORM, " + ALOGD("Gestures: PRESS transitioned to FREEFORM, " "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, " "cosine %0.3f < %0.3f", dist1, mConfig.pointerGestureMultitouchMinDistance, @@ -4733,7 +4733,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, // Cancel previous gesture. if (currentFingerCount > 2) { #if DEBUG_GESTURES - LOGD("Gestures: SWIPE transitioned to FREEFORM, number of pointers %d > 2", + ALOGD("Gestures: SWIPE transitioned to FREEFORM, number of pointers %d > 2", currentFingerCount); #endif *outCancelPreviousGesture = true; @@ -4770,7 +4770,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, || mPointerGesture.currentGestureMode == PointerGesture::SWIPE) { // PRESS or SWIPE mode. #if DEBUG_GESTURES - LOGD("Gestures: PRESS or SWIPE activeTouchId=%d," + ALOGD("Gestures: PRESS or SWIPE activeTouchId=%d," "activeGestureId=%d, currentTouchPointerCount=%d", activeTouchId, mPointerGesture.activeGestureId, currentFingerCount); #endif @@ -4792,7 +4792,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, } else if (mPointerGesture.currentGestureMode == PointerGesture::FREEFORM) { // FREEFORM mode. #if DEBUG_GESTURES - LOGD("Gestures: FREEFORM activeTouchId=%d," + ALOGD("Gestures: FREEFORM activeTouchId=%d," "activeGestureId=%d, currentTouchPointerCount=%d", activeTouchId, mPointerGesture.activeGestureId, currentFingerCount); #endif @@ -4835,7 +4835,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, } #if DEBUG_GESTURES - LOGD("Gestures: FREEFORM follow up " + ALOGD("Gestures: FREEFORM follow up " "mappedTouchIdBits=0x%08x, usedGestureIdBits=0x%08x, " "activeGestureId=%d", mappedTouchIdBits.value, usedGestureIdBits.value, @@ -4850,14 +4850,14 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, gestureId = usedGestureIdBits.markFirstUnmarkedBit(); mPointerGesture.freeformTouchToGestureIdMap[touchId] = gestureId; #if DEBUG_GESTURES - LOGD("Gestures: FREEFORM " + ALOGD("Gestures: FREEFORM " "new mapping for touch id %d -> gesture id %d", touchId, gestureId); #endif } else { gestureId = mPointerGesture.freeformTouchToGestureIdMap[touchId]; #if DEBUG_GESTURES - LOGD("Gestures: FREEFORM " + ALOGD("Gestures: FREEFORM " "existing mapping for touch id %d -> gesture id %d", touchId, gestureId); #endif @@ -4890,7 +4890,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.activeGestureId = mPointerGesture.currentGestureIdBits.firstMarkedBit(); #if DEBUG_GESTURES - LOGD("Gestures: FREEFORM new " + ALOGD("Gestures: FREEFORM new " "activeGestureId=%d", mPointerGesture.activeGestureId); #endif } @@ -4900,7 +4900,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerController->setButtonState(mCurrentButtonState); #if DEBUG_GESTURES - LOGD("Gestures: finishPreviousGesture=%s, cancelPreviousGesture=%s, " + ALOGD("Gestures: finishPreviousGesture=%s, cancelPreviousGesture=%s, " "currentGestureMode=%d, currentGestureIdBits=0x%08x, " "lastGestureMode=%d, lastGestureIdBits=0x%08x", toString(*outFinishPreviousGesture), toString(*outCancelPreviousGesture), @@ -4911,7 +4911,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, uint32_t index = mPointerGesture.currentGestureIdToIndex[id]; const PointerProperties& properties = mPointerGesture.currentGestureProperties[index]; const PointerCoords& coords = mPointerGesture.currentGestureCoords[index]; - LOGD(" currentGesture[%d]: index=%d, toolType=%d, " + ALOGD(" currentGesture[%d]: index=%d, toolType=%d, " "x=%0.3f, y=%0.3f, pressure=%0.3f", id, index, properties.toolType, coords.getAxisValue(AMOTION_EVENT_AXIS_X), @@ -4923,7 +4923,7 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, uint32_t index = mPointerGesture.lastGestureIdToIndex[id]; const PointerProperties& properties = mPointerGesture.lastGestureProperties[index]; const PointerCoords& coords = mPointerGesture.lastGestureCoords[index]; - LOGD(" lastGesture[%d]: index=%d, toolType=%d, " + ALOGD(" lastGesture[%d]: index=%d, toolType=%d, " "x=%0.3f, y=%0.3f, pressure=%0.3f", id, index, properties.toolType, coords.getAxisValue(AMOTION_EVENT_AXIS_X), @@ -5232,7 +5232,7 @@ const TouchInputMapper::VirtualKey* TouchInputMapper::findVirtualKeyHit( const VirtualKey& virtualKey = mVirtualKeys[i]; #if DEBUG_VIRTUAL_KEYS - LOGD("VirtualKeys: Hit test (%d, %d): keyCode=%d, scanCode=%d, " + ALOGD("VirtualKeys: Hit test (%d, %d): keyCode=%d, scanCode=%d, " "left=%d, top=%d, right=%d, bottom=%d", x, y, virtualKey.keyCode, virtualKey.scanCode, @@ -5337,9 +5337,9 @@ void TouchInputMapper::assignPointerIds() { } #if DEBUG_POINTER_ASSIGNMENT - LOGD("assignPointerIds - initial distance min-heap: size=%d", heapSize); + ALOGD("assignPointerIds - initial distance min-heap: size=%d", heapSize); for (size_t i = 0; i < heapSize; i++) { - LOGD(" heap[%d]: cur=%d, last=%d, distance=%lld", + ALOGD(" heap[%d]: cur=%d, last=%d, distance=%lld", i, heap[i].currentPointerIndex, heap[i].lastPointerIndex, heap[i].distance); } @@ -5383,9 +5383,9 @@ void TouchInputMapper::assignPointerIds() { } #if DEBUG_POINTER_ASSIGNMENT - LOGD("assignPointerIds - reduced distance min-heap: size=%d", heapSize); + ALOGD("assignPointerIds - reduced distance min-heap: size=%d", heapSize); for (size_t i = 0; i < heapSize; i++) { - LOGD(" heap[%d]: cur=%d, last=%d, distance=%lld", + ALOGD(" heap[%d]: cur=%d, last=%d, distance=%lld", i, heap[i].currentPointerIndex, heap[i].lastPointerIndex, heap[i].distance); } @@ -5411,7 +5411,7 @@ void TouchInputMapper::assignPointerIds() { usedIdBits.markBit(id); #if DEBUG_POINTER_ASSIGNMENT - LOGD("assignPointerIds - matched: cur=%d, last=%d, id=%d, distance=%lld", + ALOGD("assignPointerIds - matched: cur=%d, last=%d, id=%d, distance=%lld", lastPointerIndex, currentPointerIndex, id, heap[0].distance); #endif break; @@ -5429,7 +5429,7 @@ void TouchInputMapper::assignPointerIds() { mCurrentRawPointerData.isHovering(currentPointerIndex)); #if DEBUG_POINTER_ASSIGNMENT - LOGD("assignPointerIds - assigned: cur=%d, id=%d", + ALOGD("assignPointerIds - assigned: cur=%d, id=%d", currentPointerIndex, id); #endif } @@ -5587,7 +5587,7 @@ void MultiTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) { if (outCount >= MAX_POINTERS) { #if DEBUG_POINTERS - LOGD("MultiTouch device %s emitted more than maximum of %d pointers; " + ALOGD("MultiTouch device %s emitted more than maximum of %d pointers; " "ignoring the rest.", getDeviceName().string(), MAX_POINTERS); #endif diff --git a/services/input/PointerController.cpp b/services/input/PointerController.cpp index 1d1730d..fc828a6 100644 --- a/services/input/PointerController.cpp +++ b/services/input/PointerController.cpp @@ -126,7 +126,7 @@ bool PointerController::getBoundsLocked(float* outMinX, float* outMinY, void PointerController::move(float deltaX, float deltaY) { #if DEBUG_POINTER_UPDATES - LOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY); + ALOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY); #endif if (deltaX == 0.0f && deltaY == 0.0f) { return; @@ -139,7 +139,7 @@ void PointerController::move(float deltaX, float deltaY) { void PointerController::setButtonState(int32_t buttonState) { #if DEBUG_POINTER_UPDATES - LOGD("Set button state 0x%08x", buttonState); + ALOGD("Set button state 0x%08x", buttonState); #endif AutoMutex _l(mLock); @@ -156,7 +156,7 @@ int32_t PointerController::getButtonState() const { void PointerController::setPosition(float x, float y) { #if DEBUG_POINTER_UPDATES - LOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y); + ALOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y); #endif AutoMutex _l(mLock); @@ -243,12 +243,12 @@ void PointerController::setPresentation(Presentation presentation) { void PointerController::setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex, BitSet32 spotIdBits) { #if DEBUG_POINTER_UPDATES - LOGD("setSpots: idBits=%08x", spotIdBits.value); + ALOGD("setSpots: idBits=%08x", spotIdBits.value); for (BitSet32 idBits(spotIdBits); !idBits.isEmpty(); ) { uint32_t id = idBits.firstMarkedBit(); idBits.clearBit(id); const PointerCoords& c = spotCoords[spotIdToIndex[id]]; - LOGD(" spot %d: position=(%0.3f, %0.3f), pressure=%0.3f", id, + ALOGD(" spot %d: position=(%0.3f, %0.3f), pressure=%0.3f", id, c.getAxisValue(AMOTION_EVENT_AXIS_X), c.getAxisValue(AMOTION_EVENT_AXIS_Y), c.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE)); @@ -290,7 +290,7 @@ void PointerController::setSpots(const PointerCoords* spotCoords, void PointerController::clearSpots() { #if DEBUG_POINTER_UPDATES - LOGD("clearSpots"); + ALOGD("clearSpots"); #endif AutoMutex _l(mLock); diff --git a/services/jni/com_android_server_AlarmManagerService.cpp b/services/jni/com_android_server_AlarmManagerService.cpp index e80dd04..5f189a2 100644 --- a/services/jni/com_android_server_AlarmManagerService.cpp +++ b/services/jni/com_android_server_AlarmManagerService.cpp @@ -49,7 +49,7 @@ static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jo LOGE("Unable to set kernel timezone to %d: %s\n", minswest, strerror(errno)); return -1; } else { - LOGD("Kernel timezone updated to %d minutes west of GMT\n", minswest); + ALOGD("Kernel timezone updated to %d minutes west of GMT\n", minswest); } return 0; diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index f259883..145f713 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -502,7 +502,7 @@ void NativeInputManager::ensureSpriteControllerLocked() { void NativeInputManager::notifySwitch(nsecs_t when, int32_t switchCode, int32_t switchValue, uint32_t policyFlags) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("notifySwitch - when=%lld, switchCode=%d, switchValue=%d, policyFlags=0x%x", + ALOGD("notifySwitch - when=%lld, switchCode=%d, switchValue=%d, policyFlags=0x%x", when, switchCode, switchValue, policyFlags); #endif @@ -519,7 +519,7 @@ void NativeInputManager::notifySwitch(nsecs_t when, int32_t switchCode, void NativeInputManager::notifyConfigurationChanged(nsecs_t when) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("notifyConfigurationChanged - when=%lld", when); + ALOGD("notifyConfigurationChanged - when=%lld", when); #endif JNIEnv* env = jniEnv(); @@ -531,7 +531,7 @@ void NativeInputManager::notifyConfigurationChanged(nsecs_t when) { nsecs_t NativeInputManager::notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle, const sp<InputWindowHandle>& inputWindowHandle) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("notifyANR"); + ALOGD("notifyANR"); #endif JNIEnv* env = jniEnv(); @@ -556,7 +556,7 @@ nsecs_t NativeInputManager::notifyANR(const sp<InputApplicationHandle>& inputApp void NativeInputManager::notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("notifyInputChannelBroken"); + ALOGD("notifyInputChannelBroken"); #endif JNIEnv* env = jniEnv(); @@ -829,14 +829,14 @@ void NativeInputManager::handleInterceptActions(jint wmActions, nsecs_t when, uint32_t& policyFlags) { if (wmActions & WM_ACTION_GO_TO_SLEEP) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("handleInterceptActions: Going to sleep."); + ALOGD("handleInterceptActions: Going to sleep."); #endif android_server_PowerManagerService_goToSleep(when); } if (wmActions & WM_ACTION_POKE_USER_ACTIVITY) { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("handleInterceptActions: Poking user activity."); + ALOGD("handleInterceptActions: Poking user activity."); #endif android_server_PowerManagerService_userActivity(when, POWER_MANAGER_BUTTON_EVENT); } @@ -845,7 +845,7 @@ void NativeInputManager::handleInterceptActions(jint wmActions, nsecs_t when, policyFlags |= POLICY_FLAG_PASS_TO_USER; } else { #if DEBUG_INPUT_DISPATCHER_POLICY - LOGD("handleInterceptActions: Not passing key to user."); + ALOGD("handleInterceptActions: Not passing key to user."); #endif } } diff --git a/services/jni/com_android_server_connectivity_Vpn.cpp b/services/jni/com_android_server_connectivity_Vpn.cpp index d28a6b4..d9b8a14 100644 --- a/services/jni/com_android_server_connectivity_Vpn.cpp +++ b/services/jni/com_android_server_connectivity_Vpn.cpp @@ -171,7 +171,7 @@ static int set_addresses(const char *name, const char *addresses) break; } } - LOGD("Address added on %s: %s/%d", name, address, prefix); + ALOGD("Address added on %s: %s/%d", name, address, prefix); ++count; } @@ -260,7 +260,7 @@ static int set_routes(const char *name, const char *routes) } } } - LOGD("Route added on %s: %s/%d", name, address, prefix); + ALOGD("Route added on %s: %s/%d", name, address, prefix); ++count; } diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp index c823da5..2e5b5d6 100755 --- a/services/jni/com_android_server_location_GpsLocationProvider.cpp +++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp @@ -107,7 +107,7 @@ static void nmea_callback(GpsUtcTime timestamp, const char* nmea, int length) static void set_capabilities_callback(uint32_t capabilities) { - LOGD("set_capabilities_callback: %ld\n", capabilities); + ALOGD("set_capabilities_callback: %ld\n", capabilities); JNIEnv* env = AndroidRuntime::getJNIEnv(); env->CallVoidMethod(mCallbacksObj, method_setEngineCapabilities, capabilities); checkAndClearExceptionFromCallback(env, __FUNCTION__); @@ -182,7 +182,7 @@ AGpsCallbacks sAGpsCallbacks = { static void gps_ni_notify_callback(GpsNiNotification *notification) { - LOGD("gps_ni_notify_callback\n"); + ALOGD("gps_ni_notify_callback\n"); JNIEnv* env = AndroidRuntime::getJNIEnv(); jstring requestor_id = env->NewStringUTF(notification->requestor_id); jstring text = env->NewStringUTF(notification->text); diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp index 7575ebd..8f23506 100644 --- a/services/sensorservice/SensorDevice.cpp +++ b/services/sensorservice/SensorDevice.cpp @@ -182,13 +182,13 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled) Info& info( mActivationCount.editValueFor(handle) ); - LOGD_IF(DEBUG_CONNECTIONS, + ALOGD_IF(DEBUG_CONNECTIONS, "SensorDevice::activate: ident=%p, handle=0x%08x, enabled=%d, count=%d", ident, handle, enabled, info.rates.size()); if (enabled) { Mutex::Autolock _l(mLock); - LOGD_IF(DEBUG_CONNECTIONS, "... index=%ld", + ALOGD_IF(DEBUG_CONNECTIONS, "... index=%ld", info.rates.indexOfKey(ident)); if (info.rates.indexOfKey(ident) < 0) { @@ -201,7 +201,7 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled) } } else { Mutex::Autolock _l(mLock); - LOGD_IF(DEBUG_CONNECTIONS, "... index=%ld", + ALOGD_IF(DEBUG_CONNECTIONS, "... index=%ld", info.rates.indexOfKey(ident)); ssize_t idx = info.rates.removeItem(ident); @@ -215,7 +215,7 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled) } if (actuateHardware) { - LOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w"); + ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w"); err = mSensorDevice->activate(mSensorDevice, handle, enabled); if (enabled) { diff --git a/services/sensorservice/SensorFusion.cpp b/services/sensorservice/SensorFusion.cpp index 518a1bb..d23906d 100644 --- a/services/sensorservice/SensorFusion.cpp +++ b/services/sensorservice/SensorFusion.cpp @@ -76,7 +76,7 @@ template <typename T> inline T max(T a, T b) { return a>b ? a : b; } status_t SensorFusion::activate(void* ident, bool enabled) { - LOGD_IF(DEBUG_CONNECTIONS, + ALOGD_IF(DEBUG_CONNECTIONS, "SensorFusion::activate(ident=%p, enabled=%d)", ident, enabled); diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 6202143..0857282 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -65,7 +65,7 @@ SensorService::SensorService() void SensorService::onFirstRef() { - LOGD("nuSensorService starting..."); + ALOGD("nuSensorService starting..."); SensorDevice& dev(SensorDevice::getInstance()); @@ -222,7 +222,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args) bool SensorService::threadLoop() { - LOGD("nuSensorService thread starting..."); + ALOGD("nuSensorService thread starting..."); const size_t numEventMax = 16 * (1 + mVirtualSensorList.size()); sensors_event_t buffer[numEventMax]; @@ -363,11 +363,11 @@ void SensorService::cleanupConnection(SensorEventConnection* c) Mutex::Autolock _l(mLock); const wp<SensorEventConnection> connection(c); size_t size = mActiveSensors.size(); - LOGD_IF(DEBUG_CONNECTIONS, "%d active sensors", size); + ALOGD_IF(DEBUG_CONNECTIONS, "%d active sensors", size); for (size_t i=0 ; i<size ; ) { int handle = mActiveSensors.keyAt(i); if (c->hasSensor(handle)) { - LOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle); + ALOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle); SensorInterface* sensor = mSensorMap.valueFor( handle ); LOGE_IF(!sensor, "mSensorMap[handle=0x%08x] is null!", handle); if (sensor) { @@ -376,12 +376,12 @@ void SensorService::cleanupConnection(SensorEventConnection* c) } SensorRecord* rec = mActiveSensors.valueAt(i); LOGE_IF(!rec, "mActiveSensors[%d] is null (handle=0x%08x)!", i, handle); - LOGD_IF(DEBUG_CONNECTIONS, + ALOGD_IF(DEBUG_CONNECTIONS, "removing connection %p for sensor[%d].handle=0x%08x", c, i, handle); if (rec && rec->removeConnection(connection)) { - LOGD_IF(DEBUG_CONNECTIONS, "... and it was the last connection"); + ALOGD_IF(DEBUG_CONNECTIONS, "... and it was the last connection"); mActiveSensors.removeItemsAt(i, 1); mActiveVirtualSensors.removeItem(handle); delete rec; @@ -528,7 +528,7 @@ SensorService::SensorEventConnection::SensorEventConnection( SensorService::SensorEventConnection::~SensorEventConnection() { - LOGD_IF(DEBUG_CONNECTIONS, "~SensorEventConnection(%p)", this); + ALOGD_IF(DEBUG_CONNECTIONS, "~SensorEventConnection(%p)", this); mService->cleanupConnection(this); } diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp index 3b7c09e..174dcd7 100644 --- a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp +++ b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp @@ -79,7 +79,7 @@ bool DisplayHardwareBase::DisplayEventThread::threadLoop() LOGW_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); @@ -94,7 +94,7 @@ bool DisplayHardwareBase::DisplayEventThread::threadLoop() LOGW_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/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 @@ uint32_t Layer::doTransaction(uint32_t flags) 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 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) 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/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 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } 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 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } } } 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 @@ status_t MessageQueue::queueMessage( 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 @@ void MessageQueue::dumpLocked(const sp<MessageBase>& message) 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..1519a89 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1286,7 +1286,7 @@ sp<ISurface> SurfaceFlinger::createSurface( 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: @@ -2268,7 +2268,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, 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 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, hw.compositionComplete(); - // LOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK"); + // ALOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK"); return result; } 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 @@ SurfaceTextureLayer::~SurfaceTextureLayer() { 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 @@ status_t SurfaceTextureLayer::dequeueBuffer(int *buf, 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 @@ void Transform::dump(const char* name) const 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 @@ TEST_F(LayerUpdateTest, LayerResizeWorks) { 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 @@ TEST_F(LayerUpdateTest, LayerResizeWorks) { 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"); diff --git a/tools/aapt/ZipEntry.cpp b/tools/aapt/ZipEntry.cpp index d77bd3f..b00135e 100644 --- a/tools/aapt/ZipEntry.cpp +++ b/tools/aapt/ZipEntry.cpp @@ -47,7 +47,7 @@ status_t ZipEntry::initFromCDE(FILE* fp) /* read the CDE */ result = mCDE.read(fp); if (result != NO_ERROR) { - LOGD("mCDE.read failed\n"); + ALOGD("mCDE.read failed\n"); return result; } @@ -56,14 +56,14 @@ status_t ZipEntry::initFromCDE(FILE* fp) /* using the info in the CDE, go load up the LFH */ posn = ftell(fp); if (fseek(fp, mCDE.mLocalHeaderRelOffset, SEEK_SET) != 0) { - LOGD("local header seek failed (%ld)\n", + ALOGD("local header seek failed (%ld)\n", mCDE.mLocalHeaderRelOffset); return UNKNOWN_ERROR; } result = mLFH.read(fp); if (result != NO_ERROR) { - LOGD("mLFH.read failed\n"); + ALOGD("mLFH.read failed\n"); return result; } @@ -81,7 +81,7 @@ status_t ZipEntry::initFromCDE(FILE* fp) hasDD = (mLFH.mGPBitFlag & kUsesDataDescr) != 0; if (hasDD) { // do something clever - //LOGD("+++ has data descriptor\n"); + //ALOGD("+++ has data descriptor\n"); } /* @@ -413,7 +413,7 @@ status_t ZipEntry::LocalFileHeader::read(FILE* fp) } if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { - LOGD("whoops: didn't find expected signature\n"); + ALOGD("whoops: didn't find expected signature\n"); result = UNKNOWN_ERROR; goto bail; } @@ -506,17 +506,17 @@ status_t ZipEntry::LocalFileHeader::write(FILE* fp) */ void ZipEntry::LocalFileHeader::dump(void) const { - LOGD(" LocalFileHeader contents:\n"); - LOGD(" versToExt=%u gpBits=0x%04x compression=%u\n", + ALOGD(" LocalFileHeader contents:\n"); + ALOGD(" versToExt=%u gpBits=0x%04x compression=%u\n", mVersionToExtract, mGPBitFlag, mCompressionMethod); - LOGD(" modTime=0x%04x modDate=0x%04x crc32=0x%08lx\n", + ALOGD(" modTime=0x%04x modDate=0x%04x crc32=0x%08lx\n", mLastModFileTime, mLastModFileDate, mCRC32); - LOGD(" compressedSize=%lu uncompressedSize=%lu\n", + ALOGD(" compressedSize=%lu uncompressedSize=%lu\n", mCompressedSize, mUncompressedSize); - LOGD(" filenameLen=%u extraLen=%u\n", + ALOGD(" filenameLen=%u extraLen=%u\n", mFileNameLength, mExtraFieldLength); if (mFileName != NULL) - LOGD(" filename: '%s'\n", mFileName); + ALOGD(" filename: '%s'\n", mFileName); } @@ -549,7 +549,7 @@ status_t ZipEntry::CentralDirEntry::read(FILE* fp) } if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { - LOGD("Whoops: didn't find expected signature\n"); + ALOGD("Whoops: didn't find expected signature\n"); result = UNKNOWN_ERROR; goto bail; } @@ -675,22 +675,22 @@ status_t ZipEntry::CentralDirEntry::write(FILE* fp) */ void ZipEntry::CentralDirEntry::dump(void) const { - LOGD(" CentralDirEntry contents:\n"); - LOGD(" versMadeBy=%u versToExt=%u gpBits=0x%04x compression=%u\n", + ALOGD(" CentralDirEntry contents:\n"); + ALOGD(" versMadeBy=%u versToExt=%u gpBits=0x%04x compression=%u\n", mVersionMadeBy, mVersionToExtract, mGPBitFlag, mCompressionMethod); - LOGD(" modTime=0x%04x modDate=0x%04x crc32=0x%08lx\n", + ALOGD(" modTime=0x%04x modDate=0x%04x crc32=0x%08lx\n", mLastModFileTime, mLastModFileDate, mCRC32); - LOGD(" compressedSize=%lu uncompressedSize=%lu\n", + ALOGD(" compressedSize=%lu uncompressedSize=%lu\n", mCompressedSize, mUncompressedSize); - LOGD(" filenameLen=%u extraLen=%u commentLen=%u\n", + ALOGD(" filenameLen=%u extraLen=%u commentLen=%u\n", mFileNameLength, mExtraFieldLength, mFileCommentLength); - LOGD(" diskNumStart=%u intAttr=0x%04x extAttr=0x%08lx relOffset=%lu\n", + ALOGD(" diskNumStart=%u intAttr=0x%04x extAttr=0x%08lx relOffset=%lu\n", mDiskNumberStart, mInternalAttrs, mExternalAttrs, mLocalHeaderRelOffset); if (mFileName != NULL) - LOGD(" filename: '%s'\n", mFileName); + ALOGD(" filename: '%s'\n", mFileName); if (mFileComment != NULL) - LOGD(" comment: '%s'\n", mFileComment); + ALOGD(" comment: '%s'\n", mFileComment); } diff --git a/tools/aapt/ZipFile.cpp b/tools/aapt/ZipFile.cpp index 9e5ee42..a2d5b80 100644 --- a/tools/aapt/ZipFile.cpp +++ b/tools/aapt/ZipFile.cpp @@ -78,7 +78,7 @@ status_t ZipFile::open(const char* zipFileName, int flags) newArchive = (access(zipFileName, F_OK) != 0); if (!(flags & kOpenCreate) && newArchive) { /* not creating, must already exist */ - LOGD("File %s does not exist", zipFileName); + ALOGD("File %s does not exist", zipFileName); return NAME_NOT_FOUND; } } @@ -96,7 +96,7 @@ status_t ZipFile::open(const char* zipFileName, int flags) mZipFp = fopen(zipFileName, openflags); if (mZipFp == NULL) { int err = errno; - LOGD("fopen failed: %d\n", err); + ALOGD("fopen failed: %d\n", err); return errnoToStatus(err); } @@ -215,14 +215,14 @@ status_t ZipFile::readCentralDir(void) /* too small to be a ZIP archive? */ if (fileLength < EndOfCentralDir::kEOCDLen) { - LOGD("Length is %ld -- too small\n", (long)fileLength); + ALOGD("Length is %ld -- too small\n", (long)fileLength); result = INVALID_OPERATION; goto bail; } buf = new unsigned char[EndOfCentralDir::kMaxEOCDSearch]; if (buf == NULL) { - LOGD("Failure allocating %d bytes for EOCD search", + ALOGD("Failure allocating %d bytes for EOCD search", EndOfCentralDir::kMaxEOCDSearch); result = NO_MEMORY; goto bail; @@ -236,14 +236,14 @@ status_t ZipFile::readCentralDir(void) readAmount = (long) fileLength; } if (fseek(mZipFp, seekStart, SEEK_SET) != 0) { - LOGD("Failure seeking to end of zip at %ld", (long) seekStart); + ALOGD("Failure seeking to end of zip at %ld", (long) seekStart); result = UNKNOWN_ERROR; goto bail; } /* read the last part of the file into the buffer */ if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { - LOGD("short file? wanted %ld\n", readAmount); + ALOGD("short file? wanted %ld\n", readAmount); result = UNKNOWN_ERROR; goto bail; } @@ -258,7 +258,7 @@ status_t ZipFile::readCentralDir(void) } } if (i < 0) { - LOGD("EOCD not found, not Zip\n"); + ALOGD("EOCD not found, not Zip\n"); result = INVALID_OPERATION; goto bail; } @@ -266,7 +266,7 @@ status_t ZipFile::readCentralDir(void) /* extract eocd values */ result = mEOCD.readBuf(buf + i, readAmount - i); if (result != NO_ERROR) { - LOGD("Failure reading %ld bytes of EOCD values", readAmount - i); + ALOGD("Failure reading %ld bytes of EOCD values", readAmount - i); goto bail; } //mEOCD.dump(); @@ -274,7 +274,7 @@ status_t ZipFile::readCentralDir(void) if (mEOCD.mDiskNumber != 0 || mEOCD.mDiskWithCentralDir != 0 || mEOCD.mNumEntries != mEOCD.mTotalNumEntries) { - LOGD("Archive spanning not supported\n"); + ALOGD("Archive spanning not supported\n"); result = INVALID_OPERATION; goto bail; } @@ -294,7 +294,7 @@ status_t ZipFile::readCentralDir(void) * we're hoping to preserve. */ if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { - LOGD("Failure seeking to central dir offset %ld\n", + ALOGD("Failure seeking to central dir offset %ld\n", mEOCD.mCentralDirOffset); result = UNKNOWN_ERROR; goto bail; @@ -310,7 +310,7 @@ status_t ZipFile::readCentralDir(void) result = pEntry->initFromCDE(mZipFp); if (result != NO_ERROR) { - LOGD("initFromCDE failed\n"); + ALOGD("initFromCDE failed\n"); delete pEntry; goto bail; } @@ -325,12 +325,12 @@ status_t ZipFile::readCentralDir(void) { unsigned char checkBuf[4]; if (fread(checkBuf, 1, 4, mZipFp) != 4) { - LOGD("EOCD check read failed\n"); + ALOGD("EOCD check read failed\n"); result = INVALID_OPERATION; goto bail; } if (ZipEntry::getLongLE(checkBuf) != EndOfCentralDir::kSignature) { - LOGD("EOCD read check failed\n"); + ALOGD("EOCD read check failed\n"); result = UNKNOWN_ERROR; goto bail; } @@ -416,7 +416,7 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, bool failed = false; result = compressFpToFp(mZipFp, inputFp, data, size, &crc); if (result != NO_ERROR) { - LOGD("compression failed, storing\n"); + ALOGD("compression failed, storing\n"); failed = true; } else { /* @@ -427,7 +427,7 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, long src = inputFp ? ftell(inputFp) : size; long dst = ftell(mZipFp) - startPosn; if (dst + (dst / 10) > src) { - LOGD("insufficient compression (src=%ld dst=%ld), storing\n", + ALOGD("insufficient compression (src=%ld dst=%ld), storing\n", src, dst); failed = true; } @@ -449,7 +449,7 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, } if (result != NO_ERROR) { // don't need to truncate; happens in CDE rewrite - LOGD("failed copying data in\n"); + ALOGD("failed copying data in\n"); goto bail; } } @@ -468,14 +468,14 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, scanResult = ZipUtils::examineGzip(inputFp, &method, &uncompressedLen, &compressedLen, &crc); if (!scanResult || method != ZipEntry::kCompressDeflated) { - LOGD("this isn't a deflated gzip file?"); + ALOGD("this isn't a deflated gzip file?"); result = UNKNOWN_ERROR; goto bail; } result = copyPartialFpToFp(mZipFp, inputFp, compressedLen, NULL); if (result != NO_ERROR) { - LOGD("failed copying gzip data in\n"); + ALOGD("failed copying gzip data in\n"); goto bail; } } else { @@ -660,7 +660,7 @@ status_t ZipFile::copyFpToFp(FILE* dstFp, FILE* srcFp, unsigned long* pCRC32) *pCRC32 = crc32(*pCRC32, tmpBuf, count); if (fwrite(tmpBuf, 1, count, dstFp) != count) { - LOGD("fwrite %d bytes failed\n", (int) count); + ALOGD("fwrite %d bytes failed\n", (int) count); return UNKNOWN_ERROR; } } @@ -682,7 +682,7 @@ status_t ZipFile::copyDataToFp(FILE* dstFp, if (size > 0) { *pCRC32 = crc32(*pCRC32, (const unsigned char*)data, size); if (fwrite(data, 1, size, dstFp) != size) { - LOGD("fwrite %d bytes failed\n", (int) size); + ALOGD("fwrite %d bytes failed\n", (int) size); return UNKNOWN_ERROR; } } @@ -716,7 +716,7 @@ status_t ZipFile::copyPartialFpToFp(FILE* dstFp, FILE* srcFp, long length, count = fread(tmpBuf, 1, readSize, srcFp); if ((long) count != readSize) { // error or unexpected EOF - LOGD("fread %d bytes failed\n", (int) readSize); + ALOGD("fread %d bytes failed\n", (int) readSize); return UNKNOWN_ERROR; } @@ -724,7 +724,7 @@ status_t ZipFile::copyPartialFpToFp(FILE* dstFp, FILE* srcFp, long length, *pCRC32 = crc32(*pCRC32, tmpBuf, count); if (fwrite(tmpBuf, 1, count, dstFp) != count) { - LOGD("fwrite %d bytes failed\n", (int) count); + ALOGD("fwrite %d bytes failed\n", (int) count); return UNKNOWN_ERROR; } @@ -783,7 +783,7 @@ status_t ZipFile::compressFpToFp(FILE* dstFp, FILE* srcFp, LOGE("Installed zlib is not compatible with linked version (%s)\n", ZLIB_VERSION); } else { - LOGD("Call to deflateInit2 failed (zerr=%d)\n", zerr); + ALOGD("Call to deflateInit2 failed (zerr=%d)\n", zerr); } goto bail; } @@ -808,7 +808,7 @@ status_t ZipFile::compressFpToFp(FILE* dstFp, FILE* srcFp, } else { getSize = fread(inBuf, 1, kBufSize, srcFp); if (ferror(srcFp)) { - LOGD("deflate read failed (errno=%d)\n", errno); + ALOGD("deflate read failed (errno=%d)\n", errno); goto z_bail; } } @@ -831,7 +831,7 @@ status_t ZipFile::compressFpToFp(FILE* dstFp, FILE* srcFp, zerr = deflate(&zstream, flush); if (zerr != Z_OK && zerr != Z_STREAM_END) { - LOGD("zlib deflate call failed (zerr=%d)\n", zerr); + ALOGD("zlib deflate call failed (zerr=%d)\n", zerr); result = UNKNOWN_ERROR; goto z_bail; } @@ -844,7 +844,7 @@ status_t ZipFile::compressFpToFp(FILE* dstFp, FILE* srcFp, if (fwrite(outBuf, 1, zstream.next_out - outBuf, dstFp) != (size_t)(zstream.next_out - outBuf)) { - LOGD("write %d failed in deflate\n", + ALOGD("write %d failed in deflate\n", (int) (zstream.next_out - outBuf)); goto z_bail; } @@ -1061,23 +1061,23 @@ status_t ZipFile::filemove(FILE* fp, off_t dst, off_t src, size_t n) getSize = n; if (fseek(fp, (long) src, SEEK_SET) != 0) { - LOGD("filemove src seek %ld failed\n", (long) src); + ALOGD("filemove src seek %ld failed\n", (long) src); return UNKNOWN_ERROR; } if (fread(readBuf, 1, getSize, fp) != getSize) { - LOGD("filemove read %ld off=%ld failed\n", + ALOGD("filemove read %ld off=%ld failed\n", (long) getSize, (long) src); return UNKNOWN_ERROR; } if (fseek(fp, (long) dst, SEEK_SET) != 0) { - LOGD("filemove dst seek %ld failed\n", (long) dst); + ALOGD("filemove dst seek %ld failed\n", (long) dst); return UNKNOWN_ERROR; } if (fwrite(readBuf, 1, getSize, fp) != getSize) { - LOGD("filemove write %ld off=%ld failed\n", + ALOGD("filemove write %ld off=%ld failed\n", (long) getSize, (long) dst); return UNKNOWN_ERROR; } @@ -1104,7 +1104,7 @@ time_t ZipFile::getModTime(int fd) struct stat sb; if (fstat(fd, &sb) < 0) { - LOGD("HEY: fstat on fd %d failed\n", fd); + ALOGD("HEY: fstat on fd %d failed\n", fd); return (time_t) -1; } @@ -1129,7 +1129,7 @@ int ZipFile::getZipFd(void) const int fd; fd = dup(fileno(mZipFp)); if (fd < 0) { - LOGD("didn't work, errno=%d\n", errno); + ALOGD("didn't work, errno=%d\n", errno); } return fd; @@ -1224,7 +1224,7 @@ status_t ZipFile::EndOfCentralDir::readBuf(const unsigned char* buf, int len) if (len < kEOCDLen) { /* looks like ZIP file got truncated */ - LOGD(" Zip EOCD: expected >= %d bytes, found %d\n", + ALOGD(" Zip EOCD: expected >= %d bytes, found %d\n", kEOCDLen, len); return INVALID_OPERATION; } @@ -1245,7 +1245,7 @@ status_t ZipFile::EndOfCentralDir::readBuf(const unsigned char* buf, int len) if (mCommentLen > 0) { if (kEOCDLen + mCommentLen > len) { - LOGD("EOCD(%d) + comment(%d) exceeds len (%d)\n", + ALOGD("EOCD(%d) + comment(%d) exceeds len (%d)\n", kEOCDLen, mCommentLen, len); return UNKNOWN_ERROR; } @@ -1288,10 +1288,10 @@ status_t ZipFile::EndOfCentralDir::write(FILE* fp) */ void ZipFile::EndOfCentralDir::dump(void) const { - LOGD(" EndOfCentralDir contents:\n"); - LOGD(" diskNum=%u diskWCD=%u numEnt=%u totalNumEnt=%u\n", + ALOGD(" EndOfCentralDir contents:\n"); + ALOGD(" diskNum=%u diskWCD=%u numEnt=%u totalNumEnt=%u\n", mDiskNumber, mDiskWithCentralDir, mNumEntries, mTotalNumEntries); - LOGD(" centDirSize=%lu centDirOff=%lu commentLen=%u\n", + ALOGD(" centDirSize=%lu centDirOff=%lu commentLen=%u\n", mCentralDirSize, mCentralDirOffset, mCommentLen); } diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp index 6f8a232..270b494 100644 --- a/voip/jni/rtp/AudioGroup.cpp +++ b/voip/jni/rtp/AudioGroup.cpp @@ -159,7 +159,7 @@ AudioStream::~AudioStream() close(mSocket); delete mCodec; delete [] mBuffer; - LOGD("stream[%d] is dead", mSocket); + ALOGD("stream[%d] is dead", mSocket); } bool AudioStream::set(int mode, int socket, sockaddr_storage *remote, @@ -218,7 +218,7 @@ bool AudioStream::set(int mode, int socket, sockaddr_storage *remote, } } - LOGD("stream[%d] is configured as %s %dkHz %dms mode %d", mSocket, + ALOGD("stream[%d] is configured as %s %dkHz %dms mode %d", mSocket, (codec ? codec->name : "RAW"), mSampleRate, mInterval, mMode); return true; } @@ -566,7 +566,7 @@ AudioGroup::~AudioGroup() delete mChain; mChain = next; } - LOGD("group[%d] is dead", mDeviceSocket); + ALOGD("group[%d] is dead", mDeviceSocket); } bool AudioGroup::set(int sampleRate, int sampleCount) @@ -616,7 +616,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount) } // Anything else? - LOGD("stream[%d] joins group[%d]", pair[1], pair[0]); + ALOGD("stream[%d] joins group[%d]", pair[1], pair[0]); return true; } @@ -639,7 +639,7 @@ bool AudioGroup::setMode(int mode) } mDeviceThread->requestExitAndWait(); - LOGD("group[%d] switches from mode %d to %d", mDeviceSocket, mMode, mode); + ALOGD("group[%d] switches from mode %d to %d", mDeviceSocket, mMode, mode); mMode = mode; return (mode == ON_HOLD) || mDeviceThread->start(); } @@ -687,7 +687,7 @@ bool AudioGroup::add(AudioStream *stream) return false; } - LOGD("stream[%d] joins group[%d]", stream->mSocket, mDeviceSocket); + ALOGD("stream[%d] joins group[%d]", stream->mSocket, mDeviceSocket); return true; } @@ -703,7 +703,7 @@ bool AudioGroup::remove(int socket) return false; } stream->mNext = target->mNext; - LOGD("stream[%d] leaves group[%d]", socket, mDeviceSocket); + ALOGD("stream[%d] leaves group[%d]", socket, mDeviceSocket); delete target; break; } @@ -795,7 +795,7 @@ bool AudioGroup::DeviceThread::threadLoop() LOGE("cannot compute frame count"); return false; } - LOGD("reported frame count: output %d, input %d", output, input); + ALOGD("reported frame count: output %d, input %d", output, input); if (output < sampleCount * 2) { output = sampleCount * 2; @@ -803,7 +803,7 @@ bool AudioGroup::DeviceThread::threadLoop() if (input < sampleCount * 2) { input = sampleCount * 2; } - LOGD("adjusted frame count: output %d, input %d", output, input); + ALOGD("adjusted frame count: output %d, input %d", output, input); // Initialize AudioTrack and AudioRecord. AudioTrack track; @@ -815,7 +815,7 @@ bool AudioGroup::DeviceThread::threadLoop() LOGE("cannot initialize audio device"); return false; } - LOGD("latency: output %d, input %d", track.latency(), record.latency()); + ALOGD("latency: output %d, input %d", track.latency(), record.latency()); // Give device socket a reasonable buffer size. setsockopt(deviceSocket, SOL_SOCKET, SO_RCVBUF, &output, sizeof(output)); |