diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-01-19 17:26:12 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-01-19 17:26:12 -0800 |
commit | 12b7da69957ef894ce5134989e38479c64308ea1 (patch) | |
tree | fa6d3798fddee16170c0c49d2b986c11298e8f54 /core | |
parent | f3f650db96d40014a0203393c585c368b0dd7a9a (diff) | |
parent | 6df477be186233e36fc370c4d2db6c1ed928a740 (diff) | |
download | frameworks_base-12b7da69957ef894ce5134989e38479c64308ea1.zip frameworks_base-12b7da69957ef894ce5134989e38479c64308ea1.tar.gz frameworks_base-12b7da69957ef894ce5134989e38479c64308ea1.tar.bz2 |
am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"
* commit '6df477be186233e36fc370c4d2db6c1ed928a740':
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Diffstat (limited to 'core')
48 files changed, 306 insertions, 306 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index f52df1f..1c0d7cf 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -295,7 +295,7 @@ status_t AndroidRuntime::callMain(const char* className, methodId = env->GetStaticMethodID(clazz, "main", "([Ljava/lang/String;)V"); if (methodId == NULL) { - LOGE("ERROR: could not find method %s.main(String[])\n", className); + ALOGE("ERROR: could not find method %s.main(String[])\n", className); return UNKNOWN_ERROR; } @@ -766,7 +766,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) * JNI calls. */ if (JNI_CreateJavaVM(pJavaVM, pEnv, &initArgs) < 0) { - LOGE("JNI_CreateJavaVM failed\n"); + ALOGE("JNI_CreateJavaVM failed\n"); goto bail; } @@ -838,7 +838,7 @@ void AndroidRuntime::start(const char* className, const char* options) * Register android functions. */ if (startReg(env) < 0) { - LOGE("Unable to register all android natives\n"); + ALOGE("Unable to register all android natives\n"); return; } @@ -869,13 +869,13 @@ void AndroidRuntime::start(const char* className, const char* options) char* slashClassName = toSlashClassName(className); jclass startClass = env->FindClass(slashClassName); if (startClass == NULL) { - LOGE("JavaVM unable to locate class '%s'\n", slashClassName); + ALOGE("JavaVM unable to locate class '%s'\n", slashClassName); /* keep going */ } else { jmethodID startMeth = env->GetStaticMethodID(startClass, "main", "([Ljava/lang/String;)V"); if (startMeth == NULL) { - LOGE("JavaVM unable to find main() in '%s'\n", className); + ALOGE("JavaVM unable to find main() in '%s'\n", className); /* keep going */ } else { env->CallStaticVoidMethod(startClass, startMeth, strArray); @@ -961,7 +961,7 @@ static int javaDetachThread(void) result = vm->DetachCurrentThread(); if (result != JNI_OK) - LOGE("ERROR: thread detach failed\n"); + ALOGE("ERROR: thread detach failed\n"); return result; } diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp index 1362fc8..40ac708 100644 --- a/core/jni/android/graphics/Canvas.cpp +++ b/core/jni/android/graphics/Canvas.cpp @@ -770,7 +770,7 @@ public: value = TextLayoutCache::getInstance().getValue(paint, textArray, start, count, contextCount, flags); if (value == NULL) { - LOGE("Cannot get TextLayoutCache value"); + ALOGE("Cannot get TextLayoutCache value"); return ; } #else diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp index 64bd207..47ffd94 100644 --- a/core/jni/android/graphics/Graphics.cpp +++ b/core/jni/android/graphics/Graphics.cpp @@ -40,7 +40,7 @@ void doThrowIOE(JNIEnv* env, const char* msg) { bool GraphicsJNI::hasException(JNIEnv *env) { if (env->ExceptionCheck() != 0) { - LOGE("*** Uncaught exception returned from Java call!\n"); + ALOGE("*** Uncaught exception returned from Java call!\n"); env->ExceptionDescribe(); return true; } diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index 9e697b4..3d350ed 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -112,7 +112,7 @@ JNIEnv* JNISurfaceTextureContext::getJNIEnv(bool* needsDetach) { JavaVM* vm = AndroidRuntime::getJavaVM(); int result = vm->AttachCurrentThread(&env, (void*) &args); if (result != JNI_OK) { - LOGE("thread attach failed: %#x", result); + ALOGE("thread attach failed: %#x", result); return NULL; } *needsDetach = true; @@ -124,7 +124,7 @@ void JNISurfaceTextureContext::detachJNI() { JavaVM* vm = AndroidRuntime::getJavaVM(); int result = vm->DetachCurrentThread(); if (result != JNI_OK) { - LOGE("thread detach failed: %#x", result); + ALOGE("thread detach failed: %#x", result); } } @@ -164,14 +164,14 @@ static void SurfaceTexture_classInit(JNIEnv* env, jclass clazz) fields.surfaceTexture = env->GetFieldID(clazz, ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID, "I"); if (fields.surfaceTexture == NULL) { - LOGE("can't find android/graphics/SurfaceTexture.%s", + ALOGE("can't find android/graphics/SurfaceTexture.%s", ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID); } fields.postEvent = env->GetStaticMethodID(clazz, "postEventFromNative", "(Ljava/lang/Object;)V"); if (fields.postEvent == NULL) { - LOGE("can't find android/graphics/SurfaceTexture.postEventFromNative"); + ALOGE("can't find android/graphics/SurfaceTexture.postEventFromNative"); } } diff --git a/core/jni/android/opengl/util.cpp b/core/jni/android/opengl/util.cpp index 93717f3..929df540 100644 --- a/core/jni/android/opengl/util.cpp +++ b/core/jni/android/opengl/util.cpp @@ -1062,7 +1062,7 @@ int register_android_opengl_classes(JNIEnv* env) result = AndroidRuntime::registerNativeMethods(env, cri->classPath, cri->methods, cri->methodCount); if (result < 0) { - LOGE("Failed to register %s: %d", cri->classPath, result); + ALOGE("Failed to register %s: %d", cri->classPath, result); break; } } diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp index 7f5ba85..ac4fe5b 100644 --- a/core/jni/android_app_NativeActivity.cpp +++ b/core/jni/android_app_NativeActivity.cpp @@ -203,7 +203,7 @@ int32_t AInputQueue::getEvent(AInputEvent** outEvent) { int32_t res = mConsumer.receiveDispatchSignal(); if (res != android::OK) { - LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d", + ALOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d", mConsumer.getChannel()->getName().string(), res); return -1; } @@ -548,7 +548,7 @@ void android_NativeActivity_hideSoftInput( static bool checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); return true; @@ -585,7 +585,7 @@ static int mainWorkCallback(int fd, int events, void* data) { checkAndClearExceptionFromCallback(code->env, "dispatchUnhandledKeyEvent"); code->env->DeleteLocalRef(inputEventObj); } else { - LOGE("Failed to obtain key event for dispatchUnhandledKeyEvent."); + ALOGE("Failed to obtain key event for dispatchUnhandledKeyEvent."); handled = false; } code->nativeInputQueue->finishEvent(keyEvent, handled, true); @@ -600,7 +600,7 @@ static int mainWorkCallback(int fd, int events, void* data) { checkAndClearExceptionFromCallback(code->env, "preDispatchKeyEvent"); code->env->DeleteLocalRef(inputEventObj); } else { - LOGE("Failed to obtain key event for preDispatchKeyEvent."); + ALOGE("Failed to obtain key event for preDispatchKeyEvent."); } } } break; diff --git a/core/jni/android_app_backup_FullBackup.cpp b/core/jni/android_app_backup_FullBackup.cpp index 6ef62a9..066a23e 100644 --- a/core/jni/android_app_backup_FullBackup.cpp +++ b/core/jni/android_app_backup_FullBackup.cpp @@ -97,12 +97,12 @@ static int backupToTar(JNIEnv* env, jobject clazz, jstring packageNameObj, // Validate if (!writer) { - LOGE("No output stream provided [%s]", path.string()); + ALOGE("No output stream provided [%s]", path.string()); return -1; } if (path.length() < rootpath.length()) { - LOGE("file path [%s] shorter than root path [%s]", + ALOGE("file path [%s] shorter than root path [%s]", path.string(), rootpath.string()); return -1; } diff --git a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp index 3a1a13a..3b8fb79 100755 --- a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp +++ b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp @@ -127,7 +127,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) { #ifdef HAVE_BLUETOOTH native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t)); if (NULL == nat) { - LOGE("%s: out of memory!", __FUNCTION__); + ALOGE("%s: out of memory!", __FUNCTION__); return; } @@ -166,7 +166,7 @@ static void cleanupNativeDataNative(JNIEnv* env, jobject object) { static int set_nb(int sk, bool nb) { int flags = fcntl(sk, F_GETFL); if (flags < 0) { - LOGE("Can't get socket flags with fcntl(): %s (%d)", + ALOGE("Can't get socket flags with fcntl(): %s (%d)", strerror(errno), errno); close(sk); return -1; @@ -175,7 +175,7 @@ static int set_nb(int sk, bool nb) { if (nb) flags |= O_NONBLOCK; int status = fcntl(sk, F_SETFL, flags); if (status < 0) { - LOGE("Can't set socket to nonblocking mode with fcntl(): %s (%d)", + ALOGE("Can't set socket to nonblocking mode with fcntl(): %s (%d)", strerror(errno), errno); close(sk); return -1; @@ -198,7 +198,7 @@ static int do_accept(JNIEnv* env, jobject object, int ag_fd, int alen = sizeof(raddr); int nsk = accept(ag_fd, (struct sockaddr *) &raddr, &alen); if (nsk < 0) { - LOGE("Error on accept from socket fd %d: %s (%d).", + ALOGE("Error on accept from socket fd %d: %s (%d).", ag_fd, strerror(errno), errno); @@ -244,7 +244,7 @@ static inline int on_accept_set_fields(JNIEnv* env, jobject object, ag_fd, FD_ISSET(ag_fd, &rset)); if (ag_fd >= 0 && !FD_ISSET(ag_fd, &rset)) { - LOGE("WTF???"); + ALOGE("WTF???"); return -1; } } @@ -271,7 +271,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, int len = sizeof(tv); if (getsockopt(nat->hf_ag_rfcomm_channel, SOL_SOCKET, SO_RCVTIMEO, &tv, &len) < 0) { - LOGE("getsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)", + ALOGE("getsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)", nat->hf_ag_rfcomm_channel, strerror(errno), errno); @@ -284,7 +284,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, tv.tv_usec = 1000 * (timeout_ms % 1000); if (setsockopt(nat->hf_ag_rfcomm_channel, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) { - LOGE("setsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)", + ALOGE("setsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)", nat->hf_ag_rfcomm_channel, strerror(errno), errno); @@ -322,7 +322,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, FD_SET(nat->hs_ag_rfcomm_sock, &rset); } if (cnt == 0) { - LOGE("Neither HF nor HS listening sockets are open!"); + ALOGE("Neither HF nor HS listening sockets are open!"); return JNI_FALSE; } @@ -348,7 +348,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, if (n <= 0) { if (n < 0) { - LOGE("listening select() on RFCOMM sockets: %s (%d)", + ALOGE("listening select() on RFCOMM sockets: %s (%d)", strerror(errno), errno); } @@ -388,13 +388,13 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, cnt++; } if (cnt == 0) { - LOGE("Neither HF nor HS listening sockets are open!"); + ALOGE("Neither HF nor HS listening sockets are open!"); return JNI_FALSE; } n = poll(fds, cnt, timeout_ms); if (n <= 0) { if (n < 0) { - LOGE("listening poll() on RFCOMM sockets: %s (%d)", + ALOGE("listening poll() on RFCOMM sockets: %s (%d)", strerror(errno), errno); } @@ -475,7 +475,7 @@ static int setup_listening_socket(int dev, int channel) { sk = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); if (sk < 0) { - LOGE("Can't create RFCOMM socket"); + ALOGE("Can't create RFCOMM socket"); return -1; } @@ -486,7 +486,7 @@ static int setup_listening_socket(int dev, int channel) { } if (lm && setsockopt(sk, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm)) < 0) { - LOGE("Can't set RFCOMM link mode"); + ALOGE("Can't set RFCOMM link mode"); close(sk); return -1; } @@ -497,7 +497,7 @@ static int setup_listening_socket(int dev, int channel) { laddr.rc_channel = channel; if (bind(sk, (struct sockaddr *)&laddr, sizeof(laddr)) < 0) { - LOGE("Can't bind RFCOMM socket"); + ALOGE("Can't bind RFCOMM socket"); close(sk); return -1; } @@ -517,14 +517,14 @@ static void tearDownListeningSocketsNative(JNIEnv *env, jobject object) { if (nat->hf_ag_rfcomm_sock > 0) { if (close(nat->hf_ag_rfcomm_sock) < 0) { - LOGE("Could not close HF server socket: %s (%d)\n", + ALOGE("Could not close HF server socket: %s (%d)\n", strerror(errno), errno); } nat->hf_ag_rfcomm_sock = -1; } if (nat->hs_ag_rfcomm_sock > 0) { if (close(nat->hs_ag_rfcomm_sock) < 0) { - LOGE("Could not close HS server socket: %s (%d)\n", + ALOGE("Could not close HS server socket: %s (%d)\n", strerror(errno), errno); } nat->hs_ag_rfcomm_sock = -1; diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp index 1f59937..a982182 100644 --- a/core/jni/android_bluetooth_HeadsetBase.cpp +++ b/core/jni/android_bluetooth_HeadsetBase.cpp @@ -69,12 +69,12 @@ static inline int write_error_check(int fd, const char* line, int len) { errno = 0; ret = write(fd, line, len); if (ret < 0) { - LOGE("%s: write() failed: %s (%d)", __FUNCTION__, strerror(errno), + ALOGE("%s: write() failed: %s (%d)", __FUNCTION__, strerror(errno), errno); return -1; } if (ret != len) { - LOGE("%s: write() only wrote %d of %d bytes", __FUNCTION__, ret, len); + ALOGE("%s: write() only wrote %d of %d bytes", __FUNCTION__, ret, len); return -1; } return 0; @@ -117,7 +117,7 @@ again: *err = errno = 0; int ret = poll(&pfd, 1, timeout_ms); if (ret < 0) { - LOGE("poll() error\n"); + ALOGE("poll() error\n"); *err = errno; return NULL; } @@ -148,7 +148,7 @@ again: goto again; } *err = errno; - LOGE("read() error %s (%d)", strerror(errno), errno); + ALOGE("read() error %s (%d)", strerror(errno), errno); return NULL; } @@ -195,7 +195,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object, #ifdef HAVE_BLUETOOTH native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t)); if (NULL == nat) { - LOGE("%s: out of memory!", __FUNCTION__); + ALOGE("%s: out of memory!", __FUNCTION__); return; } @@ -235,7 +235,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj) nat->rfcomm_sock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); if (nat->rfcomm_sock < 0) { - LOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__, + ALOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__, strerror(errno)); return JNI_FALSE; } @@ -248,7 +248,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj) if (lm && setsockopt(nat->rfcomm_sock, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm)) < 0) { - LOGE("%s: Can't set RFCOMM link mode", __FUNCTION__); + ALOGE("%s: Can't set RFCOMM link mode", __FUNCTION__); close(nat->rfcomm_sock); return JNI_FALSE; } @@ -262,7 +262,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj) if (connect(nat->rfcomm_sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { if (errno == EINTR) continue; - LOGE("%s: connect() failed: %s\n", __FUNCTION__, strerror(errno)); + ALOGE("%s: connect() failed: %s\n", __FUNCTION__, strerror(errno)); close(nat->rfcomm_sock); nat->rfcomm_sock = -1; return JNI_FALSE; @@ -293,7 +293,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) { nat->rfcomm_sock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); if (nat->rfcomm_sock < 0) { - LOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__, + ALOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__, strerror(errno)); return -1; } @@ -306,7 +306,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) { if (lm && setsockopt(nat->rfcomm_sock, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm)) < 0) { - LOGE("%s: Can't set RFCOMM link mode", __FUNCTION__); + ALOGE("%s: Can't set RFCOMM link mode", __FUNCTION__); close(nat->rfcomm_sock); return -1; } @@ -343,7 +343,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) { } else { - LOGE("async connect error: %s (%d)", strerror(errno), errno); + ALOGE("async connect error: %s (%d)", strerror(errno), errno); close(nat->rfcomm_sock); nat->rfcomm_sock = -1; return -errno; @@ -410,7 +410,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj, if (n <= 0) { if (n < 0) { - LOGE("select() on RFCOMM socket: %s (%d)", + ALOGE("select() on RFCOMM socket: %s (%d)", strerror(errno), errno); return -errno; @@ -433,7 +433,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj, respond... but one can't be paranoid enough. */ if (nr >= 0 || errno != EAGAIN) { - LOGE("RFCOMM async connect() error: %s (%d), nr = %d\n", + ALOGE("RFCOMM async connect() error: %s (%d), nr = %d\n", strerror(errno), errno, nr); @@ -456,7 +456,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj, return 1; } } - else LOGE("RFCOMM socket file descriptor %d is bad!", + else ALOGE("RFCOMM socket file descriptor %d is bad!", nat->rfcomm_sock); #endif return -1; diff --git a/core/jni/android_bluetooth_common.cpp b/core/jni/android_bluetooth_common.cpp index c8dc9c2..5cdaa6c 100644 --- a/core/jni/android_bluetooth_common.cpp +++ b/core/jni/android_bluetooth_common.cpp @@ -101,7 +101,7 @@ jfieldID get_field(JNIEnv *env, jclass clazz, const char *member, const char *mtype) { jfieldID field = env->GetFieldID(clazz, member, mtype); if (field == NULL) { - LOGE("Can't find member %s", member); + ALOGE("Can't find member %s", member); } return field; } @@ -158,13 +158,13 @@ static dbus_bool_t dbus_func_args_async_valist(JNIEnv *env, msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC, path, ifc, func); if (msg == NULL) { - LOGE("Could not allocate D-Bus message object!"); + ALOGE("Could not allocate D-Bus message object!"); goto done; } /* append arguments */ if (!dbus_message_append_args_valist(msg, first_arg_type, args)) { - LOGE("Could not append argument to method call!"); + ALOGE("Could not append argument to method call!"); goto done; } @@ -219,7 +219,7 @@ dbus_bool_t dbus_func_args_async(JNIEnv *env, return ret; } -// If err is NULL, then any errors will be LOGE'd, and free'd and the reply +// If err is NULL, then any errors will be ALOGE'd, and free'd and the reply // will be NULL. // If err is not NULL, then it is assumed that dbus_error_init was already // called, and error's will be returned to the caller without logging. The @@ -248,13 +248,13 @@ DBusMessage * dbus_func_args_timeout_valist(JNIEnv *env, msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC, path, ifc, func); if (msg == NULL) { - LOGE("Could not allocate D-Bus message object!"); + ALOGE("Could not allocate D-Bus message object!"); goto done; } /* append arguments */ if (!dbus_message_append_args_valist(msg, first_arg_type, args)) { - LOGE("Could not append argument to method call!"); + ALOGE("Could not append argument to method call!"); goto done; } @@ -587,7 +587,7 @@ int get_property(DBusMessageIter iter, Properties *properties, dbus_message_iter_recurse(&iter, &prop_val); type = properties[*prop_index].type; if (dbus_message_iter_get_arg_type(&prop_val) != type) { - LOGE("Property type mismatch in get_property: %d, expected:%d, index:%d", + ALOGE("Property type mismatch in get_property: %d, expected:%d, index:%d", dbus_message_iter_get_arg_type(&prop_val), type, *prop_index); return -1; } diff --git a/core/jni/android_bluetooth_common.h b/core/jni/android_bluetooth_common.h index 1f4da3a..daf4bb2 100644 --- a/core/jni/android_bluetooth_common.h +++ b/core/jni/android_bluetooth_common.h @@ -56,14 +56,14 @@ jfieldID get_field(JNIEnv *env, const char *member, const char *mtype); -// LOGE and free a D-Bus error +// ALOGE and free a D-Bus error // Using #define so that __FUNCTION__ resolves usefully #define LOG_AND_FREE_DBUS_ERROR_WITH_MSG(err, msg) \ - { LOGE("%s: D-Bus error in %s: %s (%s)", __FUNCTION__, \ + { ALOGE("%s: D-Bus error in %s: %s (%s)", __FUNCTION__, \ dbus_message_get_member((msg)), (err)->name, (err)->message); \ dbus_error_free((err)); } #define LOG_AND_FREE_DBUS_ERROR(err) \ - { LOGE("%s: D-Bus error: %s (%s)", __FUNCTION__, \ + { ALOGE("%s: D-Bus error: %s (%s)", __FUNCTION__, \ (err)->name, (err)->message); \ dbus_error_free((err)); } diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp index 9a87a10..f927064 100644 --- a/core/jni/android_database_CursorWindow.cpp +++ b/core/jni/android_database_CursorWindow.cpp @@ -71,7 +71,7 @@ static jint nativeCreate(JNIEnv* env, jclass clazz, jstring nameObj, jint cursor CursorWindow* window; status_t status = CursorWindow::create(name, cursorWindowSize, &window); if (status || !window) { - LOGE("Could not allocate CursorWindow '%s' of size %d due to error %d.", + ALOGE("Could not allocate CursorWindow '%s' of size %d due to error %d.", name.string(), cursorWindowSize, status); return 0; } @@ -86,7 +86,7 @@ static jint nativeCreateFromParcel(JNIEnv* env, jclass clazz, jobject parcelObj) CursorWindow* window; status_t status = CursorWindow::createFromParcel(parcel, &window); if (status || !window) { - LOGE("Could not create CursorWindow from Parcel due to error %d.", status); + ALOGE("Could not create CursorWindow from Parcel due to error %d.", status); return 0; } diff --git a/core/jni/android_database_SQLiteCompiledSql.cpp b/core/jni/android_database_SQLiteCompiledSql.cpp index a916ef5..857267a 100644 --- a/core/jni/android_database_SQLiteCompiledSql.cpp +++ b/core/jni/android_database_SQLiteCompiledSql.cpp @@ -104,7 +104,7 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env) clazz = env->FindClass("android/database/sqlite/SQLiteCompiledSql"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteCompiledSql"); + ALOGE("Can't find android/database/sqlite/SQLiteCompiledSql"); return -1; } @@ -112,7 +112,7 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env) gStatementField = env->GetFieldID(clazz, "nStatement", "I"); if (gHandleField == NULL || gStatementField == NULL) { - LOGE("Error locating fields"); + ALOGE("Error locating fields"); return -1; } diff --git a/core/jni/android_database_SQLiteDatabase.cpp b/core/jni/android_database_SQLiteDatabase.cpp index d5a034a..28c421d 100644 --- a/core/jni/android_database_SQLiteDatabase.cpp +++ b/core/jni/android_database_SQLiteDatabase.cpp @@ -121,7 +121,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags) err = sqlite3_open_v2(path8, &handle, sqliteFlags, NULL); if (err != SQLITE_OK) { - LOGE("sqlite3_open_v2(\"%s\", &handle, %d, NULL) failed\n", path8, sqliteFlags); + ALOGE("sqlite3_open_v2(\"%s\", &handle, %d, NULL) failed\n", path8, sqliteFlags); throw_sqlite3_exception(env, handle); goto done; } @@ -134,7 +134,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags) // Set the default busy handler to retry for 1000ms and then return SQLITE_BUSY err = sqlite3_busy_timeout(handle, 1000 /* ms */); if (err != SQLITE_OK) { - LOGE("sqlite3_busy_timeout(handle, 1000) failed for \"%s\"\n", path8); + ALOGE("sqlite3_busy_timeout(handle, 1000) failed for \"%s\"\n", path8); throw_sqlite3_exception(env, handle); goto done; } @@ -143,7 +143,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags) static const char* integritySql = "pragma integrity_check(1);"; err = sqlite3_prepare_v2(handle, integritySql, -1, &statement, NULL); if (err != SQLITE_OK) { - LOGE("sqlite_prepare_v2(handle, \"%s\") failed for \"%s\"\n", integritySql, path8); + ALOGE("sqlite_prepare_v2(handle, \"%s\") failed for \"%s\"\n", integritySql, path8); throw_sqlite3_exception(env, handle); goto done; } @@ -151,13 +151,13 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags) // first is OK or error message err = sqlite3_step(statement); if (err != SQLITE_ROW) { - LOGE("integrity check failed for \"%s\"\n", integritySql, path8); + ALOGE("integrity check failed for \"%s\"\n", integritySql, path8); throw_sqlite3_exception(env, handle); goto done; } else { const char *text = (const char*)sqlite3_column_text(statement, 0); if (strcmp(text, "ok") != 0) { - LOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text); + ALOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text); jniThrowException(env, "android/database/sqlite/SQLiteDatabaseCorruptException", text); goto done; } @@ -184,7 +184,7 @@ done: static char *getDatabaseName(JNIEnv* env, sqlite3 * handle, jstring databaseName, short connNum) { char const *path = env->GetStringUTFChars(databaseName, NULL); if (path == NULL) { - LOGE("Failure in getDatabaseName(). VM ran out of memory?\n"); + ALOGE("Failure in getDatabaseName(). VM ran out of memory?\n"); return NULL; // VM would have thrown OutOfMemoryError } char *dbNameStr = createStr(path, 4); @@ -244,7 +244,7 @@ static void dbclose(JNIEnv* env, jobject object) } else { // This can happen if sub-objects aren't closed first. Make sure the caller knows. throw_sqlite3_exception(env, handle); - LOGE("sqlite3_close(%p) failed: %d\n", handle, result); + ALOGE("sqlite3_close(%p) failed: %d\n", handle, result); } } } @@ -277,7 +277,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, static const char *createSql ="CREATE TABLE IF NOT EXISTS " ANDROID_TABLE " (locale TEXT)"; err = sqlite3_exec(handle, createSql, NULL, NULL, NULL); if (err != SQLITE_OK) { - LOGE("CREATE TABLE " ANDROID_TABLE " failed\n"); + ALOGE("CREATE TABLE " ANDROID_TABLE " failed\n"); throw_sqlite3_exception(env, handle); goto done; } @@ -287,7 +287,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, static const char *selectSql = "SELECT locale FROM " ANDROID_TABLE " LIMIT 1"; err = sqlite3_get_table(handle, selectSql, &meta, &rowCount, &colCount, NULL); if (err != SQLITE_OK) { - LOGE("SELECT locale FROM " ANDROID_TABLE " failed\n"); + ALOGE("SELECT locale FROM " ANDROID_TABLE " failed\n"); throw_sqlite3_exception(env, handle); goto done; } @@ -312,21 +312,21 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, // need to update android_metadata and indexes atomically, so use a transaction... err = sqlite3_exec(handle, "BEGIN TRANSACTION", NULL, NULL, NULL); if (err != SQLITE_OK) { - LOGE("BEGIN TRANSACTION failed setting locale\n"); + ALOGE("BEGIN TRANSACTION failed setting locale\n"); throw_sqlite3_exception(env, handle); goto done; } err = register_localized_collators(handle, locale8, UTF16_STORAGE); if (err != SQLITE_OK) { - LOGE("register_localized_collators() failed setting locale\n"); + ALOGE("register_localized_collators() failed setting locale\n"); throw_sqlite3_exception(env, handle); goto rollback; } err = sqlite3_exec(handle, "DELETE FROM " ANDROID_TABLE, NULL, NULL, NULL); if (err != SQLITE_OK) { - LOGE("DELETE failed setting locale\n"); + ALOGE("DELETE failed setting locale\n"); throw_sqlite3_exception(env, handle); goto rollback; } @@ -334,28 +334,28 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, static const char *sql = "INSERT INTO " ANDROID_TABLE " (locale) VALUES(?);"; err = sqlite3_prepare_v2(handle, sql, -1, &stmt, NULL); if (err != SQLITE_OK) { - LOGE("sqlite3_prepare_v2(\"%s\") failed\n", sql); + ALOGE("sqlite3_prepare_v2(\"%s\") failed\n", sql); throw_sqlite3_exception(env, handle); goto rollback; } err = sqlite3_bind_text(stmt, 1, locale8, -1, SQLITE_TRANSIENT); if (err != SQLITE_OK) { - LOGE("sqlite3_bind_text() failed setting locale\n"); + ALOGE("sqlite3_bind_text() failed setting locale\n"); throw_sqlite3_exception(env, handle); goto rollback; } err = sqlite3_step(stmt); if (err != SQLITE_OK && err != SQLITE_DONE) { - LOGE("sqlite3_step(\"%s\") failed setting locale\n", sql); + ALOGE("sqlite3_step(\"%s\") failed setting locale\n", sql); throw_sqlite3_exception(env, handle); goto rollback; } err = sqlite3_exec(handle, "REINDEX LOCALIZED", NULL, NULL, NULL); if (err != SQLITE_OK) { - LOGE("REINDEX LOCALIZED failed\n"); + ALOGE("REINDEX LOCALIZED failed\n"); throw_sqlite3_exception(env, handle); goto rollback; } @@ -363,7 +363,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, // all done, yay! err = sqlite3_exec(handle, "COMMIT TRANSACTION", NULL, NULL, NULL); if (err != SQLITE_OK) { - LOGE("COMMIT TRANSACTION failed setting locale\n"); + ALOGE("COMMIT TRANSACTION failed setting locale\n"); throw_sqlite3_exception(env, handle); goto done; } @@ -399,7 +399,7 @@ static void native_finalize(JNIEnv* env, jobject object, jint statementId) static void custom_function_callback(sqlite3_context * context, int argc, sqlite3_value ** argv) { JNIEnv* env = AndroidRuntime::getJNIEnv(); if (!env) { - LOGE("custom_function_callback cannot call into Java on this thread"); + ALOGE("custom_function_callback cannot call into Java on this thread"); return; } // get global ref to CustomFunction object from our user data @@ -412,7 +412,7 @@ static void custom_function_callback(sqlite3_context * context, int argc, sqlite for (int i = 0; i < argc; i++) { char* arg = (char *)sqlite3_value_text(argv[i]); if (!arg) { - LOGE("NULL argument in custom_function_callback. This should not happen."); + ALOGE("NULL argument in custom_function_callback. This should not happen."); return; } jobject obj = env->NewStringUTF(arg); @@ -427,7 +427,7 @@ static void custom_function_callback(sqlite3_context * context, int argc, sqlite done: if (env->ExceptionCheck()) { - LOGE("An exception was thrown by custom sqlite3 function."); + ALOGE("An exception was thrown by custom sqlite3 function."); LOGE_EX(env); env->ExceptionClear(); } @@ -447,7 +447,7 @@ static jint native_addCustomFunction(JNIEnv* env, jobject object, if (err == SQLITE_OK) return (int)ref; else { - LOGE("sqlite3_create_function returned %d", err); + ALOGE("sqlite3_create_function returned %d", err); env->DeleteGlobalRef(ref); throw_sqlite3_exception(env, handle); return 0; @@ -484,30 +484,30 @@ int register_android_database_SQLiteDatabase(JNIEnv *env) clazz = env->FindClass("android/database/sqlite/SQLiteDatabase"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteDatabase\n"); + ALOGE("Can't find android/database/sqlite/SQLiteDatabase\n"); return -1; } string_class = (jclass)env->NewGlobalRef(env->FindClass("java/lang/String")); if (string_class == NULL) { - LOGE("Can't find java/lang/String\n"); + ALOGE("Can't find java/lang/String\n"); return -1; } offset_db_handle = env->GetFieldID(clazz, "mNativeHandle", "I"); if (offset_db_handle == NULL) { - LOGE("Can't find SQLiteDatabase.mNativeHandle\n"); + ALOGE("Can't find SQLiteDatabase.mNativeHandle\n"); return -1; } clazz = env->FindClass("android/database/sqlite/SQLiteDatabase$CustomFunction"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteDatabase$CustomFunction\n"); + ALOGE("Can't find android/database/sqlite/SQLiteDatabase$CustomFunction\n"); return -1; } method_custom_function_callback = env->GetMethodID(clazz, "callback", "([Ljava/lang/String;)V"); if (method_custom_function_callback == NULL) { - LOGE("Can't find method SQLiteDatabase.CustomFunction.callback\n"); + ALOGE("Can't find method SQLiteDatabase.CustomFunction.callback\n"); return -1; } diff --git a/core/jni/android_database_SQLiteDebug.cpp b/core/jni/android_database_SQLiteDebug.cpp index 873b2a1..20ff00b 100644 --- a/core/jni/android_database_SQLiteDebug.cpp +++ b/core/jni/android_database_SQLiteDebug.cpp @@ -201,25 +201,25 @@ int register_android_database_SQLiteDebug(JNIEnv *env) clazz = env->FindClass("android/database/sqlite/SQLiteDebug$PagerStats"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteDebug$PagerStats"); + ALOGE("Can't find android/database/sqlite/SQLiteDebug$PagerStats"); return -1; } gMemoryUsedField = env->GetFieldID(clazz, "memoryUsed", "I"); if (gMemoryUsedField == NULL) { - LOGE("Can't find memoryUsed"); + ALOGE("Can't find memoryUsed"); return -1; } gLargestMemAllocField = env->GetFieldID(clazz, "largestMemAlloc", "I"); if (gLargestMemAllocField == NULL) { - LOGE("Can't find largestMemAlloc"); + ALOGE("Can't find largestMemAlloc"); return -1; } gPageCacheOverfloField = env->GetFieldID(clazz, "pageCacheOverflo", "I"); if (gPageCacheOverfloField == NULL) { - LOGE("Can't find pageCacheOverflo"); + ALOGE("Can't find pageCacheOverflo"); return -1; } diff --git a/core/jni/android_database_SQLiteProgram.cpp b/core/jni/android_database_SQLiteProgram.cpp index c247bbd..2e34c00 100644 --- a/core/jni/android_database_SQLiteProgram.cpp +++ b/core/jni/android_database_SQLiteProgram.cpp @@ -176,7 +176,7 @@ int register_android_database_SQLiteProgram(JNIEnv * env) clazz = env->FindClass("android/database/sqlite/SQLiteProgram"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteProgram"); + ALOGE("Can't find android/database/sqlite/SQLiteProgram"); return -1; } @@ -184,7 +184,7 @@ int register_android_database_SQLiteProgram(JNIEnv * env) gStatementField = env->GetFieldID(clazz, "nStatement", "I"); if (gHandleField == NULL || gStatementField == NULL) { - LOGE("Error locating fields"); + ALOGE("Error locating fields"); return -1; } diff --git a/core/jni/android_database_SQLiteQuery.cpp b/core/jni/android_database_SQLiteQuery.cpp index 8170f46..aa5c4c9 100644 --- a/core/jni/android_database_SQLiteQuery.cpp +++ b/core/jni/android_database_SQLiteQuery.cpp @@ -47,7 +47,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr, // Bind the offset parameter, telling the program which row to start with int err = sqlite3_bind_int(statement, offsetParam, startPos); if (err != SQLITE_OK) { - LOGE("Unable to bind offset position, offsetParam = %d", offsetParam); + ALOGE("Unable to bind offset position, offsetParam = %d", offsetParam); throw_sqlite3_exception(env, database); return 0; } @@ -63,7 +63,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr, int numColumns = sqlite3_column_count(statement); status_t status = window->setNumColumns(numColumns); if (status) { - LOGE("Failed to change column count from %d to %d", window->getNumColumns(), numColumns); + ALOGE("Failed to change column count from %d to %d", window->getNumColumns(), numColumns); jniThrowException(env, "java/lang/IllegalStateException", "numColumns mismatch"); return 0; } @@ -165,7 +165,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr, LOG_WINDOW("%d,%d is NULL", startPos + addedRows, i); } else { // Unknown data - LOGE("Unknown column type when filling database window"); + ALOGE("Unknown column type when filling database window"); throw_sqlite3_exception(env, "Unknown column type when filling window"); gotException = true; break; @@ -186,7 +186,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr, // The table is locked, retry LOG_WINDOW("Database locked, retrying"); if (retryCount > 50) { - LOGE("Bailing on database busy retry"); + ALOGE("Bailing on database busy retry"); throw_sqlite3_exception(env, database, "retrycount exceeded"); gotException = true; } else { @@ -207,7 +207,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr, // Report the total number of rows on request. if (startPos > totalRows) { - LOGE("startPos %d > actual rows %d", startPos, totalRows); + ALOGE("startPos %d > actual rows %d", startPos, totalRows); } return countAllRows ? totalRows : 0; } diff --git a/core/jni/android_database_SQLiteStatement.cpp b/core/jni/android_database_SQLiteStatement.cpp index 05ffbb1..e376258 100644 --- a/core/jni/android_database_SQLiteStatement.cpp +++ b/core/jni/android_database_SQLiteStatement.cpp @@ -169,7 +169,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env, // Create ashmem area int fd = ashmem_create_region(NULL, length); if (fd < 0) { - LOGE("ashmem_create_region failed: %s", strerror(errno)); + ALOGE("ashmem_create_region failed: %s", strerror(errno)); jniThrowIOException(env, errno); return NULL; } @@ -179,7 +179,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env, void * ashmem_ptr = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (ashmem_ptr == MAP_FAILED) { - LOGE("mmap failed: %s", strerror(errno)); + ALOGE("mmap failed: %s", strerror(errno)); jniThrowIOException(env, errno); close(fd); return NULL; @@ -190,7 +190,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env, // munmap ashmem area if (munmap(ashmem_ptr, length) < 0) { - LOGE("munmap failed: %s", strerror(errno)); + ALOGE("munmap failed: %s", strerror(errno)); jniThrowIOException(env, errno); close(fd); return NULL; @@ -199,7 +199,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env, // Make ashmem area read-only if (ashmem_set_prot_region(fd, PROT_READ) < 0) { - LOGE("ashmem_set_prot_region failed: %s", strerror(errno)); + ALOGE("ashmem_set_prot_region failed: %s", strerror(errno)); jniThrowIOException(env, errno); close(fd); return NULL; @@ -267,7 +267,7 @@ int register_android_database_SQLiteStatement(JNIEnv * env) clazz = env->FindClass("android/database/sqlite/SQLiteStatement"); if (clazz == NULL) { - LOGE("Can't find android/database/sqlite/SQLiteStatement"); + ALOGE("Can't find android/database/sqlite/SQLiteStatement"); return -1; } @@ -275,7 +275,7 @@ int register_android_database_SQLiteStatement(JNIEnv * env) gStatementField = env->GetFieldID(clazz, "nStatement", "I"); if (gHandleField == NULL || gStatementField == NULL) { - LOGE("Error locating fields"); + ALOGE("Error locating fields"); return -1; } diff --git a/core/jni/android_debug_JNITest.cpp b/core/jni/android_debug_JNITest.cpp index e0f61fb..9147284 100644 --- a/core/jni/android_debug_JNITest.cpp +++ b/core/jni/android_debug_JNITest.cpp @@ -46,7 +46,7 @@ static jint android_debug_JNITest_part1(JNIEnv* env, jobject object, part2id = env->GetMethodID(clazz, "part2", "(DILjava/lang/String;)I"); if (part2id == NULL) { - LOGE("JNI test: unable to find part2\n"); + ALOGE("JNI test: unable to find part2\n"); return -1; } diff --git a/core/jni/android_emoji_EmojiFactory.cpp b/core/jni/android_emoji_EmojiFactory.cpp index 81dae88..a658561 100644 --- a/core/jni/android_emoji_EmojiFactory.cpp +++ b/core/jni/android_emoji_EmojiFactory.cpp @@ -60,7 +60,7 @@ FAIL: error_str = "unknown reason"; } - LOGE("%s: %s", error_msg, error_str); + ALOGE("%s: %s", error_msg, error_str); if (m_handle != NULL) { dlclose(m_handle); m_handle = NULL; @@ -109,7 +109,7 @@ static jobject create_java_EmojiFactory( jobject obj = env->NewObject(gEmojiFactory_class, gEmojiFactory_constructorMethodID, static_cast<jint>(reinterpret_cast<uintptr_t>(factory)), name); if (env->ExceptionCheck() != 0) { - LOGE("*** Uncaught exception returned from Java call!\n"); + ALOGE("*** Uncaught exception returned from Java call!\n"); env->ExceptionDescribe(); } return obj; @@ -172,14 +172,14 @@ static jobject android_emoji_EmojiFactory_getBitmapFromAndroidPua( SkBitmap *bitmap = new SkBitmap; if (!SkImageDecoder::DecodeMemory(bytes, size, bitmap)) { - LOGE("SkImageDecoder::DecodeMemory() failed."); + ALOGE("SkImageDecoder::DecodeMemory() failed."); return NULL; } jobject obj = env->NewObject(gBitmap_class, gBitmap_constructorMethodID, static_cast<jint>(reinterpret_cast<uintptr_t>(bitmap)), NULL, false, NULL, -1); if (env->ExceptionCheck() != 0) { - LOGE("*** Uncaught exception returned from Java call!\n"); + ALOGE("*** Uncaught exception returned from Java call!\n"); env->ExceptionDescribe(); } return obj; diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index 6d1fb70..8dcc14a 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -208,7 +208,7 @@ jbyteArray JNICameraContext::getCallbackBuffer( if (obj != NULL) { jsize bufferLength = env->GetArrayLength(obj); if ((int)bufferLength < (int)bufferSize) { - LOGE("Callback buffer was too small! Expected %d bytes, but got %d bytes!", + ALOGE("Callback buffer was too small! Expected %d bytes, but got %d bytes!", bufferSize, bufferLength); env->DeleteLocalRef(obj); return NULL; @@ -254,13 +254,13 @@ void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int } if (obj == NULL) { - LOGE("Couldn't allocate byte array for JPEG data"); + ALOGE("Couldn't allocate byte array for JPEG data"); env->ExceptionClear(); } else { env->SetByteArrayRegion(obj, 0, size, data); } } else { - LOGE("image heap is NULL"); + ALOGE("image heap is NULL"); } } @@ -331,7 +331,7 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m obj = (jobjectArray) env->NewObjectArray(metadata->number_of_faces, mFaceClass, NULL); if (obj == NULL) { - LOGE("Couldn't allocate face metadata array"); + ALOGE("Couldn't allocate face metadata array"); return; } @@ -419,7 +419,7 @@ void JNICameraContext::addCallbackBuffer( } } } else { - LOGE("Null byte array!"); + ALOGE("Null byte array!"); } } @@ -885,13 +885,13 @@ static int find_fields(JNIEnv *env, field *fields, int count) field *f = &fields[i]; jclass clazz = env->FindClass(f->class_name); if (clazz == NULL) { - LOGE("Can't find %s", f->class_name); + ALOGE("Can't find %s", f->class_name); return -1; } jfieldID field = env->GetFieldID(clazz, f->field_name, f->field_type); if (field == NULL) { - LOGE("Can't find %s.%s", f->class_name, f->field_name); + ALOGE("Can't find %s.%s", f->class_name, f->field_name); return -1; } @@ -926,21 +926,21 @@ int register_android_hardware_Camera(JNIEnv *env) fields.post_event = env->GetStaticMethodID(clazz, "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (fields.post_event == NULL) { - LOGE("Can't find android/hardware/Camera.postEventFromNative"); + ALOGE("Can't find android/hardware/Camera.postEventFromNative"); return -1; } clazz = env->FindClass("android/graphics/Rect"); fields.rect_constructor = env->GetMethodID(clazz, "<init>", "()V"); if (fields.rect_constructor == NULL) { - LOGE("Can't find android/graphics/Rect.Rect()"); + ALOGE("Can't find android/graphics/Rect.Rect()"); return -1; } clazz = env->FindClass("android/hardware/Camera$Face"); fields.face_constructor = env->GetMethodID(clazz, "<init>", "()V"); if (fields.face_constructor == NULL) { - LOGE("Can't find android/hardware/Camera$Face.Face()"); + ALOGE("Can't find android/hardware/Camera$Face.Face()"); return -1; } diff --git a/core/jni/android_hardware_UsbDeviceConnection.cpp b/core/jni/android_hardware_UsbDeviceConnection.cpp index f53e2f7..923781e 100644 --- a/core/jni/android_hardware_UsbDeviceConnection.cpp +++ b/core/jni/android_hardware_UsbDeviceConnection.cpp @@ -53,7 +53,7 @@ android_hardware_UsbDeviceConnection_open(JNIEnv *env, jobject thiz, jstring dev if (device) { env->SetIntField(thiz, field_context, (int)device); } else { - LOGE("usb_device_open failed for %s", deviceNameStr); + ALOGE("usb_device_open failed for %s", deviceNameStr); close(fd); } @@ -77,7 +77,7 @@ android_hardware_UsbDeviceConnection_get_fd(JNIEnv *env, jobject thiz) { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_get_fd"); + ALOGE("device is closed in native_get_fd"); return -1; } return usb_device_get_fd(device); @@ -110,7 +110,7 @@ android_hardware_UsbDeviceConnection_claim_interface(JNIEnv *env, jobject thiz, { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_claim_interface"); + ALOGE("device is closed in native_claim_interface"); return -1; } @@ -128,7 +128,7 @@ android_hardware_UsbDeviceConnection_release_interface(JNIEnv *env, jobject thiz { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_release_interface"); + ALOGE("device is closed in native_release_interface"); return -1; } int ret = usb_device_release_interface(device, interfaceID); @@ -146,7 +146,7 @@ android_hardware_UsbDeviceConnection_control_request(JNIEnv *env, jobject thiz, { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_control_request"); + ALOGE("device is closed in native_control_request"); return -1; } @@ -174,7 +174,7 @@ android_hardware_UsbDeviceConnection_bulk_request(JNIEnv *env, jobject thiz, { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_control_request"); + ALOGE("device is closed in native_control_request"); return -1; } @@ -200,7 +200,7 @@ android_hardware_UsbDeviceConnection_request_wait(JNIEnv *env, jobject thiz) { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_request_wait"); + ALOGE("device is closed in native_request_wait"); return NULL; } @@ -216,7 +216,7 @@ android_hardware_UsbDeviceConnection_get_serial(JNIEnv *env, jobject thiz) { struct usb_device* device = get_device_from_object(env, thiz); if (!device) { - LOGE("device is closed in native_request_wait"); + ALOGE("device is closed in native_request_wait"); return NULL; } char* serial = usb_device_get_serial(device); @@ -249,12 +249,12 @@ int register_android_hardware_UsbDeviceConnection(JNIEnv *env) { jclass clazz = env->FindClass("android/hardware/usb/UsbDeviceConnection"); if (clazz == NULL) { - LOGE("Can't find android/hardware/usb/UsbDeviceConnection"); + ALOGE("Can't find android/hardware/usb/UsbDeviceConnection"); return -1; } field_context = env->GetFieldID(clazz, "mNativeContext", "I"); if (field_context == NULL) { - LOGE("Can't find UsbDeviceConnection.mNativeContext"); + ALOGE("Can't find UsbDeviceConnection.mNativeContext"); return -1; } diff --git a/core/jni/android_hardware_UsbRequest.cpp b/core/jni/android_hardware_UsbRequest.cpp index 6e1d443..1398968 100644 --- a/core/jni/android_hardware_UsbRequest.cpp +++ b/core/jni/android_hardware_UsbRequest.cpp @@ -46,7 +46,7 @@ android_hardware_UsbRequest_init(JNIEnv *env, jobject thiz, jobject java_device, struct usb_device* device = get_device_from_object(env, java_device); if (!device) { - LOGE("device null in native_init"); + ALOGE("device null in native_init"); return false; } @@ -82,7 +82,7 @@ android_hardware_UsbRequest_queue_array(JNIEnv *env, jobject thiz, { struct usb_request* request = get_request_from_object(env, thiz); if (!request) { - LOGE("request is closed in native_queue"); + ALOGE("request is closed in native_queue"); return false; } @@ -119,7 +119,7 @@ android_hardware_UsbRequest_dequeue_array(JNIEnv *env, jobject thiz, { struct usb_request* request = get_request_from_object(env, thiz); if (!request) { - LOGE("request is closed in native_dequeue"); + ALOGE("request is closed in native_dequeue"); return; } @@ -138,7 +138,7 @@ android_hardware_UsbRequest_queue_direct(JNIEnv *env, jobject thiz, { struct usb_request* request = get_request_from_object(env, thiz); if (!request) { - LOGE("request is closed in native_queue"); + ALOGE("request is closed in native_queue"); return false; } @@ -168,7 +168,7 @@ android_hardware_UsbRequest_dequeue_direct(JNIEnv *env, jobject thiz) { struct usb_request* request = get_request_from_object(env, thiz); if (!request) { - LOGE("request is closed in native_dequeue"); + ALOGE("request is closed in native_dequeue"); return; } // all we need to do is delete our global ref @@ -180,7 +180,7 @@ android_hardware_UsbRequest_cancel(JNIEnv *env, jobject thiz) { struct usb_request* request = get_request_from_object(env, thiz); if (!request) { - LOGE("request is closed in native_cancel"); + ALOGE("request is closed in native_cancel"); return false; } return (usb_request_cancel(request) == 0); @@ -202,12 +202,12 @@ int register_android_hardware_UsbRequest(JNIEnv *env) { jclass clazz = env->FindClass("android/hardware/usb/UsbRequest"); if (clazz == NULL) { - LOGE("Can't find android/hardware/usb/UsbRequest"); + ALOGE("Can't find android/hardware/usb/UsbRequest"); return -1; } field_context = env->GetFieldID(clazz, "mNativeContext", "I"); if (field_context == NULL) { - LOGE("Can't find UsbRequest.mNativeContext"); + ALOGE("Can't find UsbRequest.mNativeContext"); return -1; } diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp index ca13c18..3052553 100644 --- a/core/jni/android_media_AudioRecord.cpp +++ b/core/jni/android_media_AudioRecord.cpp @@ -134,7 +134,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, // sampleRateInHertz, audioFormat, channels, buffSizeInBytes); if (!audio_is_input_channel(channels)) { - LOGE("Error creating AudioRecord: channel count is not 1 or 2."); + ALOGE("Error creating AudioRecord: channel count is not 1 or 2."); return AUDIORECORD_ERROR_SETUP_INVALIDCHANNELMASK; } uint32_t nbChannels = popcount(channels); @@ -142,7 +142,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, // compare the format against the Java constants if ((audioFormat != javaAudioRecordFields.PCM16) && (audioFormat != javaAudioRecordFields.PCM8)) { - LOGE("Error creating AudioRecord: unsupported audio format."); + ALOGE("Error creating AudioRecord: unsupported audio format."); return AUDIORECORD_ERROR_SETUP_INVALIDFORMAT; } @@ -151,25 +151,25 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, AUDIO_FORMAT_PCM_16_BIT : AUDIO_FORMAT_PCM_8_BIT; if (buffSizeInBytes == 0) { - LOGE("Error creating AudioRecord: frameCount is 0."); + ALOGE("Error creating AudioRecord: frameCount is 0."); return AUDIORECORD_ERROR_SETUP_ZEROFRAMECOUNT; } int frameSize = nbChannels * bytesPerSample; size_t frameCount = buffSizeInBytes / frameSize; if (source >= AUDIO_SOURCE_CNT) { - LOGE("Error creating AudioRecord: unknown source."); + ALOGE("Error creating AudioRecord: unknown source."); return AUDIORECORD_ERROR_SETUP_INVALIDSOURCE; } if (jSession == NULL) { - LOGE("Error creating AudioRecord: invalid session ID pointer"); + ALOGE("Error creating AudioRecord: invalid session ID pointer"); return AUDIORECORD_ERROR; } jint* nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL); if (nSession == NULL) { - LOGE("Error creating AudioRecord: Error retrieving session id pointer"); + ALOGE("Error creating AudioRecord: Error retrieving session id pointer"); return AUDIORECORD_ERROR; } int sessionId = nSession[0]; @@ -182,7 +182,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, // create an uninitialized AudioRecord object lpRecorder = new AudioRecord(); if(lpRecorder == NULL) { - LOGE("Error creating AudioRecord instance."); + ALOGE("Error creating AudioRecord instance."); return AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED; } @@ -190,7 +190,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, // this data will be passed with every AudioRecord callback jclass clazz = env->GetObjectClass(thiz); if (clazz == NULL) { - LOGE("Can't find %s when setting up callback.", kClassPathName); + ALOGE("Can't find %s when setting up callback.", kClassPathName); goto native_track_failure; } lpCallbackData = new audiorecord_callback_cookie; @@ -211,13 +211,13 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, sessionId); if(lpRecorder->initCheck() != NO_ERROR) { - LOGE("Error creating AudioRecord instance: initialization check failed."); + ALOGE("Error creating AudioRecord instance: initialization check failed."); goto native_init_failure; } nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL); if (nSession == NULL) { - LOGE("Error creating AudioRecord: Error retrieving session id pointer"); + ALOGE("Error creating AudioRecord: Error retrieving session id pointer"); goto native_init_failure; } // read the audio session ID back from AudioTrack in case a new session was created during set() @@ -332,12 +332,12 @@ static jint android_media_AudioRecord_readInByteArray(JNIEnv *env, jobject thiz lpRecorder = (AudioRecord *)env->GetIntField(thiz, javaAudioRecordFields.nativeRecorderInJavaObj); if (lpRecorder == NULL) { - LOGE("Unable to retrieve AudioRecord object, can't record"); + ALOGE("Unable to retrieve AudioRecord object, can't record"); return 0; } if (!javaAudioData) { - LOGE("Invalid Java array to store recorded audio, can't record"); + ALOGE("Invalid Java array to store recorded audio, can't record"); return 0; } @@ -349,7 +349,7 @@ static jint android_media_AudioRecord_readInByteArray(JNIEnv *env, jobject thiz recordBuff = (jbyte *)env->GetByteArrayElements(javaAudioData, NULL); if (recordBuff == NULL) { - LOGE("Error retrieving destination for recorded audio data, can't record"); + ALOGE("Error retrieving destination for recorded audio data, can't record"); return 0; } @@ -390,13 +390,13 @@ static jint android_media_AudioRecord_readInDirectBuffer(JNIEnv *env, jobject t long capacity = env->GetDirectBufferCapacity(jBuffer); if(capacity == -1) { // buffer direct access is not supported - LOGE("Buffer direct access is not supported, can't record"); + ALOGE("Buffer direct access is not supported, can't record"); return 0; } //ALOGV("capacity = %ld", capacity); jbyte* nativeFromJavaBuf = (jbyte*) env->GetDirectBufferAddress(jBuffer); if(nativeFromJavaBuf==NULL) { - LOGE("Buffer direct access is not supported, can't record"); + ALOGE("Buffer direct access is not supported, can't record"); return 0; } @@ -555,7 +555,7 @@ int register_android_media_AudioRecord(JNIEnv *env) // Get the AudioRecord class jclass audioRecordClass = env->FindClass(kClassPathName); if (audioRecordClass == NULL) { - LOGE("Can't find %s", kClassPathName); + ALOGE("Can't find %s", kClassPathName); return -1; } // Get the postEvent method @@ -563,7 +563,7 @@ int register_android_media_AudioRecord(JNIEnv *env) audioRecordClass, JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (javaAudioRecordFields.postNativeEventInJava == NULL) { - LOGE("Can't find AudioRecord.%s", JAVA_POSTEVENT_CALLBACK_NAME); + ALOGE("Can't find AudioRecord.%s", JAVA_POSTEVENT_CALLBACK_NAME); return -1; } @@ -573,7 +573,7 @@ int register_android_media_AudioRecord(JNIEnv *env) env->GetFieldID(audioRecordClass, JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME, "I"); if (javaAudioRecordFields.nativeRecorderInJavaObj == NULL) { - LOGE("Can't find AudioRecord.%s", JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME); + ALOGE("Can't find AudioRecord.%s", JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME); return -1; } // mNativeCallbackCookie @@ -581,7 +581,7 @@ int register_android_media_AudioRecord(JNIEnv *env) audioRecordClass, JAVA_NATIVECALLBACKINFO_FIELD_NAME, "I"); if (javaAudioRecordFields.nativeCallbackCookie == NULL) { - LOGE("Can't find AudioRecord.%s", JAVA_NATIVECALLBACKINFO_FIELD_NAME); + ALOGE("Can't find AudioRecord.%s", JAVA_NATIVECALLBACKINFO_FIELD_NAME); return -1; } @@ -589,7 +589,7 @@ int register_android_media_AudioRecord(JNIEnv *env) jclass audioFormatClass = NULL; audioFormatClass = env->FindClass(JAVA_AUDIOFORMAT_CLASS_NAME); if (audioFormatClass == NULL) { - LOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME); + ALOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME); return -1; } if ( !android_media_getIntConstantFromClass(env, audioFormatClass, diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp index 84e7432..859878d 100644 --- a/core/jni/android_media_AudioTrack.cpp +++ b/core/jni/android_media_AudioTrack.cpp @@ -176,11 +176,11 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th int afFrameCount; if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) { - LOGE("Error creating AudioTrack: Could not get AudioSystem frame count."); + ALOGE("Error creating AudioTrack: Could not get AudioSystem frame count."); return AUDIOTRACK_ERROR_SETUP_AUDIOSYSTEM; } if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) { - LOGE("Error creating AudioTrack: Could not get AudioSystem sampling rate."); + ALOGE("Error creating AudioTrack: Could not get AudioSystem sampling rate."); return AUDIOTRACK_ERROR_SETUP_AUDIOSYSTEM; } @@ -189,7 +189,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th uint32_t nativeChannelMask = ((uint32_t)javaChannelMask) >> 2; if (!audio_is_output_channel(nativeChannelMask)) { - LOGE("Error creating AudioTrack: invalid channel mask."); + ALOGE("Error creating AudioTrack: invalid channel mask."); return AUDIOTRACK_ERROR_SETUP_INVALIDCHANNELMASK; } @@ -214,14 +214,14 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th } else if (streamType == javaAudioTrackFields.STREAM_DTMF) { atStreamType = AUDIO_STREAM_DTMF; } else { - LOGE("Error creating AudioTrack: unknown stream type."); + ALOGE("Error creating AudioTrack: unknown stream type."); return AUDIOTRACK_ERROR_SETUP_INVALIDSTREAMTYPE; } // check the format. // This function was called from Java, so we compare the format against the Java constants if ((audioFormat != javaAudioTrackFields.PCM16) && (audioFormat != javaAudioTrackFields.PCM8)) { - LOGE("Error creating AudioTrack: unsupported audio format."); + ALOGE("Error creating AudioTrack: unsupported audio format."); return AUDIOTRACK_ERROR_SETUP_INVALIDFORMAT; } @@ -250,7 +250,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th // this data will be passed with every AudioTrack callback jclass clazz = env->GetObjectClass(thiz); if (clazz == NULL) { - LOGE("Can't find %s when setting up callback.", kClassPathName); + ALOGE("Can't find %s when setting up callback.", kClassPathName); delete lpJniStorage; return AUDIOTRACK_ERROR_SETUP_NATIVEINITFAILED; } @@ -261,14 +261,14 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th lpJniStorage->mStreamType = atStreamType; if (jSession == NULL) { - LOGE("Error creating AudioTrack: invalid session ID pointer"); + ALOGE("Error creating AudioTrack: invalid session ID pointer"); delete lpJniStorage; return AUDIOTRACK_ERROR; } jint* nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL); if (nSession == NULL) { - LOGE("Error creating AudioTrack: Error retrieving session id pointer"); + ALOGE("Error creating AudioTrack: Error retrieving session id pointer"); delete lpJniStorage; return AUDIOTRACK_ERROR; } @@ -279,7 +279,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th // create the native AudioTrack object AudioTrack* lpTrack = new AudioTrack(); if (lpTrack == NULL) { - LOGE("Error creating uninitialized AudioTrack"); + ALOGE("Error creating uninitialized AudioTrack"); goto native_track_failure; } @@ -303,7 +303,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th // AudioTrack is using shared memory if (!lpJniStorage->allocSharedMem(buffSizeInBytes)) { - LOGE("Error creating AudioTrack in static mode: error creating mem heap base"); + ALOGE("Error creating AudioTrack in static mode: error creating mem heap base"); goto native_init_failure; } @@ -322,13 +322,13 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th } if (lpTrack->initCheck() != NO_ERROR) { - LOGE("Error initializing AudioTrack"); + ALOGE("Error initializing AudioTrack"); goto native_init_failure; } nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL); if (nSession == NULL) { - LOGE("Error creating AudioTrack: Error retrieving session id pointer"); + ALOGE("Error creating AudioTrack: Error retrieving session id pointer"); goto native_init_failure; } // read the audio session ID back from AudioTrack in case we create a new session @@ -544,11 +544,11 @@ static jint android_media_AudioTrack_native_write(JNIEnv *env, jobject thiz, if (javaAudioData) { cAudioData = (jbyte *)env->GetByteArrayElements(javaAudioData, NULL); if (cAudioData == NULL) { - LOGE("Error retrieving source of audio data to play, can't play"); + ALOGE("Error retrieving source of audio data to play, can't play"); return 0; // out of memory or no data to load } } else { - LOGE("NULL java array of audio data to play, can't play"); + ALOGE("NULL java array of audio data to play, can't play"); return 0; } @@ -785,7 +785,7 @@ static jint android_media_AudioTrack_get_output_sample_rate(JNIEnv *env, jobjec } if (AudioSystem::getOutputSamplingRate(&afSamplingRate, nativeStreamType) != NO_ERROR) { - LOGE("AudioSystem::getOutputSamplingRate() for stream type %d failed in AudioTrack JNI", + ALOGE("AudioSystem::getOutputSamplingRate() for stream type %d failed in AudioTrack JNI", nativeStreamType); return DEFAULT_OUTPUT_SAMPLE_RATE; } else { @@ -913,7 +913,7 @@ bool android_media_getIntConstantFromClass(JNIEnv* pEnv, jclass theClass, const *constVal = pEnv->GetStaticIntField(theClass, javaConst); return true; } else { - LOGE("Can't find %s.%s", className, constName); + ALOGE("Can't find %s.%s", className, constName); return false; } } @@ -928,7 +928,7 @@ int register_android_media_AudioTrack(JNIEnv *env) // Get the AudioTrack class jclass audioTrackClass = env->FindClass(kClassPathName); if (audioTrackClass == NULL) { - LOGE("Can't find %s", kClassPathName); + ALOGE("Can't find %s", kClassPathName); return -1; } @@ -937,7 +937,7 @@ int register_android_media_AudioTrack(JNIEnv *env) audioTrackClass, JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (javaAudioTrackFields.postNativeEventInJava == NULL) { - LOGE("Can't find AudioTrack.%s", JAVA_POSTEVENT_CALLBACK_NAME); + ALOGE("Can't find AudioTrack.%s", JAVA_POSTEVENT_CALLBACK_NAME); return -1; } @@ -947,7 +947,7 @@ int register_android_media_AudioTrack(JNIEnv *env) audioTrackClass, JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME, "I"); if (javaAudioTrackFields.nativeTrackInJavaObj == NULL) { - LOGE("Can't find AudioTrack.%s", JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME); + ALOGE("Can't find AudioTrack.%s", JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME); return -1; } // jniData; @@ -955,7 +955,7 @@ int register_android_media_AudioTrack(JNIEnv *env) audioTrackClass, JAVA_JNIDATA_FIELD_NAME, "I"); if (javaAudioTrackFields.jniData == NULL) { - LOGE("Can't find AudioTrack.%s", JAVA_JNIDATA_FIELD_NAME); + ALOGE("Can't find AudioTrack.%s", JAVA_JNIDATA_FIELD_NAME); return -1; } @@ -974,7 +974,7 @@ int register_android_media_AudioTrack(JNIEnv *env) jclass audioFormatClass = NULL; audioFormatClass = env->FindClass(JAVA_AUDIOFORMAT_CLASS_NAME); if (audioFormatClass == NULL) { - LOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME); + ALOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME); return -1; } if ( !android_media_getIntConstantFromClass(env, audioFormatClass, @@ -991,7 +991,7 @@ int register_android_media_AudioTrack(JNIEnv *env) jclass audioManagerClass = NULL; audioManagerClass = env->FindClass(JAVA_AUDIOMANAGER_CLASS_NAME); if (audioManagerClass == NULL) { - LOGE("Can't find %s", JAVA_AUDIOMANAGER_CLASS_NAME); + ALOGE("Can't find %s", JAVA_AUDIOMANAGER_CLASS_NAME); return -1; } if ( !android_media_getIntConstantFromClass(env, audioManagerClass, diff --git a/core/jni/android_media_JetPlayer.cpp b/core/jni/android_media_JetPlayer.cpp index 66421a9..85c0a9c 100644 --- a/core/jni/android_media_JetPlayer.cpp +++ b/core/jni/android_media_JetPlayer.cpp @@ -66,7 +66,7 @@ jetPlayerEventCallback(int what, int arg1=0, int arg2=0, void* javaTarget = NULL env->ExceptionClear(); } } else { - LOGE("JET jetPlayerEventCallback(): No JNI env for JET event callback, can't post event."); + ALOGE("JET jetPlayerEventCallback(): No JNI env for JET event callback, can't post event."); return; } } @@ -90,7 +90,7 @@ android_media_JetPlayer_setup(JNIEnv *env, jobject thiz, jobject weak_this, env->SetIntField(thiz, javaJetPlayerFields.nativePlayerInJavaObj, (int)lpJet); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_setup(): initialization failed with EAS error code %d", (int)result); + ALOGE("android_media_JetPlayer_setup(): initialization failed with EAS error code %d", (int)result); delete lpJet; env->SetIntField(weak_this, javaJetPlayerFields.nativePlayerInJavaObj, 0); return JNI_FALSE; @@ -140,7 +140,7 @@ android_media_JetPlayer_loadFromFile(JNIEnv *env, jobject thiz, jstring path) const char *pathStr = env->GetStringUTFChars(path, NULL); if (pathStr == NULL) { // Out of memory - LOGE("android_media_JetPlayer_openFile(): aborting, out of memory"); + ALOGE("android_media_JetPlayer_openFile(): aborting, out of memory"); return JNI_FALSE; } @@ -152,7 +152,7 @@ android_media_JetPlayer_loadFromFile(JNIEnv *env, jobject thiz, jstring path) //ALOGV("android_media_JetPlayer_openFile(): file successfully opened"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_openFile(): failed to open file with EAS error %d", + ALOGE("android_media_JetPlayer_openFile(): failed to open file with EAS error %d", (int)result); return JNI_FALSE; } @@ -182,7 +182,7 @@ android_media_JetPlayer_loadFromFileD(JNIEnv *env, jobject thiz, ALOGV("android_media_JetPlayer_openFileDescr(): file successfully opened"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_openFileDescr(): failed to open file with EAS error %d", + ALOGE("android_media_JetPlayer_openFileDescr(): failed to open file with EAS error %d", (int)result); return JNI_FALSE; } @@ -204,7 +204,7 @@ android_media_JetPlayer_closeFile(JNIEnv *env, jobject thiz) //ALOGV("android_media_JetPlayer_closeFile(): file successfully closed"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_closeFile(): failed to close file"); + ALOGE("android_media_JetPlayer_closeFile(): failed to close file"); return JNI_FALSE; } } @@ -226,7 +226,7 @@ android_media_JetPlayer_play(JNIEnv *env, jobject thiz) //ALOGV("android_media_JetPlayer_play(): play successful"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_play(): failed to play with EAS error code %ld", + ALOGE("android_media_JetPlayer_play(): failed to play with EAS error code %ld", result); return JNI_FALSE; } @@ -253,7 +253,7 @@ android_media_JetPlayer_pause(JNIEnv *env, jobject thiz) ALOGV("android_media_JetPlayer_pause(): paused with an empty queue"); return JNI_TRUE; } else - LOGE("android_media_JetPlayer_pause(): failed to pause with EAS error code %ld", + ALOGE("android_media_JetPlayer_pause(): failed to pause with EAS error code %ld", result); return JNI_FALSE; } @@ -279,7 +279,7 @@ android_media_JetPlayer_queueSegment(JNIEnv *env, jobject thiz, //ALOGV("android_media_JetPlayer_queueSegment(): segment successfully queued"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_queueSegment(): failed with EAS error code %ld", + ALOGE("android_media_JetPlayer_queueSegment(): failed with EAS error code %ld", result); return JNI_FALSE; } @@ -304,7 +304,7 @@ android_media_JetPlayer_queueSegmentMuteArray(JNIEnv *env, jobject thiz, jboolean *muteTracks = NULL; muteTracks = env->GetBooleanArrayElements(muteArray, NULL); if (muteTracks == NULL) { - LOGE("android_media_JetPlayer_queueSegment(): failed to read track mute mask."); + ALOGE("android_media_JetPlayer_queueSegment(): failed to read track mute mask."); return JNI_FALSE; } @@ -325,7 +325,7 @@ android_media_JetPlayer_queueSegmentMuteArray(JNIEnv *env, jobject thiz, //ALOGV("android_media_JetPlayer_queueSegmentMuteArray(): segment successfully queued"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_queueSegmentMuteArray(): failed with EAS error code %ld", + ALOGE("android_media_JetPlayer_queueSegmentMuteArray(): failed with EAS error code %ld", result); return JNI_FALSE; } @@ -350,7 +350,7 @@ android_media_JetPlayer_setMuteFlags(JNIEnv *env, jobject thiz, //ALOGV("android_media_JetPlayer_setMuteFlags(): mute flags successfully updated"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_setMuteFlags(): failed with EAS error code %ld", result); + ALOGE("android_media_JetPlayer_setMuteFlags(): failed with EAS error code %ld", result); return JNI_FALSE; } } @@ -373,7 +373,7 @@ android_media_JetPlayer_setMuteArray(JNIEnv *env, jobject thiz, jboolean *muteTracks = NULL; muteTracks = env->GetBooleanArrayElements(muteArray, NULL); if (muteTracks == NULL) { - LOGE("android_media_JetPlayer_setMuteArray(): failed to read track mute mask."); + ALOGE("android_media_JetPlayer_setMuteArray(): failed to read track mute mask."); return JNI_FALSE; } @@ -394,7 +394,7 @@ android_media_JetPlayer_setMuteArray(JNIEnv *env, jobject thiz, //ALOGV("android_media_JetPlayer_setMuteArray(): mute flags successfully updated"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_setMuteArray(): \ + ALOGE("android_media_JetPlayer_setMuteArray(): \ failed to update mute flags with EAS error code %ld", result); return JNI_FALSE; } @@ -420,7 +420,7 @@ android_media_JetPlayer_setMuteFlag(JNIEnv *env, jobject thiz, //ALOGV("android_media_JetPlayer_setMuteFlag(): mute flag successfully updated for track %d", trackId); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_setMuteFlag(): failed to update mute flag for track %d with EAS error code %ld", + ALOGE("android_media_JetPlayer_setMuteFlag(): failed to update mute flag for track %d with EAS error code %ld", trackId, result); return JNI_FALSE; } @@ -444,7 +444,7 @@ android_media_JetPlayer_triggerClip(JNIEnv *env, jobject thiz, jint clipId) //ALOGV("android_media_JetPlayer_triggerClip(): triggerClip successful for clip %d", clipId); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_triggerClip(): triggerClip for clip %d failed with EAS error code %ld", + ALOGE("android_media_JetPlayer_triggerClip(): triggerClip for clip %d failed with EAS error code %ld", clipId, result); return JNI_FALSE; } @@ -467,7 +467,7 @@ android_media_JetPlayer_clearQueue(JNIEnv *env, jobject thiz) //ALOGV("android_media_JetPlayer_clearQueue(): clearQueue successful"); return JNI_TRUE; } else { - LOGE("android_media_JetPlayer_clearQueue(): clearQueue failed with EAS error code %ld", + ALOGE("android_media_JetPlayer_clearQueue(): clearQueue failed with EAS error code %ld", result); return JNI_FALSE; } @@ -513,7 +513,7 @@ int register_android_media_JetPlayer(JNIEnv *env) // Get the JetPlayer java class jetPlayerClass = env->FindClass(kClassPathName); if (jetPlayerClass == NULL) { - LOGE("Can't find %s", kClassPathName); + ALOGE("Can't find %s", kClassPathName); return -1; } javaJetPlayerFields.jetClass = (jclass)env->NewGlobalRef(jetPlayerClass); @@ -523,7 +523,7 @@ int register_android_media_JetPlayer(JNIEnv *env) jetPlayerClass, JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME, "I"); if (javaJetPlayerFields.nativePlayerInJavaObj == NULL) { - LOGE("Can't find AudioTrack.%s", JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME); + ALOGE("Can't find AudioTrack.%s", JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME); return -1; } @@ -531,7 +531,7 @@ int register_android_media_JetPlayer(JNIEnv *env) javaJetPlayerFields.postNativeEventInJava = env->GetStaticMethodID(javaJetPlayerFields.jetClass, JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;III)V"); if (javaJetPlayerFields.postNativeEventInJava == NULL) { - LOGE("Can't find Jet.%s", JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME); + ALOGE("Can't find Jet.%s", JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME); return -1; } diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp index 965afae..49be1c7 100644 --- a/core/jni/android_media_ToneGenerator.cpp +++ b/core/jni/android_media_ToneGenerator.cpp @@ -86,14 +86,14 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz, ALOGV("android_media_ToneGenerator_native_setup jobject: %x\n", (int)thiz); if (lpToneGen == NULL) { - LOGE("ToneGenerator creation failed \n"); + ALOGE("ToneGenerator creation failed \n"); jniThrowException(env, "java/lang/OutOfMemoryError", NULL); return; } ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen); if (!lpToneGen->isInited()) { - LOGE("ToneGenerator init failed \n"); + ALOGE("ToneGenerator init failed \n"); jniThrowRuntimeException(env, "Init failed"); return; } @@ -133,13 +133,13 @@ int register_android_media_ToneGenerator(JNIEnv *env) { clazz = env->FindClass("android/media/ToneGenerator"); if (clazz == NULL) { - LOGE("Can't find %s", "android/media/ToneGenerator"); + ALOGE("Can't find %s", "android/media/ToneGenerator"); return -1; } fields.context = env->GetFieldID(clazz, "mNativeContext", "I"); if (fields.context == NULL) { - LOGE("Can't find ToneGenerator.mNativeContext"); + ALOGE("Can't find ToneGenerator.mNativeContext"); return -1; } ALOGV("register_android_media_ToneGenerator ToneGenerator fields.context: %x", (unsigned int)fields.context); diff --git a/core/jni/android_net_LocalSocketImpl.cpp b/core/jni/android_net_LocalSocketImpl.cpp index c8add70..1426b2c 100644 --- a/core/jni/android_net_LocalSocketImpl.cpp +++ b/core/jni/android_net_LocalSocketImpl.cpp @@ -957,7 +957,7 @@ int register_android_net_LocalSocketImpl(JNIEnv *env) "android/net/LocalSocketImpl", gMethods, NELEM(gMethods)); error: - LOGE("Error registering android.net.LocalSocketImpl"); + ALOGE("Error registering android.net.LocalSocketImpl"); return -1; } diff --git a/core/jni/android_net_TrafficStats.cpp b/core/jni/android_net_TrafficStats.cpp index 7a61432..0ab659b 100644 --- a/core/jni/android_net_TrafficStats.cpp +++ b/core/jni/android_net_TrafficStats.cpp @@ -47,13 +47,13 @@ static jlong readNumber(char const* filename) { char buf[80]; int fd = open(filename, O_RDONLY); if (fd < 0) { - if (errno != ENOENT) LOGE("Can't open %s: %s", filename, strerror(errno)); + if (errno != ENOENT) ALOGE("Can't open %s: %s", filename, strerror(errno)); return -1; } int len = read(fd, buf, sizeof(buf) - 1); if (len < 0) { - LOGE("Can't read %s: %s", filename, strerror(errno)); + ALOGE("Can't read %s: %s", filename, strerror(errno)); close(fd); return -1; } @@ -101,7 +101,7 @@ static jlong readTotal(char const* suffix) { char filename[PATH_MAX] = "/sys/class/net/"; DIR *dir = opendir(filename); if (dir == NULL) { - LOGE("Can't list %s: %s", filename, strerror(errno)); + ALOGE("Can't list %s: %s", filename, strerror(errno)); return -1; } diff --git a/core/jni/android_nfc_NdefMessage.cpp b/core/jni/android_nfc_NdefMessage.cpp index 82476cd..e6c0554 100644 --- a/core/jni/android_nfc_NdefMessage.cpp +++ b/core/jni/android_nfc_NdefMessage.cpp @@ -55,7 +55,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o, (uint32_t)raw_msg_size, NULL, NULL, &num_of_records); if (status) { - LOGE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status); + ALOGE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status); goto end; } TRACE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x, with %d records", status, num_of_records); @@ -74,7 +74,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o, (uint32_t)raw_msg_size, records, is_chunked, &num_of_records); if (status) { - LOGE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status); + ALOGE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status); goto end; } TRACE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x, with %d records", status, num_of_records); @@ -97,7 +97,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o, status = phFriNfc_NdefRecord_Parse(&record, records[i]); if (status) { - LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); + ALOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); goto end; } TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); @@ -111,7 +111,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o, (uint64_t)record.PayloadLength; if (indicatedMsgLength > (uint64_t)raw_msg_size) { - LOGE("phFri_NdefRecord_Parse: invalid length field"); + ALOGE("phFri_NdefRecord_Parse: invalid length field"); goto end; } diff --git a/core/jni/android_nfc_NdefRecord.cpp b/core/jni/android_nfc_NdefRecord.cpp index 67907b6..2d0e2b9 100644 --- a/core/jni/android_nfc_NdefRecord.cpp +++ b/core/jni/android_nfc_NdefRecord.cpp @@ -60,7 +60,7 @@ static jbyteArray android_nfc_NdefRecord_generate( &record_size); if (status) { - LOGE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status); + ALOGE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status); goto end; } TRACE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status); @@ -107,7 +107,7 @@ static jint android_nfc_NdefRecord_parseNdefRecord(JNIEnv *e, jobject o, TRACE("phFriNfc_NdefRecord_Parse()"); status = phFriNfc_NdefRecord_Parse(&record, (uint8_t *)raw_record); if (status) { - LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); + ALOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); goto clean_and_return; } TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status); diff --git a/core/jni/android_os_StatFs.cpp b/core/jni/android_os_StatFs.cpp index c658aa5..79d8fef 100644 --- a/core/jni/android_os_StatFs.cpp +++ b/core/jni/android_os_StatFs.cpp @@ -91,7 +91,7 @@ android_os_StatFs_native_restat(JNIEnv *env, jobject thiz, jstring path) // note that stat will contain the new file data corresponding to // pathstr if (statfs(pathstr, stat) != 0) { - LOGE("statfs %s failed, errno: %d", pathstr, errno); + ALOGE("statfs %s failed, errno: %d", pathstr, errno); delete stat; env->SetIntField(thiz, fields.context, 0); jniThrowException(env, "java/lang/IllegalArgumentException", NULL); @@ -146,13 +146,13 @@ int register_android_os_StatFs(JNIEnv *env) clazz = env->FindClass("android/os/StatFs"); if (clazz == NULL) { - LOGE("Can't find android/os/StatFs"); + ALOGE("Can't find android/os/StatFs"); return -1; } fields.context = env->GetFieldID(clazz, "mNativeContext", "I"); if (fields.context == NULL) { - LOGE("Can't find StatFs.mNativeContext"); + ALOGE("Can't find StatFs.mNativeContext"); return -1; } diff --git a/core/jni/android_os_UEventObserver.cpp b/core/jni/android_os_UEventObserver.cpp index 7f31b00..5639f4f 100644 --- a/core/jni/android_os_UEventObserver.cpp +++ b/core/jni/android_os_UEventObserver.cpp @@ -59,7 +59,7 @@ int register_android_os_UEventObserver(JNIEnv *env) clazz = env->FindClass("android/os/UEventObserver"); if (clazz == NULL) { - LOGE("Can't find android/os/UEventObserver"); + ALOGE("Can't find android/os/UEventObserver"); return -1; } diff --git a/core/jni/android_server_BluetoothA2dpService.cpp b/core/jni/android_server_BluetoothA2dpService.cpp index 2bab4b5..d065a9e 100644 --- a/core/jni/android_server_BluetoothA2dpService.cpp +++ b/core/jni/android_server_BluetoothA2dpService.cpp @@ -65,7 +65,7 @@ static bool initNative(JNIEnv* env, jobject object) { #ifdef HAVE_BLUETOOTH nat = (native_data_t *)calloc(1, sizeof(native_data_t)); if (NULL == nat) { - LOGE("%s: out of memory!", __FUNCTION__); + ALOGE("%s: out of memory!", __FUNCTION__); return false; } env->GetJavaVM( &(nat->vm) ); @@ -77,7 +77,7 @@ static bool initNative(JNIEnv* env, jobject object) { dbus_threads_init_default(); nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { - LOGE("Could not get onto the system bus: %s", err.message); + ALOGE("Could not get onto the system bus: %s", err.message); dbus_error_free(&err); return false; } @@ -117,7 +117,7 @@ static jobjectArray getSinkPropertiesNative(JNIEnv *env, jobject object, LOG_AND_FREE_DBUS_ERROR_WITH_MSG(&err, reply); return NULL; } else if (!reply) { - LOGE("DBus reply is NULL in function %s", __FUNCTION__); + ALOGE("DBus reply is NULL in function %s", __FUNCTION__); return NULL; } DBusMessageIter iter; @@ -268,7 +268,7 @@ DBusHandlerResult a2dp_event_filter(DBusMessage *msg, JNIEnv *env) { ALOGV("... ignored"); } if (env->ExceptionCheck()) { - LOGE("VM Exception occurred while handling %s.%s (%s) in %s," + ALOGE("VM Exception occurred while handling %s.%s (%s) in %s," " leaving for VM", dbus_message_get_interface(msg), dbus_message_get_member(msg), dbus_message_get_path(msg), __FUNCTION__); @@ -326,7 +326,7 @@ static JNINativeMethod sMethods[] = { int register_android_server_BluetoothA2dpService(JNIEnv *env) { jclass clazz = env->FindClass("android/server/BluetoothA2dpService"); if (clazz == NULL) { - LOGE("Can't find android/server/BluetoothA2dpService"); + ALOGE("Can't find android/server/BluetoothA2dpService"); return -1; } diff --git a/core/jni/android_server_BluetoothEventLoop.cpp b/core/jni/android_server_BluetoothEventLoop.cpp index 1924dbf..9292fc0 100644 --- a/core/jni/android_server_BluetoothEventLoop.cpp +++ b/core/jni/android_server_BluetoothEventLoop.cpp @@ -161,7 +161,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) { #ifdef HAVE_BLUETOOTH native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t)); if (NULL == nat) { - LOGE("%s: out of memory!", __FUNCTION__); + ALOGE("%s: out of memory!", __FUNCTION__); return; } memset(nat, 0, sizeof(native_data_t)); @@ -176,7 +176,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) { dbus_threads_init_default(); nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { - LOGE("%s: Could not get onto the system bus!", __FUNCTION__); + ALOGE("%s: Could not get onto the system bus!", __FUNCTION__); dbus_error_free(&err); } dbus_connection_set_exit_on_disconnect(nat->conn, FALSE); @@ -321,7 +321,7 @@ const char * get_adapter_path(DBusConnection *conn) { msg = dbus_message_new_method_call("org.bluez", "/", "org.bluez.Manager", "DefaultAdapter"); if (!msg) { - LOGE("%s: Can't allocate new method call for get_adapter_path!", + ALOGE("%s: Can't allocate new method call for get_adapter_path!", __FUNCTION__); return NULL; } @@ -346,7 +346,7 @@ const char * get_adapter_path(DBusConnection *conn) { } } if (attempt == 1000) { - LOGE("Time out while trying to get Adapter path, is bluetoothd up ?"); + ALOGE("Time out while trying to get Adapter path, is bluetoothd up ?"); goto failed; } @@ -375,7 +375,7 @@ static int register_agent(native_data_t *nat, if (!dbus_connection_register_object_path(nat->conn, agent_path, &agent_vtable, nat)) { - LOGE("%s: Can't register object path %s for agent!", + ALOGE("%s: Can't register object path %s for agent!", __FUNCTION__, agent_path); return -1; } @@ -387,7 +387,7 @@ static int register_agent(native_data_t *nat, msg = dbus_message_new_method_call("org.bluez", nat->adapter, "org.bluez.Adapter", "RegisterAgent"); if (!msg) { - LOGE("%s: Can't allocate new method call for agent!", + ALOGE("%s: Can't allocate new method call for agent!", __FUNCTION__); return -1; } @@ -400,7 +400,7 @@ static int register_agent(native_data_t *nat, dbus_message_unref(msg); if (!reply) { - LOGE("%s: Can't register agent!", __FUNCTION__); + ALOGE("%s: Can't register agent!", __FUNCTION__); if (dbus_error_is_set(&err)) { LOG_AND_FREE_DBUS_ERROR(&err); } @@ -442,7 +442,7 @@ static void tearDownEventLoop(native_data_t *nat) { } dbus_message_unref(msg); } else { - LOGE("%s: Can't create new method call!", __FUNCTION__); + ALOGE("%s: Can't create new method call!", __FUNCTION__); } dbus_connection_flush(nat->conn); @@ -725,14 +725,14 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) { nat->pollData = (struct pollfd *)malloc(sizeof(struct pollfd) * DEFAULT_INITIAL_POLLFD_COUNT); if (!nat->pollData) { - LOGE("out of memory error starting EventLoop!"); + ALOGE("out of memory error starting EventLoop!"); goto done; } nat->watchData = (DBusWatch **)malloc(sizeof(DBusWatch *) * DEFAULT_INITIAL_POLLFD_COUNT); if (!nat->watchData) { - LOGE("out of memory error starting EventLoop!"); + ALOGE("out of memory error starting EventLoop!"); goto done; } @@ -744,7 +744,7 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) { nat->pollMemberCount = 1; if (socketpair(AF_LOCAL, SOCK_STREAM, 0, &(nat->controlFdR))) { - LOGE("Error getting BT control socket"); + ALOGE("Error getting BT control socket"); goto done; } nat->pollData[0].fd = nat->controlFdR; @@ -756,7 +756,7 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) { nat->me = env->NewGlobalRef(object); if (setUpEventLoop(nat) != JNI_TRUE) { - LOGE("failure setting up Event Loop!"); + ALOGE("failure setting up Event Loop!"); goto done; } @@ -1111,7 +1111,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, // reply DBusMessage *reply = dbus_message_new_method_return(msg); if (!reply) { - LOGE("%s: Cannot create message reply\n", __FUNCTION__); + ALOGE("%s: Cannot create message reply\n", __FUNCTION__); goto failure; } dbus_connection_send(nat->conn, reply, NULL); @@ -1126,7 +1126,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_STRING, &uuid, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for Authorize() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for Authorize() method", __FUNCTION__); goto failure; } @@ -1145,7 +1145,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for OutOfBandData available() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for OutOfBandData available() method", __FUNCTION__); goto failure; } @@ -1160,7 +1160,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (available) { DBusMessage *reply = dbus_message_new_method_return(msg); if (!reply) { - LOGE("%s: Cannot create message reply\n", __FUNCTION__); + ALOGE("%s: Cannot create message reply\n", __FUNCTION__); goto failure; } dbus_connection_send(nat->conn, reply, NULL); @@ -1169,7 +1169,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, DBusMessage *reply = dbus_message_new_error(msg, "org.bluez.Error.DoesNotExist", "OutofBand data not available"); if (!reply) { - LOGE("%s: Cannot create message reply\n", __FUNCTION__); + ALOGE("%s: Cannot create message reply\n", __FUNCTION__); goto failure; } dbus_connection_send(nat->conn, reply, NULL); @@ -1182,7 +1182,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestPinCode() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestPinCode() method", __FUNCTION__); goto failure; } @@ -1197,7 +1197,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__); goto failure; } @@ -1212,7 +1212,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestOobData() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestOobData() method", __FUNCTION__); goto failure; } @@ -1229,7 +1229,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_UINT32, &passkey, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__); goto failure; } @@ -1247,7 +1247,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_UINT32, &passkey, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestConfirmation() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestConfirmation() method", __FUNCTION__); goto failure; } @@ -1263,7 +1263,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID)) { - LOGE("%s: Invalid arguments for RequestPairingConsent() method", __FUNCTION__); + ALOGE("%s: Invalid arguments for RequestPairingConsent() method", __FUNCTION__); goto failure; } @@ -1277,7 +1277,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn, // reply DBusMessage *reply = dbus_message_new_method_return(msg); if (!reply) { - LOGE("%s: Cannot create message reply\n", __FUNCTION__); + ALOGE("%s: Cannot create message reply\n", __FUNCTION__); goto failure; } dbus_connection_send(nat->conn, reply, NULL); @@ -1354,7 +1354,7 @@ void onCreatePairedDeviceResult(DBusMessage *msg, void *user, void *n) { ALOGV("... error = %s (%s)\n", err.name, err.message); result = BOND_RESULT_AUTH_TIMEOUT; } else { - LOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message); + ALOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message); result = BOND_RESULT_ERROR; } } @@ -1445,7 +1445,7 @@ void onGetDeviceServiceChannelResult(DBusMessage *msg, void *user, void *n) { !dbus_message_get_args(msg, &err, DBUS_TYPE_INT32, &channel, DBUS_TYPE_INVALID)) { - LOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message); + ALOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message); dbus_error_free(&err); } diff --git a/core/jni/android_server_BluetoothService.cpp b/core/jni/android_server_BluetoothService.cpp index 2aeca86..eba378d 100644 --- a/core/jni/android_server_BluetoothService.cpp +++ b/core/jni/android_server_BluetoothService.cpp @@ -89,7 +89,7 @@ static inline native_data_t * get_native_data(JNIEnv *env, jobject object) { native_data_t *nat = (native_data_t *)(env->GetIntField(object, field_mNativeData)); if (nat == NULL || nat->conn == NULL) { - LOGE("Uninitialized native data\n"); + ALOGE("Uninitialized native data\n"); return NULL; } return nat; @@ -113,7 +113,7 @@ static bool initializeNativeDataNative(JNIEnv* env, jobject object) { #ifdef HAVE_BLUETOOTH native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t)); if (NULL == nat) { - LOGE("%s: out of memory!", __FUNCTION__); + ALOGE("%s: out of memory!", __FUNCTION__); return false; } nat->env = env; @@ -124,7 +124,7 @@ static bool initializeNativeDataNative(JNIEnv* env, jobject object) { dbus_threads_init_default(); nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { - LOGE("Could not get onto the system bus: %s", err.message); + ALOGE("Could not get onto the system bus: %s", err.message); dbus_error_free(&err); return false; } @@ -162,7 +162,7 @@ static jboolean setupNativeDataNative(JNIEnv* env, jobject object) { if (!dbus_connection_register_object_path(nat->conn, device_agent_path, &agent_vtable, event_nat)) { - LOGE("%s: Can't register object path %s for remote device agent!", + ALOGE("%s: Can't register object path %s for remote device agent!", __FUNCTION__, device_agent_path); return JNI_FALSE; } @@ -332,7 +332,7 @@ static jbyteArray readAdapterOutOfBandDataNative(JNIEnv *env, jobject object) { env->SetByteArrayRegion(byteArray, 16, 16, randomizer); } } else { - LOGE("readAdapterOutOfBandDataNative: Hash len = %d, R len = %d", + ALOGE("readAdapterOutOfBandDataNative: Hash len = %d, R len = %d", hash_len, r_len); } } else { @@ -466,7 +466,7 @@ static jboolean cancelDeviceCreationNative(JNIEnv *env, jobject object, if (dbus_error_is_set(&err)) { LOG_AND_FREE_DBUS_ERROR(&err); } else - LOGE("DBus reply is NULL in function %s", __FUNCTION__); + ALOGE("DBus reply is NULL in function %s", __FUNCTION__); return JNI_FALSE; } else { result = JNI_TRUE; @@ -540,7 +540,7 @@ static jboolean setPairingConfirmationNative(JNIEnv *env, jobject object, } if (!reply) { - LOGE("%s: Cannot create message reply to RequestPasskeyConfirmation or" + ALOGE("%s: Cannot create message reply to RequestPasskeyConfirmation or" "RequestPairingConsent to D-Bus\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; @@ -564,7 +564,7 @@ static jboolean setPasskeyNative(JNIEnv *env, jobject object, jstring address, DBusMessage *msg = (DBusMessage *)nativeData; DBusMessage *reply = dbus_message_new_method_return(msg); if (!reply) { - LOGE("%s: Cannot create message reply to return Passkey code to " + ALOGE("%s: Cannot create message reply to return Passkey code to " "D-Bus\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; @@ -593,7 +593,7 @@ static jboolean setRemoteOutOfBandDataNative(JNIEnv *env, jobject object, jstrin jbyte *h_ptr = env->GetByteArrayElements(hash, NULL); jbyte *r_ptr = env->GetByteArrayElements(randomizer, NULL); if (!reply) { - LOGE("%s: Cannot create message reply to return remote OOB data to " + ALOGE("%s: Cannot create message reply to return remote OOB data to " "D-Bus\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; @@ -631,7 +631,7 @@ static jboolean setAuthorizationNative(JNIEnv *env, jobject object, jstring addr "org.bluez.Error.Rejected", "Authorization rejected"); } if (!reply) { - LOGE("%s: Cannot create message reply D-Bus\n", __FUNCTION__); + ALOGE("%s: Cannot create message reply D-Bus\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; } @@ -654,7 +654,7 @@ static jboolean setPinNative(JNIEnv *env, jobject object, jstring address, DBusMessage *msg = (DBusMessage *)nativeData; DBusMessage *reply = dbus_message_new_method_return(msg); if (!reply) { - LOGE("%s: Cannot create message reply to return PIN code to " + ALOGE("%s: Cannot create message reply to return PIN code to " "D-Bus\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; @@ -685,7 +685,7 @@ static jboolean cancelPairingUserInputNative(JNIEnv *env, jobject object, DBusMessage *reply = dbus_message_new_error(msg, "org.bluez.Error.Canceled", "Pairing User Input was canceled"); if (!reply) { - LOGE("%s: Cannot create message reply to return cancelUserInput to" + ALOGE("%s: Cannot create message reply to return cancelUserInput to" "D-BUS\n", __FUNCTION__); dbus_message_unref(msg); return JNI_FALSE; @@ -722,7 +722,7 @@ static jobjectArray getDevicePropertiesNative(JNIEnv *env, jobject object, if (dbus_error_is_set(&err)) { LOG_AND_FREE_DBUS_ERROR(&err); } else - LOGE("DBus reply is NULL in function %s", __FUNCTION__); + ALOGE("DBus reply is NULL in function %s", __FUNCTION__); return NULL; } env->PushLocalFrame(PROPERTIES_NREFS); @@ -756,7 +756,7 @@ static jobjectArray getAdapterPropertiesNative(JNIEnv *env, jobject object) { if (dbus_error_is_set(&err)) { LOG_AND_FREE_DBUS_ERROR(&err); } else - LOGE("DBus reply is NULL in function %s", __FUNCTION__); + ALOGE("DBus reply is NULL in function %s", __FUNCTION__); return NULL; } env->PushLocalFrame(PROPERTIES_NREFS); @@ -788,7 +788,7 @@ static jboolean setAdapterPropertyNative(JNIEnv *env, jobject object, jstring ke get_adapter_path(env, object), DBUS_ADAPTER_IFACE, "SetProperty"); if (!msg) { - LOGE("%s: Can't allocate new method call for GetProperties!", + ALOGE("%s: Can't allocate new method call for GetProperties!", __FUNCTION__); env->ReleaseStringUTFChars(key, c_key); return JNI_FALSE; @@ -856,7 +856,7 @@ static jboolean setDevicePropertyNative(JNIEnv *env, jobject object, jstring pat msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC, c_path, DBUS_DEVICE_IFACE, "SetProperty"); if (!msg) { - LOGE("%s: Can't allocate new method call for device SetProperty!", __FUNCTION__); + ALOGE("%s: Can't allocate new method call for device SetProperty!", __FUNCTION__); env->ReleaseStringUTFChars(key, c_key); env->ReleaseStringUTFChars(path, c_path); return JNI_FALSE; @@ -985,7 +985,7 @@ static jintArray extract_handles(JNIEnv *env, DBusMessage *reply) { if (handleArray) { env->SetIntArrayRegion(handleArray, 0, len, handles); } else { - LOGE("Null array in extract_handles"); + ALOGE("Null array in extract_handles"); } } else { LOG_AND_FREE_DBUS_ERROR(&err); @@ -1169,7 +1169,7 @@ static jboolean setBluetoothTetheringNative(JNIEnv *env, jobject object, jboolea const char *c_role = env->GetStringUTFChars(src_role, NULL); const char *c_bridge = env->GetStringUTFChars(bridge, NULL); if (value) { - LOGE("setBluetoothTetheringNative true"); + ALOGE("setBluetoothTetheringNative true"); reply = dbus_func_args(env, nat->conn, get_adapter_path(env, object), DBUS_NETWORKSERVER_IFACE, @@ -1178,7 +1178,7 @@ static jboolean setBluetoothTetheringNative(JNIEnv *env, jobject object, jboolea DBUS_TYPE_STRING, &c_bridge, DBUS_TYPE_INVALID); } else { - LOGE("setBluetoothTetheringNative false"); + ALOGE("setBluetoothTetheringNative false"); reply = dbus_func_args(env, nat->conn, get_adapter_path(env, object), DBUS_NETWORKSERVER_IFACE, @@ -1198,7 +1198,7 @@ static jboolean connectPanDeviceNative(JNIEnv *env, jobject object, jstring path jstring dstRole) { ALOGV("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH - LOGE("connectPanDeviceNative"); + ALOGE("connectPanDeviceNative"); native_data_t *nat = get_native_data(env, object); jobject eventLoop = env->GetObjectField(object, field_mEventLoop); struct event_loop_native_data_t *eventLoopNat = @@ -1230,7 +1230,7 @@ static jboolean disconnectPanDeviceNative(JNIEnv *env, jobject object, jstring path) { ALOGV("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH - LOGE("disconnectPanDeviceNative"); + ALOGE("disconnectPanDeviceNative"); native_data_t *nat = get_native_data(env, object); jobject eventLoop = env->GetObjectField(object, field_mEventLoop); struct event_loop_native_data_t *eventLoopNat = @@ -1260,7 +1260,7 @@ static jboolean disconnectPanServerDeviceNative(JNIEnv *env, jobject object, jstring iface) { ALOGV("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH - LOGE("disconnectPanServerDeviceNative"); + ALOGE("disconnectPanServerDeviceNative"); native_data_t *nat = get_native_data(env, object); jobject eventLoop = env->GetObjectField(object, field_mEventLoop); struct event_loop_native_data_t *eventLoopNat = @@ -1316,7 +1316,7 @@ static jstring registerHealthApplicationNative(JNIEnv *env, jobject object, "CreateApplication"); if (msg == NULL) { - LOGE("Could not allocate D-Bus message object!"); + ALOGE("Could not allocate D-Bus message object!"); return NULL; } @@ -1379,7 +1379,7 @@ static jstring registerSinkHealthApplicationNative(JNIEnv *env, jobject object, "CreateApplication"); if (msg == NULL) { - LOGE("Could not allocate D-Bus message object!"); + ALOGE("Could not allocate D-Bus message object!"); return NULL; } @@ -1487,7 +1487,7 @@ static jboolean createChannelNative(JNIEnv *env, jobject object, static jboolean destroyChannelNative(JNIEnv *env, jobject object, jstring devicePath, jstring channelPath, jint code) { - LOGE("%s", __FUNCTION__); + ALOGE("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH native_data_t *nat = get_native_data(env, object); jobject eventLoop = env->GetObjectField(object, field_mEventLoop); @@ -1517,7 +1517,7 @@ static jboolean destroyChannelNative(JNIEnv *env, jobject object, jstring device } static jstring getMainChannelNative(JNIEnv *env, jobject object, jstring devicePath) { - LOGE("%s", __FUNCTION__); + ALOGE("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH native_data_t *nat = get_native_data(env, object); if (nat) { @@ -1551,7 +1551,7 @@ static jstring getMainChannelNative(JNIEnv *env, jobject object, jstring deviceP } static jstring getChannelApplicationNative(JNIEnv *env, jobject object, jstring channelPath) { - LOGE("%s", __FUNCTION__); + ALOGE("%s", __FUNCTION__); #ifdef HAVE_BLUETOOTH native_data_t *nat = get_native_data(env, object); if (nat) { diff --git a/core/jni/android_server_NetworkManagementSocketTagger.cpp b/core/jni/android_server_NetworkManagementSocketTagger.cpp index c279ced..12beff7 100644 --- a/core/jni/android_server_NetworkManagementSocketTagger.cpp +++ b/core/jni/android_server_NetworkManagementSocketTagger.cpp @@ -36,7 +36,7 @@ static jint QTagUid_tagSocketFd(JNIEnv* env, jclass, int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor); if (env->ExceptionOccurred() != NULL) { - LOGE("Can't get FileDescriptor num"); + ALOGE("Can't get FileDescriptor num"); return (jint)-1; } @@ -52,7 +52,7 @@ static int QTagUid_untagSocketFd(JNIEnv* env, jclass, int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor); if (env->ExceptionOccurred() != NULL) { - LOGE("Can't get FileDescriptor num"); + ALOGE("Can't get FileDescriptor num"); return (jint)-1; } diff --git a/core/jni/android_server_Watchdog.cpp b/core/jni/android_server_Watchdog.cpp index cf52833..6726c14 100644 --- a/core/jni/android_server_Watchdog.cpp +++ b/core/jni/android_server_Watchdog.cpp @@ -48,7 +48,7 @@ static void dumpOneStack(int tid, int outFd) { write(outFd, "\n", 1); close(stackFd); } else { - LOGE("Unable to open stack of tid %d : %d (%s)", tid, errno, strerror(errno)); + ALOGE("Unable to open stack of tid %d : %d (%s)", tid, errno, strerror(errno)); } } @@ -67,7 +67,7 @@ static void dumpKernelStacks(JNIEnv* env, jobject clazz, jstring pathStr) { int outFd = open(path, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); if (outFd < 0) { - LOGE("Unable to open stack dump file: %d (%s)", errno, strerror(errno)); + ALOGE("Unable to open stack dump file: %d (%s)", errno, strerror(errno)); goto done; } diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index 4d6bfbc..990a617 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -194,8 +194,8 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg) if ((tagstr == NULL) || (msgstr == NULL)) { env->ExceptionClear(); /* assume exception (OOM?) was thrown */ - LOGE("Unable to call Log.e()\n"); - LOGE("%s", msg); + ALOGE("Unable to call Log.e()\n"); + ALOGE("%s", msg); goto bail; } @@ -221,7 +221,7 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg) env->Throw(excep); vm->DetachCurrentThread(); sleep(60); - LOGE("Forcefully exiting"); + ALOGE("Forcefully exiting"); exit(1); *((int *) 1) = 1; } @@ -699,7 +699,7 @@ static void signalExceptionForError(JNIEnv* env, jobject obj, status_t err, jniThrowException(env, "java/lang/RuntimeException", "Unknown transaction code"); break; case FAILED_TRANSACTION: - LOGE("!!! FAILED BINDER TRANSACTION !!!"); + ALOGE("!!! FAILED BINDER TRANSACTION !!!"); // TransactionTooLargeException is a checked exception, only throw from certain methods. // FIXME: Transaction too large is the most common reason for FAILED_TRANSACTION // but it is not the only one. The Binder driver can return BR_FAILED_REPLY @@ -715,7 +715,7 @@ static void signalExceptionForError(JNIEnv* env, jobject obj, status_t err, "Not allowed to write file descriptors here"); break; default: - LOGE("Unknown binder error code. 0x%x", err); + ALOGE("Unknown binder error code. 0x%x", err); String8 msg; msg.appendFormat("Unknown binder error code. 0x%x", err); // RemoteException is a checked exception, only throw from certain methods. diff --git a/core/jni/android_util_EventLog.cpp b/core/jni/android_util_EventLog.cpp index 5d51110..a3981ce 100644 --- a/core/jni/android_util_EventLog.cpp +++ b/core/jni/android_util_EventLog.cpp @@ -267,7 +267,7 @@ int register_android_util_EventLog(JNIEnv* env) { for (int i = 0; i < NELEM(gClasses); ++i) { jclass clazz = env->FindClass(gClasses[i].name); if (clazz == NULL) { - LOGE("Can't find class: %s\n", gClasses[i].name); + ALOGE("Can't find class: %s\n", gClasses[i].name); return -1; } *gClasses[i].clazz = (jclass) env->NewGlobalRef(clazz); @@ -277,7 +277,7 @@ int register_android_util_EventLog(JNIEnv* env) { *gFields[i].id = env->GetFieldID( *gFields[i].c, gFields[i].name, gFields[i].ft); if (*gFields[i].id == NULL) { - LOGE("Can't find field: %s\n", gFields[i].name); + ALOGE("Can't find field: %s\n", gFields[i].name); return -1; } } @@ -286,7 +286,7 @@ int register_android_util_EventLog(JNIEnv* env) { *gMethods[i].id = env->GetMethodID( *gMethods[i].c, gMethods[i].name, gMethods[i].mt); if (*gMethods[i].id == NULL) { - LOGE("Can't find method: %s\n", gMethods[i].name); + ALOGE("Can't find method: %s\n", gMethods[i].name); return -1; } } diff --git a/core/jni/android_util_FileObserver.cpp b/core/jni/android_util_FileObserver.cpp index 65e7130..0327d8c 100644 --- a/core/jni/android_util_FileObserver.cpp +++ b/core/jni/android_util_FileObserver.cpp @@ -67,7 +67,7 @@ static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd if (errno == EINTR) continue; - LOGE("***** ERROR! android_os_fileobserver_observe() got a short event!"); + ALOGE("***** ERROR! android_os_fileobserver_observe() got a short event!"); return; } @@ -148,14 +148,14 @@ int register_android_os_FileObserver(JNIEnv* env) if (clazz == NULL) { - LOGE("Can't find android/os/FileObserver$ObserverThread"); + ALOGE("Can't find android/os/FileObserver$ObserverThread"); return -1; } method_onEvent = env->GetMethodID(clazz, "onEvent", "(IILjava/lang/String;)V"); if (method_onEvent == NULL) { - LOGE("Can't find FileObserver.onEvent(int, int, String)"); + ALOGE("Can't find FileObserver.onEvent(int, int, String)"); return -1; } diff --git a/core/jni/android_util_Log.cpp b/core/jni/android_util_Log.cpp index 2c7bb84..a57aad7 100644 --- a/core/jni/android_util_Log.cpp +++ b/core/jni/android_util_Log.cpp @@ -139,7 +139,7 @@ int register_android_util_Log(JNIEnv* env) jclass clazz = env->FindClass("android/util/Log"); if (clazz == NULL) { - LOGE("Can't find android/util/Log"); + ALOGE("Can't find android/util/Log"); return -1; } diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp index 9245d99..2c494ac 100644 --- a/core/jni/android_util_Process.cpp +++ b/core/jni/android_util_Process.cpp @@ -227,7 +227,7 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin t_pid = atoi(de->d_name); if (!t_pid) { - LOGE("Error getting pid for '%s'\n", de->d_name); + ALOGE("Error getting pid for '%s'\n", de->d_name); continue; } @@ -274,7 +274,7 @@ void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz, if (pid == androidGetTid()) { void* bgOk = pthread_getspecific(gBgKey); if (bgOk == ((void*)0xbaad)) { - LOGE("Thread marked fg-only put self in background!"); + ALOGE("Thread marked fg-only put self in background!"); jniThrowException(env, "java/lang/SecurityException", "May not put this thread into background"); return; } diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index d4b9024..03d94c9 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -492,7 +492,7 @@ static void renderText(OpenGLRenderer* renderer, const jchar* text, int count, #if USE_TEXT_LAYOUT_CACHE value = TextLayoutCache::getInstance().getValue(paint, text, 0, count, count, flags); if (value == NULL) { - LOGE("Cannot get TextLayoutCache value"); + ALOGE("Cannot get TextLayoutCache value"); return ; } #else @@ -522,7 +522,7 @@ static void renderTextRun(OpenGLRenderer* renderer, const jchar* text, #if USE_TEXT_LAYOUT_CACHE value = TextLayoutCache::getInstance().getValue(paint, text, start, count, contextCount, flags); if (value == NULL) { - LOGE("Cannot get TextLayoutCache value"); + ALOGE("Cannot get TextLayoutCache value"); return ; } #else diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp index e0976a1..fce432b 100644 --- a/core/jni/android_view_InputChannel.cpp +++ b/core/jni/android_view_InputChannel.cpp @@ -202,17 +202,17 @@ static void android_view_InputChannel_nativeReadFromParcel(JNIEnv* env, jobject int32_t parcelAshmemFd = parcel->readFileDescriptor(); int32_t ashmemFd = dup(parcelAshmemFd); if (ashmemFd < 0) { - LOGE("Error %d dup ashmem fd %d.", errno, parcelAshmemFd); + ALOGE("Error %d dup ashmem fd %d.", errno, parcelAshmemFd); } int32_t parcelReceivePipeFd = parcel->readFileDescriptor(); int32_t receivePipeFd = dup(parcelReceivePipeFd); if (receivePipeFd < 0) { - LOGE("Error %d dup receive pipe fd %d.", errno, parcelReceivePipeFd); + ALOGE("Error %d dup receive pipe fd %d.", errno, parcelReceivePipeFd); } int32_t parcelSendPipeFd = parcel->readFileDescriptor(); int32_t sendPipeFd = dup(parcelSendPipeFd); if (sendPipeFd < 0) { - LOGE("Error %d dup send pipe fd %d.", errno, parcelSendPipeFd); + ALOGE("Error %d dup send pipe fd %d.", errno, parcelSendPipeFd); } if (ashmemFd < 0 || receivePipeFd < 0 || sendPipeFd < 0) { if (ashmemFd >= 0) ::close(ashmemFd); diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp index f4955cd..8541933 100644 --- a/core/jni/android_view_InputQueue.cpp +++ b/core/jni/android_view_InputQueue.cpp @@ -307,14 +307,14 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat ssize_t connectionIndex = q->mConnectionsByReceiveFd.indexOfKey(receiveFd); if (connectionIndex < 0) { - LOGE("Received spurious receive callback for unknown input channel. " + ALOGE("Received spurious receive callback for unknown input channel. " "fd=%d, events=0x%x", receiveFd, events); return 0; // remove the callback } connection = q->mConnectionsByReceiveFd.valueAt(connectionIndex); if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) { - LOGE("channel '%s' ~ Publisher closed input channel or an error occurred. " + ALOGE("channel '%s' ~ Publisher closed input channel or an error occurred. " "events=0x%x", connection->getInputChannelName(), events); return 0; // remove the callback } @@ -327,7 +327,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat status_t status = connection->inputConsumer.receiveDispatchSignal(); if (status) { - LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d", + ALOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d", connection->getInputChannelName(), status); return 0; // remove the callback } @@ -409,7 +409,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat #endif if (env->ExceptionCheck()) { - LOGE("An exception occurred while invoking the input handler for an event."); + ALOGE("An exception occurred while invoking the input handler for an event."); LOGE_EX(env); env->ExceptionClear(); diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp index 78951aa..27469a2 100644 --- a/core/jni/android_view_KeyEvent.cpp +++ b/core/jni/android_view_KeyEvent.cpp @@ -63,7 +63,7 @@ jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event) { event->getSource(), NULL); if (env->ExceptionCheck()) { - LOGE("An exception occurred while obtaining a key event."); + ALOGE("An exception occurred while obtaining a key event."); LOGE_EX(env); env->ExceptionClear(); return NULL; diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp index fccc66e..2def1d1 100644 --- a/core/jni/android_view_MotionEvent.cpp +++ b/core/jni/android_view_MotionEvent.cpp @@ -80,7 +80,7 @@ jobject android_view_MotionEvent_obtainAsCopy(JNIEnv* env, const MotionEvent* ev jobject eventObj = env->CallStaticObjectMethod(gMotionEventClassInfo.clazz, gMotionEventClassInfo.obtain); if (env->ExceptionCheck() || !eventObj) { - LOGE("An exception occurred while obtaining a motion event."); + ALOGE("An exception occurred while obtaining a motion event."); LOGE_EX(env); env->ExceptionClear(); return NULL; |