Misc cleanups

Change-Id: I28308f12c3064299acefc346b72279036c3726a7
main
Ken Wakasa 2012-07-30 16:27:44 +09:00
parent efd8b838ee
commit 5460ea389d
13 changed files with 17 additions and 30 deletions

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2009, The Android Open Source Project
* Copyright (C) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2012, The Android Open Source Project
* Copyright (C) 2012, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2012, The Android Open Source Project
* Copyright (C) 2012, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,11 +36,11 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv *env = 0;
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
AKLOGE("ERROR: GetEnv failed");
goto bail;
}
assert(env != 0);
assert(env);
if (!register_BinaryDictionary(env)) {
AKLOGE("ERROR: BinaryDictionary native registration failed");
@ -59,7 +58,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
}
/* success -- return valid version number */
result = JNI_VERSION_1_4;
result = JNI_VERSION_1_6;
bail:
return result;
@ -70,7 +69,7 @@ namespace latinime {
int registerNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods,
int numMethods) {
jclass clazz = env->FindClass(className);
if (clazz == 0) {
if (!clazz) {
AKLOGE("Native registration unable to find class '%s'", className);
return JNI_FALSE;
}

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2010, The Android Open Source Project
* Copyright (C) 2010, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2011, The Android Open Source Project
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2010, The Android Open Source Project
* Copyright (C) 2010, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -96,7 +95,7 @@ static inline void prof_out(void) {
}
if (all == 0) all = 1;
for (int i = 0; i < PROF_BUF_SIZE - 1; ++i) {
if (profile_buf[i] != 0) {
if (profile_buf[i]) {
AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.",
i, (profile_buf[i] * 100 / all),
profile_buf[i] * 1000 / (float)CLOCKS_PER_SEC, profile_counter[i]);

View File

@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,6 +1,5 @@
/*
*
* Copyright 2010, The Android Open Source Project
* Copyright (C) 2010, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.