Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d05b6478 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix misc-macro-parentheses warnings in services jni."

am: fe91d2a8

* commit 'fe91d2a8':
  Fix misc-macro-parentheses warnings in services jni.

Change-Id: I3ca66bf839e5a720e610657fc9afb6dbb8b853f8
parents 404e2b21 fe91d2a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -196,11 +196,11 @@ static jboolean com_android_server_AssetAtlasService_upload(JNIEnv* env, jobject

#define FIND_CLASS(var, className) \
        var = env->FindClass(className); \
        LOG_FATAL_IF(! var, "Unable to find class " className);
        LOG_FATAL_IF(! (var), "Unable to find class " className);

#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
        LOG_FATAL_IF(!var, "Unable to find method " methodName);
        LOG_FATAL_IF(!(var), "Unable to find method " methodName);

const char* const kClassPathName = "com/android/server/AssetAtlasService";

+2 −2
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ static inline in_addr_t *as_in_addr(sockaddr *sa) {

//------------------------------------------------------------------------------

#define SYSTEM_ERROR -1
#define BAD_ARGUMENT -2
#define SYSTEM_ERROR (-1)
#define BAD_ARGUMENT (-2)

static int create_interface(int mtu)
{
+1 −1
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ void HdmiCecController::onReceived(const hdmi_event_t* event, void* arg) {
//------------------------------------------------------------------------------
#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
        LOG_FATAL_IF(! var, "Unable to find method " methodName);
        LOG_FATAL_IF(! (var), "Unable to find method " methodName);

static jlong nativeInit(JNIEnv* env, jclass clazz, jobject callbacksObj,
        jobject messageQueueObj) {
+2 −2
Original line number Diff line number Diff line
@@ -128,11 +128,11 @@ static const JNINativeMethod gInputApplicationHandleMethods[] = {

#define FIND_CLASS(var, className) \
        var = env->FindClass(className); \
        LOG_FATAL_IF(! var, "Unable to find class " className);
        LOG_FATAL_IF(! (var), "Unable to find class " className);

#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
        LOG_FATAL_IF(! (var), "Unable to find field " fieldName);

int register_android_server_InputApplicationHandle(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/input/InputApplicationHandle",
+3 −3
Original line number Diff line number Diff line
@@ -1429,15 +1429,15 @@ static const JNINativeMethod gInputManagerMethods[] = {

#define FIND_CLASS(var, className) \
        var = env->FindClass(className); \
        LOG_FATAL_IF(! var, "Unable to find class " className);
        LOG_FATAL_IF(! (var), "Unable to find class " className);

#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
        var = env->GetMethodID(clazz, methodName, methodDescriptor); \
        LOG_FATAL_IF(! var, "Unable to find method " methodName);
        LOG_FATAL_IF(! (var), "Unable to find method " methodName);

#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
        var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
        LOG_FATAL_IF(! var, "Unable to find field " fieldName);
        LOG_FATAL_IF(! (var), "Unable to find field " fieldName);

int register_android_server_InputManager(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/input/InputManagerService",
Loading