summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-10 13:36:24 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-10 13:36:24 -0800
commit5dd4754f58e5e99f893749ab3bb3eda1de4cfbe7 (patch)
tree14c9872ac8124bae26a3cdc4b96a28716b15de1e /core/jni
parentc1513f42eecca54c385a6e63abe6ddcfff5c911c (diff)
parent0765c448ab7d51355a7b1e82d359acfcf169f481 (diff)
downloadframeworks_base-5dd4754f58e5e99f893749ab3bb3eda1de4cfbe7.zip
frameworks_base-5dd4754f58e5e99f893749ab3bb3eda1de4cfbe7.tar.gz
frameworks_base-5dd4754f58e5e99f893749ab3bb3eda1de4cfbe7.tar.bz2
Merge "No newline or space at end of ALOG format string"
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_media_ToneGenerator.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp
index 26e82aa..aabb778 100644
--- a/core/jni/android_media_ToneGenerator.cpp
+++ b/core/jni/android_media_ToneGenerator.cpp
@@ -39,7 +39,7 @@ struct fields_t {
static fields_t fields;
static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz, jint toneType, jint durationMs) {
- ALOGV("android_media_ToneGenerator_startTone: %x\n", (int)thiz);
+ ALOGV("android_media_ToneGenerator_startTone: %x", (int)thiz);
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
fields.context);
@@ -52,12 +52,12 @@ static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz,
}
static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) {
- ALOGV("android_media_ToneGenerator_stopTone: %x\n", (int)thiz);
+ ALOGV("android_media_ToneGenerator_stopTone: %x", (int)thiz);
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
fields.context);
- ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen);
+ ALOGV("ToneGenerator lpToneGen: %x", (unsigned int)lpToneGen);
if (lpToneGen == NULL) {
jniThrowRuntimeException(env, "Method called after release()");
return;
@@ -68,7 +68,7 @@ static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) {
static void android_media_ToneGenerator_release(JNIEnv *env, jobject thiz) {
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
fields.context);
- ALOGV("android_media_ToneGenerator_release lpToneGen: %x\n", (int)lpToneGen);
+ ALOGV("android_media_ToneGenerator_release lpToneGen: %x", (int)lpToneGen);
env->SetIntField(thiz, fields.context, 0);
@@ -83,17 +83,17 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
env->SetIntField(thiz, fields.context, 0);
- ALOGV("android_media_ToneGenerator_native_setup jobject: %x\n", (int)thiz);
+ ALOGV("android_media_ToneGenerator_native_setup jobject: %x", (int)thiz);
if (lpToneGen == NULL) {
- ALOGE("ToneGenerator creation failed \n");
+ ALOGE("ToneGenerator creation failed");
jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
return;
}
- ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen);
+ ALOGV("ToneGenerator lpToneGen: %x", (unsigned int)lpToneGen);
if (!lpToneGen->isInited()) {
- ALOGE("ToneGenerator init failed \n");
+ ALOGE("ToneGenerator init failed");
jniThrowRuntimeException(env, "Init failed");
return;
}
@@ -101,18 +101,18 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
// Stow our new C++ ToneGenerator in an opaque field in the Java object.
env->SetIntField(thiz, fields.context, (int)lpToneGen);
- ALOGV("ToneGenerator fields.context: %x\n", env->GetIntField(thiz, fields.context));
+ ALOGV("ToneGenerator fields.context: %x", env->GetIntField(thiz, fields.context));
}
static void android_media_ToneGenerator_native_finalize(JNIEnv *env,
jobject thiz) {
- ALOGV("android_media_ToneGenerator_native_finalize jobject: %x\n", (int)thiz);
+ ALOGV("android_media_ToneGenerator_native_finalize jobject: %x", (int)thiz);
ToneGenerator *lpToneGen = (ToneGenerator *)env->GetIntField(thiz,
fields.context);
- if (lpToneGen) {
- ALOGV("delete lpToneGen: %x\n", (int)lpToneGen);
+ if (lpToneGen != NULL) {
+ ALOGV("delete lpToneGen: %p", lpToneGen);
delete lpToneGen;
}
}