diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index 6aa632388ffdc..3cd4e5ee82cf1 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -1595,7 +1595,7 @@ static jobject nativeCreateInputChannel(JNIEnv* env, jclass /* clazz */, jlong p if (!inputChannel.ok()) { std::string message = inputChannel.error().message(); - message += StringPrintf(" Status=%d", inputChannel.error().code()); + message += StringPrintf(" Status=%d", static_cast(inputChannel.error().code())); jniThrowRuntimeException(env, message.c_str()); return nullptr; } @@ -1629,7 +1629,7 @@ static jobject nativeCreateInputMonitor(JNIEnv* env, jclass /* clazz */, jlong p if (!inputChannel.ok()) { std::string message = inputChannel.error().message(); - message += StringPrintf(" Status=%d", inputChannel.error().code()); + message += StringPrintf(" Status=%d", static_cast(inputChannel.error().code())); jniThrowRuntimeException(env, message.c_str()); return nullptr; }