diff options
| author | 2020-07-17 19:04:04 +0000 | |
|---|---|---|
| committer | 2020-07-17 19:04:04 +0000 | |
| commit | 0903756c3c7d75ed28632a9ceb735ab6b24413cc (patch) | |
| tree | de9479f9034f47e217a269d4e047b64b1dc613bc | |
| parent | b210bbbe3ffa508871108b719c16f566ec51cf2a (diff) | |
| parent | 5a8fecd007eb5047d71e7c57aa55e390feffbd56 (diff) | |
Merge "Move things in InputWindowInfo to enum classes"
| -rw-r--r-- | core/jni/android_hardware_input_InputWindowHandle.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/core/jni/android_hardware_input_InputWindowHandle.cpp b/core/jni/android_hardware_input_InputWindowHandle.cpp index 792c00572318..bdb4544f4aae 100644 --- a/core/jni/android_hardware_input_InputWindowHandle.cpp +++ b/core/jni/android_hardware_input_InputWindowHandle.cpp @@ -16,20 +16,21 @@ #define LOG_TAG "InputWindowHandle" -#include <nativehelper/JNIHelp.h> -#include "core_jni_helpers.h" -#include "jni.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/threads.h> +#include "android_hardware_input_InputWindowHandle.h" #include <android/graphics/region.h> +#include <android_runtime/AndroidRuntime.h> +#include <binder/IPCThreadState.h> #include <gui/SurfaceControl.h> +#include <nativehelper/JNIHelp.h> #include <ui/Region.h> +#include <utils/threads.h> -#include "android_hardware_input_InputWindowHandle.h" #include "android_hardware_input_InputApplicationHandle.h" #include "android_util_Binder.h" -#include <binder/IPCThreadState.h> +#include "core_jni_helpers.h" +#include "input/InputWindow.h" +#include "jni.h" namespace android { @@ -113,10 +114,10 @@ bool NativeInputWindowHandle::updateInfo() { mInfo.name = getStringField(env, obj, gInputWindowHandleClassInfo.name, "<null>"); - mInfo.layoutParamsFlags = env->GetIntField(obj, - gInputWindowHandleClassInfo.layoutParamsFlags); - mInfo.layoutParamsType = env->GetIntField(obj, - gInputWindowHandleClassInfo.layoutParamsType); + mInfo.flags = Flags<InputWindowInfo::Flag>( + env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsFlags)); + mInfo.type = static_cast<InputWindowInfo::Type>( + env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsType)); mInfo.dispatchingTimeout = decltype(mInfo.dispatchingTimeout)( env->GetLongField(obj, gInputWindowHandleClassInfo.dispatchingTimeoutNanos)); mInfo.frameLeft = env->GetIntField(obj, @@ -157,8 +158,8 @@ bool NativeInputWindowHandle::updateInfo() { gInputWindowHandleClassInfo.ownerPid); mInfo.ownerUid = env->GetIntField(obj, gInputWindowHandleClassInfo.ownerUid); - mInfo.inputFeatures = env->GetIntField(obj, - gInputWindowHandleClassInfo.inputFeatures); + mInfo.inputFeatures = static_cast<InputWindowInfo::Feature>( + env->GetIntField(obj, gInputWindowHandleClassInfo.inputFeatures)); mInfo.displayId = env->GetIntField(obj, gInputWindowHandleClassInfo.displayId); mInfo.portalToDisplayId = env->GetIntField(obj, |