Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: webrtc/sdk/android/src/jni/pc/logging_jni.cc

Issue 2998403002: Android: Update convenience macro defining JNI-accessible methods (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/sdk/android/src/jni/pc/dtmfsender_jni.cc ('k') | webrtc/sdk/android/src/jni/pc/mediasource_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/src/jni/pc/logging_jni.cc
diff --git a/webrtc/sdk/android/src/jni/pc/logging_jni.cc b/webrtc/sdk/android/src/jni/pc/logging_jni.cc
index d2ccb560f73c685114bb07fc7e5b4be7e811f3d0..020eeedeb62a088d5f09cb820059d8c8df1dee21 100644
--- a/webrtc/sdk/android/src/jni/pc/logging_jni.cc
+++ b/webrtc/sdk/android/src/jni/pc/logging_jni.cc
@@ -17,8 +17,12 @@
namespace webrtc_jni {
-JOW(void, Logging_nativeEnableTracing)
-(JNIEnv* jni, jclass, jstring j_path, jint nativeLevels) {
+JNI_FUNCTION_DECLARATION(void,
+ Logging_nativeEnableTracing,
+ JNIEnv* jni,
+ jclass,
+ jstring j_path,
+ jint nativeLevels) {
std::string path = JavaToStdString(jni, j_path);
if (nativeLevels != webrtc::kTraceNone) {
webrtc::Trace::set_level_filter(nativeLevels);
@@ -34,24 +38,38 @@ JOW(void, Logging_nativeEnableTracing)
}
}
-JOW(void, Logging_nativeEnableLogToDebugOutput)
-(JNIEnv* jni, jclass, jint nativeSeverity) {
+JNI_FUNCTION_DECLARATION(void,
+ Logging_nativeEnableLogToDebugOutput,
+ JNIEnv* jni,
+ jclass,
+ jint nativeSeverity) {
if (nativeSeverity >= rtc::LS_SENSITIVE && nativeSeverity <= rtc::LS_NONE) {
rtc::LogMessage::LogToDebug(
static_cast<rtc::LoggingSeverity>(nativeSeverity));
}
}
-JOW(void, Logging_nativeEnableLogThreads)(JNIEnv* jni, jclass) {
+JNI_FUNCTION_DECLARATION(void,
+ Logging_nativeEnableLogThreads,
+ JNIEnv* jni,
+ jclass) {
rtc::LogMessage::LogThreads(true);
}
-JOW(void, Logging_nativeEnableLogTimeStamps)(JNIEnv* jni, jclass) {
+JNI_FUNCTION_DECLARATION(void,
+ Logging_nativeEnableLogTimeStamps,
+ JNIEnv* jni,
+ jclass) {
rtc::LogMessage::LogTimestamps(true);
}
-JOW(void, Logging_nativeLog)
-(JNIEnv* jni, jclass, jint j_severity, jstring j_tag, jstring j_message) {
+JNI_FUNCTION_DECLARATION(void,
+ Logging_nativeLog,
+ JNIEnv* jni,
+ jclass,
+ jint j_severity,
+ jstring j_tag,
+ jstring j_message) {
std::string message = JavaToStdString(jni, j_message);
std::string tag = JavaToStdString(jni, j_tag);
LOG_TAG(static_cast<rtc::LoggingSeverity>(j_severity), tag) << message;
« no previous file with comments | « webrtc/sdk/android/src/jni/pc/dtmfsender_jni.cc ('k') | webrtc/sdk/android/src/jni/pc/mediasource_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698