Skip to content

Commit ba7f0d2

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"
2 parents ee4618b + 1afd5ba commit ba7f0d2

File tree

135 files changed

+821
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+821
-821
lines changed

cmds/bootanimation/BootAnimation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ sp<SurfaceComposerClient> BootAnimation::session() const {
8383
void BootAnimation::binderDied(const wp<IBinder>& who)
8484
{
8585
// woah, surfaceflinger died!
86-
LOGD("SurfaceFlinger died, exiting...");
86+
ALOGD("SurfaceFlinger died, exiting...");
8787

8888
// calling requestExit() is not enough here because the Surface code
8989
// might be blocked on a condition variable that will never be updated.
@@ -394,13 +394,13 @@ bool BootAnimation::movie()
394394
int fps, width, height, count, pause;
395395
char path[256];
396396
if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) {
397-
//LOGD("> w=%d, h=%d, fps=%d", fps, width, height);
397+
//ALOGD("> w=%d, h=%d, fps=%d", fps, width, height);
398398
animation.width = width;
399399
animation.height = height;
400400
animation.fps = fps;
401401
}
402402
if (sscanf(l, "p %d %d %s", &count, &pause, path) == 3) {
403-
//LOGD("> count=%d, pause=%d, path=%s", count, pause, path);
403+
//ALOGD("> count=%d, pause=%d, path=%s", count, pause, path);
404404
Animation::Part part;
405405
part.count = count;
406406
part.pause = pause;

core/jni/ActivityManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int openContentProviderFile(const String16& uri)
4848
}
4949
} else {
5050
// An exception was thrown back; fall through to return failure
51-
LOGD("openContentUri(%s) caught exception %d\n",
51+
ALOGD("openContentUri(%s) caught exception %d\n",
5252
String8(uri).string(), exceptionCode);
5353
}
5454
}

core/jni/AndroidRuntime.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ status_t AndroidRuntime::callMain(const char* className,
286286
JNIEnv* env;
287287
jmethodID methodId;
288288

289-
LOGD("Calling main entry %s", className);
289+
ALOGD("Calling main entry %s", className);
290290

291291
env = getJNIEnv();
292292
if (clazz == NULL || env == NULL) {
@@ -416,7 +416,7 @@ static void readLocale(char* language, char* region)
416416
}
417417
strncat(language, propLang, 2);
418418
strncat(region, propRegn, 2);
419-
//LOGD("language=%s region=%s\n", language, region);
419+
//ALOGD("language=%s region=%s\n", language, region);
420420
}
421421

422422
/*
@@ -629,7 +629,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
629629
"-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y";
630630
mOptions.add(opt);
631631

632-
LOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
632+
ALOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
633633
if (checkJni) {
634634
/* extended JNI checking */
635635
opt.optionString = "-Xcheck:jni";
@@ -798,7 +798,7 @@ char* AndroidRuntime::toSlashClassName(const char* className)
798798
*/
799799
void AndroidRuntime::start(const char* className, const char* options)
800800
{
801-
LOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n",
801+
ALOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n",
802802
className != NULL ? className : "(unknown)");
803803

804804
blockSigpipe();
@@ -825,7 +825,7 @@ void AndroidRuntime::start(const char* className, const char* options)
825825
}
826826

827827
//const char* kernelHack = getenv("LD_ASSUME_KERNEL");
828-
//LOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);
828+
//ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);
829829

830830
/* start the virtual machine */
831831
JNIEnv* env;
@@ -888,7 +888,7 @@ void AndroidRuntime::start(const char* className, const char* options)
888888
}
889889
free(slashClassName);
890890

