diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index bb9740b60f782..7066d5680f668 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -1585,7 +1585,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; } @@ -1619,7 +1619,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; }