Merge "Explicit cast from android::Base::Errno to status_t" am: 61ca5d7c56 am: b09f0dd179 am: e744aef437 am: 1c15308b45

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926909

Change-Id: I12a4eaede3424d179f6977a8a68b0ca55271ff31
This commit is contained in:
Treehugger Robot
2022-01-06 12:27:18 +00:00
committed by Automerger Merge Worker

View File

@@ -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<int>(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<int>(inputChannel.error().code()));
jniThrowRuntimeException(env, message.c_str());
return nullptr;
}