891-
LOGD("Shutting down VM\n");
891+
ALOGD("Shutting down VM\n");
892892
if (mJavaVM->DetachCurrentThread() != JNI_OK)
893893
LOGW("Warning: unable to detach main thread\n");
894894
if (mJavaVM->DestroyJavaVM() != 0)
@@ -1064,7 +1064,7 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env
10641064
for (size_t i = 0; i < count; i++) {
10651065
if (array[i].mProc(env) < 0) {
10661066
#ifndef NDEBUG
1067-
LOGD("----------!!! %s failed to load\n", array[i].mName);
1067+
ALOGD("----------!!! %s failed to load\n", array[i].mName);
10681068
#endif
10691069
return -1;
10701070
}

core/jni/android/graphics/Canvas.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ class SkCanvasGlue {
442442
#endif
443443
canvas->drawPicture(*picture);
444444
#ifdef TIME_DRAW
445-
LOGD("---- picture playback %d ms\n", get_thread_msec() - now);
445+
ALOGD("---- picture playback %d ms\n", get_thread_msec() - now);
446446
#endif
447447
}
448448

core/jni/android/graphics/HarfbuzzSkia.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void glyphsToAdvances(HB_Font hbFont, const HB_Glyph* glyphs, hb_uint32 n
9898
for (unsigned i = 0; i < numGlyphs; ++i) {
9999
advances[i] = SkScalarToHBFixed(scalarAdvances[i]);
100100
#if DEBUG_ADVANCES
101-
LOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]);
101+
ALOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]);
102102
#endif
103103
}
104104
delete glyphs16;

core/jni/android/graphics/TextLayout.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void TextLayout::computeAdvancesWithICU(SkPaint* paint, const UChar* chars,
350350
jfloat totalAdvance = 0;
351351
if (widths < count) {
352352
#if DEBUG_ADVANCES
353-
LOGD("ICU -- count=%d", widths);
353+
ALOGD("ICU -- count=%d", widths);
354354
#endif
355355
// Skia operates on code points, not code units, so surrogate pairs return only
356356
// 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,
367367
outAdvances[p++] = 0;
368368
}
369369
#if DEBUG_ADVANCES
370-
LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
370+
ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
371371
#endif
372372
}
373373
} else {
374374
#if DEBUG_ADVANCES
375-
LOGD("ICU -- count=%d", count);
375+
ALOGD("ICU -- count=%d", count);
376376
#endif
377377
for (size_t i = 0; i < count; i++) {
378378
totalAdvance += outAdvances[i] = SkScalarToFloat(scalarArray[i]);
379379
#if DEBUG_ADVANCES
380-
LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
380+
ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
381381
#endif
382382
}
383383
}

core/jni/android/graphics/TextLayoutCache.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ void TextLayoutCache::init() {
4747

4848
mDebugLevel = readRtlDebugLevel();
4949
mDebugEnabled = mDebugLevel & kRtlDebugCaches;
50-
LOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled);
50+
ALOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled);
5151

5252
mCacheStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
5353

5454
if (mDebugEnabled) {
55-
LOGD("Initialization is done - Start time: %lld", mCacheStartTime);
55+
ALOGD("Initialization is done - Start time: %lld", mCacheStartTime);
5656
}
5757

