Skip to content

Commit ee4618b

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge "Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)"
2 parents c318bbb + 06ade6a commit ee4618b

File tree

200 files changed

+3143
-3143
lines changed

Some content is hidden

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

200 files changed

+3143
-3143
lines changed

cmds/app_process/app_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class AppRuntime : public AndroidRuntime
8282
virtual void onStarted()
8383
{
8484
sp<ProcessState> proc = ProcessState::self();
85-
LOGV("App process: starting thread pool.\n");
85+
ALOGV("App process: starting thread pool.\n");
8686
proc->startThreadPool();
8787

8888
AndroidRuntime* ar = AndroidRuntime::getRuntime();
@@ -94,7 +94,7 @@ class AppRuntime : public AndroidRuntime
9494
virtual void onZygoteInit()
9595
{
9696
sp<ProcessState> proc = ProcessState::self();
97-
LOGV("App process: starting thread pool.\n");
97+
ALOGV("App process: starting thread pool.\n");
9898
proc->startThreadPool();
9999
}
100100

cmds/installd/commands.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int move_dex(const char *src, const char *dst)
243243
if (create_cache_path(src_dex, src)) return -1;
244244
if (create_cache_path(dst_dex, dst)) return -1;
245245

246-
LOGV("move %s -> %s\n", src_dex, dst_dex);
246+
ALOGV("move %s -> %s\n", src_dex, dst_dex);
247247
if (rename(src_dex, dst_dex) < 0) {
248248
LOGE("Couldn't move %s: %s\n", src_dex, strerror(errno));
249249
return -1;
@@ -259,7 +259,7 @@ int rm_dex(const char *path)
259259
if (validate_apk_path(path)) return -1;
260260
if (create_cache_path(dex_path, path)) return -1;
261261

262-
LOGV("unlink %s\n", dex_path);
262+
ALOGV("unlink %s\n", dex_path);
263263
if (unlink(dex_path) < 0) {
264264
LOGE("Couldn't unlink %s: %s\n", dex_path, strerror(errno));
265265
return -1;
@@ -469,7 +469,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path)
469469
}
470470

471471
if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
472-
LOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
472+
ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
473473
return 0;
474474
} else {
475475
LOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
@@ -536,7 +536,7 @@ int dexopt(const char *apk_path, uid_t uid, int is_public)
536536
goto fail;
537537
}
538538

539-
LOGV("DexInv: --- BEGIN '%s' ---\n", apk_path);
539+
ALOGV("DexInv: --- BEGIN '%s' ---\n", apk_path);
540540

