The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 2 | * Copyright (C) 2007-2014 The Android Open Source Project |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <fcntl.h> |
| 18 | |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 19 | #include <log/log_event_list.h> |
| 20 | |
Mark Salyzyn | 96bf598 | 2016-09-28 16:15:30 -0700 | [diff] [blame] | 21 | #include <log/log.h> |
| 22 | |
Steven Moreland | 2279b25 | 2017-07-19 09:50:45 -0700 | [diff] [blame^] | 23 | #include <nativehelper/JNIHelp.h> |
Andreas Gampe | ed6b9df | 2014-11-20 22:02:20 -0800 | [diff] [blame] | 24 | #include "core_jni_helpers.h" |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | #include "jni.h" |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | |
Mark Salyzyn | 3ed8e2e6 | 2013-11-07 11:16:22 -0800 | [diff] [blame] | 27 | #define UNUSED __attribute__((__unused__)) |
| 28 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 29 | namespace android { |
| 30 | |
| 31 | static jclass gCollectionClass; |
| 32 | static jmethodID gCollectionAddID; |
| 33 | |
| 34 | static jclass gEventClass; |
| 35 | static jmethodID gEventInitID; |
| 36 | |
| 37 | static jclass gIntegerClass; |
| 38 | static jfieldID gIntegerValueID; |
| 39 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | static jclass gLongClass; |
| 41 | static jfieldID gLongValueID; |
| 42 | |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 43 | static jclass gFloatClass; |
| 44 | static jfieldID gFloatValueID; |
| 45 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 46 | static jclass gStringClass; |
| 47 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 48 | /* |
| 49 | * In class android.util.EventLog: |
| 50 | * static native int writeEvent(int tag, int value) |
| 51 | */ |
Mark Salyzyn | 3ed8e2e6 | 2013-11-07 11:16:22 -0800 | [diff] [blame] | 52 | static jint android_util_EventLog_writeEvent_Integer(JNIEnv* env UNUSED, |
| 53 | jobject clazz UNUSED, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 54 | jint tag, jint value) |
| 55 | { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 56 | android_log_event_list ctx(tag); |
| 57 | ctx << (int32_t)value; |
| 58 | return ctx.write(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | /* |
| 62 | * In class android.util.EventLog: |
| 63 | * static native int writeEvent(long tag, long value) |
| 64 | */ |
Mark Salyzyn | 3ed8e2e6 | 2013-11-07 11:16:22 -0800 | [diff] [blame] | 65 | static jint android_util_EventLog_writeEvent_Long(JNIEnv* env UNUSED, |
| 66 | jobject clazz UNUSED, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | jint tag, jlong value) |
| 68 | { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 69 | android_log_event_list ctx(tag); |
| 70 | ctx << (int64_t)value; |
| 71 | return ctx.write(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | /* |
| 75 | * In class android.util.EventLog: |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 76 | * static native int writeEvent(long tag, float value) |
| 77 | */ |
| 78 | static jint android_util_EventLog_writeEvent_Float(JNIEnv* env UNUSED, |
| 79 | jobject clazz UNUSED, |
| 80 | jint tag, jfloat value) |
| 81 | { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 82 | android_log_event_list ctx(tag); |
| 83 | ctx << (float)value; |
| 84 | return ctx.write(); |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | /* |
| 88 | * In class android.util.EventLog: |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 89 | * static native int writeEvent(int tag, String value) |
| 90 | */ |
Mark Salyzyn | 3ed8e2e6 | 2013-11-07 11:16:22 -0800 | [diff] [blame] | 91 | static jint android_util_EventLog_writeEvent_String(JNIEnv* env, |
| 92 | jobject clazz UNUSED, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | jint tag, jstring value) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 94 | android_log_event_list ctx(tag); |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 95 | // Don't throw NPE -- I feel like it's sort of mean for a logging function |
| 96 | // to be all crashy if you pass in NULL -- but make the NULL value explicit. |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 97 | if (value != NULL) { |
| 98 | const char *str = env->GetStringUTFChars(value, NULL); |
| 99 | ctx << str; |
| 100 | env->ReleaseStringUTFChars(value, str); |
| 101 | } else { |
| 102 | ctx << "NULL"; |
| 103 | } |
| 104 | return ctx.write(); |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | /* |
| 108 | * In class android.util.EventLog: |
| 109 | * static native int writeEvent(long tag, Object... value) |
| 110 | */ |
| 111 | static jint android_util_EventLog_writeEvent_Array(JNIEnv* env, jobject clazz, |
| 112 | jint tag, jobjectArray value) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 113 | android_log_event_list ctx(tag); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 114 | |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 115 | if (value == NULL) { |
| 116 | ctx << "[NULL]"; |
| 117 | return ctx.write(); |
| 118 | } |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 119 | |
| 120 | jsize copied = 0, num = env->GetArrayLength(value); |
Dan Egnor | 6916089 | 2010-01-06 23:12:57 -0800 | [diff] [blame] | 121 | for (; copied < num && copied < 255; ++copied) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 122 | if (ctx.status()) break; |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 123 | jobject item = env->GetObjectArrayElement(value, copied); |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 124 | if (item == NULL) { |
| 125 | ctx << "NULL"; |
| 126 | } else if (env->IsInstanceOf(item, gStringClass)) { |
| 127 | const char *str = env->GetStringUTFChars((jstring) item, NULL); |
| 128 | ctx << str; |
| 129 | env->ReleaseStringUTFChars((jstring) item, str); |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 130 | } else if (env->IsInstanceOf(item, gIntegerClass)) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 131 | ctx << (int32_t)env->GetIntField(item, gIntegerValueID); |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 132 | } else if (env->IsInstanceOf(item, gLongClass)) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 133 | ctx << (int64_t)env->GetLongField(item, gLongValueID); |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 134 | } else if (env->IsInstanceOf(item, gFloatClass)) { |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 135 | ctx << (float)env->GetFloatField(item, gFloatValueID); |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 136 | } else { |
| 137 | jniThrowException(env, |
| 138 | "java/lang/IllegalArgumentException", |
| 139 | "Invalid payload item type"); |
| 140 | return -1; |
| 141 | } |
| 142 | env->DeleteLocalRef(item); |
| 143 | } |
Mark Salyzyn | 7b25bb8 | 2016-11-08 09:28:51 -0800 | [diff] [blame] | 144 | return ctx.write(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | /* |
| 148 | * In class android.util.EventLog: |
| 149 | * static native void readEvents(int[] tags, Collection<Event> output) |
Jim Miller | 95ff240 | 2009-07-01 18:03:41 -0700 | [diff] [blame] | 150 | * |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 151 | * Reads events from the event log |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 152 | */ |
Mark Salyzyn | 3ed8e2e6 | 2013-11-07 11:16:22 -0800 | [diff] [blame] | 153 | static void android_util_EventLog_readEvents(JNIEnv* env, jobject clazz UNUSED, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 154 | jintArray tags, |
| 155 | jobject out) { |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 156 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 157 | if (tags == NULL || out == NULL) { |
Elliott Hughes | 69a017b | 2011-04-08 14:10:28 -0700 | [diff] [blame] | 158 | jniThrowNullPointerException(env, NULL); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 159 | return; |
| 160 | } |
| 161 | |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 162 | struct logger_list *logger_list = android_logger_list_open( |
Mark Salyzyn | 18998c9 | 2015-01-26 12:51:27 -0800 | [diff] [blame] | 163 | LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 0, 0); |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 164 | |
| 165 | if (!logger_list) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | jniThrowIOException(env, errno); |
| 167 | return; |
| 168 | } |
| 169 | |
| 170 | jsize tagLength = env->GetArrayLength(tags); |
| 171 | jint *tagValues = env->GetIntArrayElements(tags, NULL); |
| 172 | |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 173 | while (1) { |
| 174 | log_msg log_msg; |
| 175 | int ret = android_logger_list_read(logger_list, &log_msg); |
Dan Egnor | 78158db | 2010-04-08 22:19:15 -0700 | [diff] [blame] | 176 | |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 177 | if (ret == 0) { |
| 178 | break; |
| 179 | } |
| 180 | if (ret < 0) { |
Mark Salyzyn | b519aec | 2014-04-08 15:21:50 -0700 | [diff] [blame] | 181 | if (ret == -EINTR) { |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 182 | continue; |
| 183 | } |
Mark Salyzyn | b519aec | 2014-04-08 15:21:50 -0700 | [diff] [blame] | 184 | if (ret == -EINVAL) { |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 185 | jniThrowException(env, "java/io/IOException", "Event too short"); |
Mark Salyzyn | b519aec | 2014-04-08 15:21:50 -0700 | [diff] [blame] | 186 | } else if (ret != -EAGAIN) { |
| 187 | jniThrowIOException(env, -ret); // Will throw on return |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 188 | } |
Dan Egnor | 78158db | 2010-04-08 22:19:15 -0700 | [diff] [blame] | 189 | break; |
| 190 | } |
| 191 | |
Mark Salyzyn | ca50cd2 | 2015-02-26 14:43:04 -0800 | [diff] [blame] | 192 | if (log_msg.id() != LOG_ID_EVENTS) { |
| 193 | continue; |
| 194 | } |
| 195 | |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 196 | int32_t tag = * (int32_t *) log_msg.msg(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 197 | |
| 198 | int found = 0; |
| 199 | for (int i = 0; !found && i < tagLength; ++i) { |
| 200 | found = (tag == tagValues[i]); |
| 201 | } |
| 202 | |
| 203 | if (found) { |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 204 | jsize len = ret; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 205 | jbyteArray array = env->NewByteArray(len); |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 206 | if (array == NULL) { |
| 207 | break; |
| 208 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 209 | |
| 210 | jbyte *bytes = env->GetByteArrayElements(array, NULL); |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 211 | memcpy(bytes, log_msg.buf, len); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 212 | env->ReleaseByteArrayElements(array, bytes, 0); |
| 213 | |
| 214 | jobject event = env->NewObject(gEventClass, gEventInitID, array); |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 215 | if (event == NULL) { |
| 216 | break; |
| 217 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 218 | |
| 219 | env->CallBooleanMethod(out, gCollectionAddID, event); |
| 220 | env->DeleteLocalRef(event); |
| 221 | env->DeleteLocalRef(array); |
| 222 | } |
| 223 | } |
| 224 | |
Mark Salyzyn | 7933c29 | 2013-12-05 10:06:18 -0800 | [diff] [blame] | 225 | android_logger_list_close(logger_list); |
| 226 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 227 | env->ReleaseIntArrayElements(tags, tagValues, 0); |
| 228 | } |
| 229 | |
Jim Miller | 95ff240 | 2009-07-01 18:03:41 -0700 | [diff] [blame] | 230 | /* |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 231 | * JNI registration. |
| 232 | */ |
Daniel Micay | 76f6a86 | 2015-09-19 17:31:01 -0400 | [diff] [blame] | 233 | static const JNINativeMethod gRegisterMethods[] = { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 234 | /* name, signature, funcPtr */ |
| 235 | { "writeEvent", "(II)I", (void*) android_util_EventLog_writeEvent_Integer }, |
| 236 | { "writeEvent", "(IJ)I", (void*) android_util_EventLog_writeEvent_Long }, |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 237 | { "writeEvent", "(IF)I", (void*) android_util_EventLog_writeEvent_Float }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 238 | { "writeEvent", |
| 239 | "(ILjava/lang/String;)I", |
| 240 | (void*) android_util_EventLog_writeEvent_String |
| 241 | }, |
| 242 | { "writeEvent", |
Dan Egnor | 62136d3 | 2010-01-05 19:09:08 -0800 | [diff] [blame] | 243 | "(I[Ljava/lang/Object;)I", |
| 244 | (void*) android_util_EventLog_writeEvent_Array |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 245 | }, |
| 246 | { "readEvents", |
| 247 | "([ILjava/util/Collection;)V", |
| 248 | (void*) android_util_EventLog_readEvents |
Jim Miller | 95ff240 | 2009-07-01 18:03:41 -0700 | [diff] [blame] | 249 | }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | static struct { const char *name; jclass *clazz; } gClasses[] = { |
| 253 | { "android/util/EventLog$Event", &gEventClass }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 254 | { "java/lang/Integer", &gIntegerClass }, |
| 255 | { "java/lang/Long", &gLongClass }, |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 256 | { "java/lang/Float", &gFloatClass }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 257 | { "java/lang/String", &gStringClass }, |
| 258 | { "java/util/Collection", &gCollectionClass }, |
| 259 | }; |
| 260 | |
| 261 | static struct { jclass *c; const char *name, *ft; jfieldID *id; } gFields[] = { |
| 262 | { &gIntegerClass, "value", "I", &gIntegerValueID }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 263 | { &gLongClass, "value", "J", &gLongValueID }, |
Jeff Brown | e7e9cce | 2015-04-28 13:26:48 -0700 | [diff] [blame] | 264 | { &gFloatClass, "value", "F", &gFloatValueID }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 265 | }; |
| 266 | |
| 267 | static struct { jclass *c; const char *name, *mt; jmethodID *id; } gMethods[] = { |
| 268 | { &gEventClass, "<init>", "([B)V", &gEventInitID }, |
| 269 | { &gCollectionClass, "add", "(Ljava/lang/Object;)Z", &gCollectionAddID }, |
| 270 | }; |
| 271 | |
| 272 | int register_android_util_EventLog(JNIEnv* env) { |
| 273 | for (int i = 0; i < NELEM(gClasses); ++i) { |
Andreas Gampe | ed6b9df | 2014-11-20 22:02:20 -0800 | [diff] [blame] | 274 | jclass clazz = FindClassOrDie(env, gClasses[i].name); |
| 275 | *gClasses[i].clazz = MakeGlobalRefOrDie(env, clazz); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | for (int i = 0; i < NELEM(gFields); ++i) { |
Andreas Gampe | ed6b9df | 2014-11-20 22:02:20 -0800 | [diff] [blame] | 279 | *gFields[i].id = GetFieldIDOrDie(env, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 280 | *gFields[i].c, gFields[i].name, gFields[i].ft); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | for (int i = 0; i < NELEM(gMethods); ++i) { |
Andreas Gampe | ed6b9df | 2014-11-20 22:02:20 -0800 | [diff] [blame] | 284 | *gMethods[i].id = GetMethodIDOrDie(env, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 285 | *gMethods[i].c, gMethods[i].name, gMethods[i].mt); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 286 | } |
| 287 | |
Andreas Gampe | ed6b9df | 2014-11-20 22:02:20 -0800 | [diff] [blame] | 288 | return RegisterMethodsOrDie( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 289 | env, |
| 290 | "android/util/EventLog", |
| 291 | gRegisterMethods, NELEM(gRegisterMethods)); |
| 292 | } |
| 293 | |
| 294 | }; // namespace android |