5858
mInitialized = true;
@@ -89,7 +89,7 @@ void TextLayoutCache::operator()(TextLayoutCacheKey& text, sp<TextLayoutCacheVal
8989
size_t totalSizeToDelete = text.getSize() + desc->getSize();
9090
mSize -= totalSizeToDelete;
9191
if (mDebugEnabled) {
92-
LOGD("Cache value deleted, size = %d", totalSizeToDelete);
92+
ALOGD("Cache value deleted, size = %d", totalSizeToDelete);
9393
}
9494
desc.clear();
9595
}
@@ -138,7 +138,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
138138
// Cleanup to make some room if needed
139139
if (mSize + size > mMaxSize) {
140140
if (mDebugEnabled) {
141-
LOGD("Need to clean some entries for making some room for a new entry");
141+
ALOGD("Need to clean some entries for making some room for a new entry");
142142
}
143143
while (mSize + size > mMaxSize) {
144144
// This will call the callback
@@ -157,15 +157,15 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
157157
// Update timing information for statistics
158158
value->setElapsedTime(endTime - startTime);
159159

160-
LOGD("CACHE MISS: Added entry with "
160+
ALOGD("CACHE MISS: Added entry with "
161161
"count=%d, entry size %d bytes, remaining space %d bytes"
162162
" - Compute time in nanos: %d - Text='%s' ",
163163
count, size, mMaxSize - mSize, value->getElapsedTime(),
164164
String8(text, count).string());
165165
}
166166
} else {
167167
if (mDebugEnabled) {
168-
LOGD("CACHE MISS: Calculated but not storing entry because it is too big "
168+
ALOGD("CACHE MISS: Calculated but not storing entry because it is too big "
169169
"with start=%d count=%d contextCount=%d, "
170170
"entry size %d bytes, remaining space %d bytes"
171171
" - Compute time in nanos: %lld - Text='%s'",
@@ -184,7 +184,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
184184
if (value->getElapsedTime() > 0) {
185185
float deltaPercent = 100 * ((value->getElapsedTime() - elapsedTimeThruCacheGet)
186186
/ ((float)value->getElapsedTime()));
187-
LOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d"
187+
ALOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d"
188188
"- Compute time in nanos: %d - "
189189
"Cache get time in nanos: %lld - Gain in percent: %2.2f - Text='%s' ",
190190
mCacheHitCount, start, count, contextCount,
@@ -202,17 +202,17 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
202202
void TextLayoutCache::dumpCacheStats() {
203203
float remainingPercent = 100 * ((mMaxSize - mSize) / ((float)mMaxSize));
204204
float timeRunningInSec = (systemTime(SYSTEM_TIME_MONOTONIC) - mCacheStartTime) / 1000000000;
205-
LOGD("------------------------------------------------");
206-
LOGD("Cache stats");
207-
LOGD("------------------------------------------------");
208-
LOGD("pid : %d", getpid());
209-
LOGD("running : %.0f seconds", timeRunningInSec);
210-
LOGD("entries : %d", mCache.size());
211-
LOGD("size : %d bytes", mMaxSize);
212-
LOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent);
213-
LOGD("hits : %d", mCacheHitCount);
214-
LOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000);
215-
LOGD("------------------------------------------------");
205+
ALOGD("------------------------------------------------");
206+
ALOGD("Cache stats");
207+
ALOGD("------------------------------------------------");
208+
ALOGD("pid : %d", getpid());
209+
ALOGD("running : %.0f seconds", timeRunningInSec);
210+
ALOGD("entries : %d", mCache.size());
211+
ALOGD("size : %d bytes", mMaxSize);
212+
ALOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent);
213+
ALOGD("hits : %d", mCacheHitCount);
214+
ALOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000);
215+
ALOGD("------------------------------------------------");
216216
}
217217

218218
/**
@@ -320,7 +320,7 @@ void TextLayoutCacheValue::computeValues(SkPaint* paint, const UChar* chars,
320320
computeValuesWithHarfbuzz(paint, chars, start, count, contextCount, dirFlags,
321321
&mAdvances, &mTotalAdvance, &mGlyphs);
322322
#if DEBUG_ADVANCES
323-
LOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count,
323+
ALOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count,
324324
contextCount, mTotalAdvance);
325325
#endif
326326
}
@@ -435,14 +435,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
435435
if (bidi) {
436436
UErrorCode status = U_ZERO_ERROR;
437437
#if DEBUG_GLYPHS
438-
LOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq);
438+
ALOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq);
439439
#endif
440440
ubidi_setPara(bidi, chars, contextCount, bidiReq, NULL, &status);
441441
if (U_SUCCESS(status)) {
442442
int paraDir = ubidi_getParaLevel(bidi) & kDirection_Mask; // 0 if ltr, 1 if rtl
443443
ssize_t rc = ubidi_countRuns(bidi, &status);
444444
#if DEBUG_GLYPHS
445-
LOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d",
445+
ALOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d",
446446
dirFlags, rc, paraDir);
447447
#endif
448448
if (U_SUCCESS(status) && rc == 1) {
@@ -490,7 +490,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
490490
isRTL = (runDir == UBIDI_RTL);
491491
jfloat runTotalAdvance = 0;
492492
#if DEBUG_GLYPHS
493-
LOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d",
493+
ALOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d",
494494
startRun, lengthRun, isRTL);
495495
#endif
496496
computeRunValuesWithHarfbuzz(shaperItem, paint,
@@ -516,7 +516,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
516516
// Default single run case
517517
if (useSingleRun){
518518
#if DEBUG_GLYPHS
519-
LOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run "
519+
ALOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run "
520520
"-- run-start=%d run-len=%d isRTL=%d", start, count, isRTL);
521521
#endif
522522
computeRunValuesWithHarfbuzz(shaperItem, paint,
@@ -528,14 +528,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
528528
freeShaperItem(shaperItem);
529529

530530
#if DEBUG_GLYPHS
531-
LOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size());
531+
ALOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size());
532532
#endif
533533
}
534534

535535
static void logGlyphs(HB_ShaperItem shaperItem) {
536-
LOGD("Got glyphs - count=%d", shaperItem.num_glyphs);
536+
ALOGD("Got glyphs - count=%d", shaperItem.num_glyphs);
537537
for (size_t i = 0; i < shaperItem.num_glyphs; i++) {
538-
LOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i],
538+
ALOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i],
539539
HBFixedToFloat(shaperItem.offsets[i].x),
540540
HBFixedToFloat(shaperItem.offsets[i].y));
541541
}
@@ -553,17 +553,17 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte
553553
shapeRun(shaperItem, start, count, isRTL);
554554

555555
#if DEBUG_GLYPHS
556-
LOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs,
556+
ALOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs,
557557
shaperItem.kerning_applied);
558-
LOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string());
559-
LOGD(" -- isDevKernText=%d", paint->isDevKernText());
558+
ALOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string());
559+
ALOGD(" -- isDevKernText=%d", paint->isDevKernText());
560560

561561
logGlyphs(shaperItem);
562562
#endif
563563

564564
if (shaperItem.advances == NULL || shaperItem.num_glyphs == 0) {
565565
#if DEBUG_GLYPHS
566-
LOGD("HARFBUZZ -- advances array is empty or num_glypth = 0");
566+
ALOGD("HARFBUZZ -- advances array is empty or num_glypth = 0");
567567
#endif
568568
outAdvances->insertAt(0, outAdvances->size(), count);
569569
*outTotalAdvance = 0;
@@ -589,7 +589,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte
589589

590590
#if DEBUG_ADVANCES
591591
for (size_t i = 0; i < count; i++) {
592-
LOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i,
592+
ALOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i,
593593
(*outAdvances)[i], shaperItem.log_clusters[i], totalAdvance);
594594
}
595595
#endif
@@ -600,7 +600,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte
600600
for (size_t i = 0; i < countGlyphs; i++) {
601601
jchar glyph = (jchar) shaperItem.glyphs[(!isRTL) ? i : countGlyphs - 1 - i];
602602
#if DEBUG_GLYPHS
603-
LOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph);
603+
ALOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph);
604604
#endif
605605
outGlyphs->add(glyph);
606606
}

core/jni/android_app_NativeActivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static const char* const kNativeActivityPathName = "android/app/NativeActivity";
10601060

10611061
int register_android_app_NativeActivity(JNIEnv* env)
10621062
{
1063-
//LOGD("register_android_app_NativeActivity");
1063+
//ALOGD("register_android_app_NativeActivity");
10641064
jclass clazz;
10651065
FIND_CLASS(clazz, kNativeActivityPathName);
10661066

core/jni/android_backup_BackupDataInput.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ readNextHeader_native(JNIEnv* env, jobject clazz, int r, jobject entity)
8080
return 0;
8181
}
8282
default:
83-
LOGD("Unknown header type: 0x%08x\n", type);
83+
ALOGD("Unknown header type: 0x%08x\n", type);
8484
return -1;
8585
}
8686

@@ -133,7 +133,7 @@ static const JNINativeMethod g_methods[] = {
133133

134134
int register_android_backup_BackupDataInput(JNIEnv* env)
135135
{
136-
//LOGD("register_android_backup_BackupDataInput");
136+
//ALOGD("register_android_backup_BackupDataInput");
137137

138138
jclass clazz = env->FindClass("android/app/backup/BackupDataInput$EntityHeader");
139139
LOG_FATAL_IF(clazz == NULL, "Unable to find class android.app.backup.BackupDataInput.EntityHeader");

core/jni/android_backup_BackupDataOutput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static const JNINativeMethod g_methods[] = {
107107

108108
int register_android_backup_BackupDataOutput(JNIEnv* env)
109109
{
110-
//LOGD("register_android_backup_BackupDataOutput");
110+
//ALOGD("register_android_backup_BackupDataOutput");
111111
return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupDataOutput",
112112
g_methods, NELEM(g_methods));
113113
}

0 commit comments

Comments
 (0)