541541
pid_t pid;
542542
pid = fork();
@@ -591,7 +591,7 @@ void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid,
591591
if (path[basepos] == '/') {
592592
path[basepos] = 0;
593593
if (lstat(path, statbuf) < 0) {
594-
LOGV("Making directory: %s\n", path);
594+
ALOGV("Making directory: %s\n", path);
595595
if (mkdir(path, mode) == 0) {
596596
chown(path, uid, gid);
597597
} else {
@@ -623,7 +623,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
623623
if ((statbuf->st_mode&S_IFDIR) == 0) {
624624
mkinnerdirs(dstpath, dstbasepos, S_IRWXU|S_IRWXG|S_IXOTH,
625625
dstuid, dstgid, statbuf);
626-
LOGV("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
626+
ALOGV("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
627627
if (rename(srcpath, dstpath) >= 0) {
628628
if (chown(dstpath, dstuid, dstgid) < 0) {
629629
LOGE("cannot chown %s: %s\n", dstpath, strerror(errno));
@@ -732,7 +732,7 @@ int movefiles()
732732
}
733733
if (bufi < bufe) {
734734
buf[bufi] = 0;
735-
LOGV("Processing line: %s\n", buf+bufp);
735+
ALOGV("Processing line: %s\n", buf+bufp);
736736
hasspace = 0;
737737
while (bufp < bufi && isspace(buf[bufp])) {
738738
hasspace = 1;
@@ -747,7 +747,7 @@ int movefiles()
747747
} else if (srcpkg[0] == 0) {
748748
// Skip -- source package no longer exists.
749749
} else {
750-
LOGV("Move file: %s (from %s to %s)\n", buf+bufp, srcpkg, dstpkg);
750+
ALOGV("Move file: %s (from %s to %s)\n", buf+bufp, srcpkg, dstpkg);
751751
if (!create_move_path(srcpath, srcpkg, buf+bufp, 0) &&
752752
!create_move_path(dstpath, dstpkg, buf+bufp, 0)) {
753753
movefileordir(srcpath, dstpath,
@@ -806,7 +806,7 @@ int movefiles()
806806
div, UPDATE_COMMANDS_DIR_PREFIX, name);
807807
}
808808
}
809-
LOGV("Transfering from %s to %s: uid=%d\n",
809+
ALOGV("Transfering from %s to %s: uid=%d\n",
810810
srcpkg, dstpkg, dstuid);
811811
}
812812
}
@@ -833,7 +833,7 @@ int movefiles()
833833
}
834834
bufe += readlen;
835835
buf[bufe] = 0;
836-
LOGV("Read buf: %s\n", buf);
836+
ALOGV("Read buf: %s\n", buf);
837837
}
838838
}
839839
close(subfd);

cmds/stagefright/sf2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ struct Controller : public AHandler {
500500
break; // Don't coalesce
501501
}
502502

503-
LOGV("coalesced %d input buffers", n);
503+
ALOGV("coalesced %d input buffers", n);
504504

505505
if (outBuffer->size() == 0) {
506506
CHECK_NE(mFinalResult, (status_t)OK);

cmds/stagefright/stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ int main(int argc, char **argv) {
308308
ssize_t displayWidth = composerClient->getDisplayWidth(0);
309309
ssize_t displayHeight = composerClient->getDisplayHeight(0);
310310

311-
LOGV("display is %d x %d\n", displayWidth, displayHeight);
311+
ALOGV("display is %d x %d\n", displayWidth, displayHeight);
312312

313313
sp<SurfaceControl> control =
314314
composerClient->createSurface(

core/jni/AndroidRuntime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
708708
opt.optionString = enableAssertBuf;
709709
mOptions.add(opt);
710710
} else {
711-
LOGV("Assertions disabled\n");
711+
ALOGV("Assertions disabled\n");
712712
}
713713

714714
if (jniOptsBuf[10] != '\0') {
@@ -897,7 +897,7 @@ void AndroidRuntime::start(const char* className, const char* options)
897897

898898
void AndroidRuntime::onExit(int code)
899899
{
900-
LOGV("AndroidRuntime onExit calling exit(%d)", code);
900+
ALOGV("AndroidRuntime onExit calling exit(%d)", code);
901901
exit(code);
902902
}
903903

@@ -1217,7 +1217,7 @@ static const RegJNIRec gRegJNI[] = {
12171217
*/
12181218
androidSetCreateThreadFunc((android_create_thread_fn) javaCreateThreadEtc);
12191219

1220-
LOGV("--- registering native functions ---\n");
1220+
ALOGV("--- registering native functions ---\n");
12211221

12221222
/*
12231223
* Every "register" function calls one or more things that return

core/jni/android/graphics/NinePatch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class SkNinePatchGlue {
8282

8383
if (destDensity == srcDensity || destDensity == 0
8484
|| srcDensity == 0) {
85-
LOGV("Drawing unscaled 9-patch: (%g,%g)-(%g,%g)",
85+
ALOGV("Drawing unscaled 9-patch: (%g,%g)-(%g,%g)",
8686
SkScalarToFloat(bounds.fLeft), SkScalarToFloat(bounds.fTop),
8787
SkScalarToFloat(bounds.fRight), SkScalarToFloat(bounds.fBottom));
8888
NinePatch_Draw(canvas, bounds, *bitmap, *chunk, paint, NULL);
@@ -97,7 +97,7 @@ class SkNinePatchGlue {
9797
bounds.fBottom = SkScalarDiv(bounds.fBottom-bounds.fTop, scale);
9898
bounds.fLeft = bounds.fTop = 0;
9999

100-
LOGV("Drawing scaled 9-patch: (%g,%g)-(%g,%g) srcDensity=%d destDensity=%d",
100+
ALOGV("Drawing scaled 9-patch: (%g,%g)-(%g,%g) srcDensity=%d destDensity=%d",
101101
SkScalarToFloat(bounds.fLeft), SkScalarToFloat(bounds.fTop),
102102
SkScalarToFloat(bounds.fRight), SkScalarToFloat(bounds.fBottom),
103103
srcDensity, destDensity);

core/jni/android/graphics/NinePatchImpl.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,18 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
135135
#ifdef USE_TRACE
136136
if (canvas) {
137137
const SkMatrix& m = canvas->getTotalMatrix();
138-
LOGV("ninepatch [%g %g %g] [%g %g %g]\n",
138+
ALOGV("ninepatch [%g %g %g] [%g %g %g]\n",
139139
SkScalarToFloat(m[0]), SkScalarToFloat(m[1]), SkScalarToFloat(m[2]),
140140
SkScalarToFloat(m[3]), SkScalarToFloat(m[4]), SkScalarToFloat(m[5]));
141141
}
142142
#endif
143143

144144
#ifdef USE_TRACE
145145
if (gTrace) {
146-
LOGV("======== ninepatch bounds [%g %g]\n", SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()));
147-
LOGV("======== ninepatch paint bm [%d,%d]\n", bitmap.width(), bitmap.height());
148-
LOGV("======== ninepatch xDivs [%d,%d]\n", chunk.xDivs[0], chunk.xDivs[1]);
149-
LOGV("======== ninepatch yDivs [%d,%d]\n", chunk.yDivs[0], chunk.yDivs[1]);
146+
ALOGV("======== ninepatch bounds [%g %g]\n", SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()));
147+
ALOGV("======== ninepatch paint bm [%d,%d]\n", bitmap.width(), bitmap.height());
148+
ALOGV("======== ninepatch xDivs [%d,%d]\n", chunk.xDivs[0], chunk.xDivs[1]);
149+
ALOGV("======== ninepatch yDivs [%d,%d]\n", chunk.yDivs[0], chunk.yDivs[1]);
150150
}
151151
#endif
152152

@@ -155,7 +155,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
155155
(paint && paint->getXfermode() == NULL && paint->getAlpha() == 0))
156156
{
157157
#ifdef USE_TRACE
158-
if (gTrace) LOGV("======== abort ninepatch draw\n");
158+
if (gTrace) ALOGV("======== abort ninepatch draw\n");
159159
#endif
160160
return;
161161
}
@@ -201,7 +201,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
201201
int numFixedYPixelsRemaining = bitmapHeight - numStretchyYPixelsRemaining;
202202

203203
#ifdef USE_TRACE
204-
LOGV("NinePatch [%d %d] bounds [%g %g %g %g] divs [%d %d]\n",
204+
ALOGV("NinePatch [%d %d] bounds [%g %g %g %g] divs [%d %d]\n",
205205
bitmap.width(), bitmap.height(),
206206
SkScalarToFloat(bounds.fLeft), SkScalarToFloat(bounds.fTop),
207207
SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()),
@@ -305,12 +305,12 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
305305
}
306306
if (canvas) {
307307
#ifdef USE_TRACE
308-
LOGV("-- src [%d %d %d %d] dst [%g %g %g %g]\n",
308+
ALOGV("-- src [%d %d %d %d] dst [%g %g %g %g]\n",
309309
src.fLeft, src.fTop, src.width(), src.height(),
310310
SkScalarToFloat(dst.fLeft), SkScalarToFloat(dst.fTop),
311311
SkScalarToFloat(dst.width()), SkScalarToFloat(dst.height()));
312312
if (2 == src.width() && SkIntToScalar(5) == dst.width()) {
313-
LOGV("--- skip patch\n");
313+
ALOGV("--- skip patch\n");
314314
}
315315
#endif
316316
drawStretchyPatch(canvas, src, dst, bitmap, *paint, initColor,

core/jni/android_bluetooth_BluetoothAudioGateway.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int setup_listening_socket(int dev, int channel);
9090
#endif
9191

9292
static void classInitNative(JNIEnv* env, jclass clazz) {
93-
LOGV("%s", __FUNCTION__);
93+
ALOGV("%s", __FUNCTION__);
9494
#ifdef HAVE_BLUETOOTH
9595

9696
/* in */
@@ -123,7 +123,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) {
123123
}
124124

125125
static void initializeNativeDataNative(JNIEnv* env, jobject object) {
126-
LOGV("%s", __FUNCTION__);
126+
ALOGV("%s", __FUNCTION__);
127127
#ifdef HAVE_BLUETOOTH
128128
native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t));
129129
if (NULL == nat) {
@@ -138,8 +138,8 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
138138
env->GetIntField(object, field_mHandsfreeAgRfcommChannel);
139139
nat->hs_ag_rfcomm_channel =
140140
env->GetIntField(object, field_mHeadsetAgRfcommChannel);
141-
LOGV("HF RFCOMM channel = %d.", nat->hf_ag_rfcomm_channel);
142-
LOGV("HS RFCOMM channel = %d.", nat->hs_ag_rfcomm_channel);
141+
ALOGV("HF RFCOMM channel = %d.", nat->hf_ag_rfcomm_channel);
142+
ALOGV("HS RFCOMM channel = %d.", nat->hs_ag_rfcomm_channel);
143143

144144
/* Set the default values of these to -1. */
145145
env->SetIntField(object, field_mConnectingHeadsetRfcommChannel, -1);
@@ -151,7 +151,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
151151
}
152152

153153
static void cleanupNativeDataNative(JNIEnv* env, jobject object) {
154-
LOGV("%s", __FUNCTION__);
154+
ALOGV("%s", __FUNCTION__);
155155
#ifdef HAVE_BLUETOOTH
156156
native_data_t *nat = get_native_data(env, object);
157157
if (nat) {
@@ -256,7 +256,7 @@ static inline int on_accept_set_fields(JNIEnv* env, jobject object,
256256

257257
static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
258258
jint timeout_ms) {
259-
// LOGV("%s", __FUNCTION__);
259+
// ALOGV("%s", __FUNCTION__);
260260
#ifdef HAVE_BLUETOOTH
261261

262262
env->SetIntField(object, field_mTimeoutRemainingMs, timeout_ms);
@@ -445,7 +445,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
445445
}
446446

447447
static jboolean setUpListeningSocketsNative(JNIEnv* env, jobject object) {
448-
LOGV("%s", __FUNCTION__);
448+
ALOGV("%s", __FUNCTION__);
449449
#ifdef HAVE_BLUETOOTH
450450
native_data_t *nat = get_native_data(env, object);
451451

@@ -511,7 +511,7 @@ static int setup_listening_socket(int dev, int channel) {
511511
private native void tearDownListeningSocketsNative();
512512
*/
513513
static void tearDownListeningSocketsNative(JNIEnv *env, jobject object) {
514-
LOGV("%s", __FUNCTION__);
514+
ALOGV("%s", __FUNCTION__);
515515
#ifdef HAVE_BLUETOOTH
516516
native_data_t *nat = get_native_data(env, object);
517517

0 commit comments

Comments
 (0)