Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #define LOG_TAG "InputWindowHandle" |
| 18 | |
| 19 | #include "JNIHelp.h" |
| 20 | #include "jni.h" |
| 21 | #include <android_runtime/AndroidRuntime.h> |
| 22 | #include <utils/threads.h> |
| 23 | |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 24 | #include <android_view_InputChannel.h> |
| 25 | #include <android/graphics/Region.h> |
Michael Wright | a407d6a | 2014-02-05 18:02:40 -0800 | [diff] [blame] | 26 | #include <ui/Region.h> |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 27 | |
Jeff Brown | 4532e61 | 2012-04-05 14:27:12 -0700 | [diff] [blame] | 28 | #include "com_android_server_input_InputWindowHandle.h" |
| 29 | #include "com_android_server_input_InputApplicationHandle.h" |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 30 | |
| 31 | namespace android { |
| 32 | |
| 33 | static struct { |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 34 | jfieldID ptr; |
| 35 | jfieldID inputApplicationHandle; |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 36 | jfieldID inputChannel; |
| 37 | jfieldID name; |
| 38 | jfieldID layoutParamsFlags; |
| 39 | jfieldID layoutParamsType; |
| 40 | jfieldID dispatchingTimeoutNanos; |
| 41 | jfieldID frameLeft; |
| 42 | jfieldID frameTop; |
| 43 | jfieldID frameRight; |
| 44 | jfieldID frameBottom; |
| 45 | jfieldID scaleFactor; |
| 46 | jfieldID touchableRegion; |
| 47 | jfieldID visible; |
| 48 | jfieldID canReceiveKeys; |
| 49 | jfieldID hasFocus; |
| 50 | jfieldID hasWallpaper; |
| 51 | jfieldID paused; |
| 52 | jfieldID layer; |
| 53 | jfieldID ownerPid; |
| 54 | jfieldID ownerUid; |
| 55 | jfieldID inputFeatures; |
Jeff Brown | 83d616a | 2012-09-09 20:33:43 -0700 | [diff] [blame] | 56 | jfieldID displayId; |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 57 | } gInputWindowHandleClassInfo; |
| 58 | |
| 59 | static Mutex gHandleMutex; |
| 60 | |
| 61 | |
| 62 | // --- NativeInputWindowHandle --- |
| 63 | |
| 64 | NativeInputWindowHandle::NativeInputWindowHandle( |
| 65 | const sp<InputApplicationHandle>& inputApplicationHandle, jweak objWeak) : |
| 66 | InputWindowHandle(inputApplicationHandle), |
| 67 | mObjWeak(objWeak) { |
| 68 | } |
| 69 | |
| 70 | NativeInputWindowHandle::~NativeInputWindowHandle() { |
| 71 | JNIEnv* env = AndroidRuntime::getJNIEnv(); |
| 72 | env->DeleteWeakGlobalRef(mObjWeak); |
| 73 | } |
| 74 | |
| 75 | jobject NativeInputWindowHandle::getInputWindowHandleObjLocalRef(JNIEnv* env) { |
| 76 | return env->NewLocalRef(mObjWeak); |
| 77 | } |
| 78 | |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 79 | bool NativeInputWindowHandle::updateInfo() { |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 80 | JNIEnv* env = AndroidRuntime::getJNIEnv(); |
| 81 | jobject obj = env->NewLocalRef(mObjWeak); |
| 82 | if (!obj) { |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 83 | releaseInfo(); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 84 | return false; |
| 85 | } |
| 86 | |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 87 | if (!mInfo) { |
| 88 | mInfo = new InputWindowInfo(); |
Michael Wright | a407d6a | 2014-02-05 18:02:40 -0800 | [diff] [blame] | 89 | } else { |
| 90 | mInfo->touchableRegion.clear(); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 93 | jobject inputChannelObj = env->GetObjectField(obj, |
| 94 | gInputWindowHandleClassInfo.inputChannel); |
| 95 | if (inputChannelObj) { |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 96 | mInfo->inputChannel = android_view_InputChannel_getInputChannel(env, inputChannelObj); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 97 | env->DeleteLocalRef(inputChannelObj); |
| 98 | } else { |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 99 | mInfo->inputChannel.clear(); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | jstring nameObj = jstring(env->GetObjectField(obj, |
| 103 | gInputWindowHandleClassInfo.name)); |
| 104 | if (nameObj) { |
| 105 | const char* nameStr = env->GetStringUTFChars(nameObj, NULL); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 106 | mInfo->name.setTo(nameStr); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 107 | env->ReleaseStringUTFChars(nameObj, nameStr); |
| 108 | env->DeleteLocalRef(nameObj); |
| 109 | } else { |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 110 | mInfo->name.setTo("<null>"); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 111 | } |
| 112 | |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 113 | mInfo->layoutParamsFlags = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 114 | gInputWindowHandleClassInfo.layoutParamsFlags); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 115 | mInfo->layoutParamsType = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 116 | gInputWindowHandleClassInfo.layoutParamsType); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 117 | mInfo->dispatchingTimeout = env->GetLongField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 118 | gInputWindowHandleClassInfo.dispatchingTimeoutNanos); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 119 | mInfo->frameLeft = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 120 | gInputWindowHandleClassInfo.frameLeft); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 121 | mInfo->frameTop = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 122 | gInputWindowHandleClassInfo.frameTop); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 123 | mInfo->frameRight = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 124 | gInputWindowHandleClassInfo.frameRight); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 125 | mInfo->frameBottom = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 126 | gInputWindowHandleClassInfo.frameBottom); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 127 | mInfo->scaleFactor = env->GetFloatField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 128 | gInputWindowHandleClassInfo.scaleFactor); |
| 129 | |
| 130 | jobject regionObj = env->GetObjectField(obj, |
| 131 | gInputWindowHandleClassInfo.touchableRegion); |
| 132 | if (regionObj) { |
| 133 | SkRegion* region = android_graphics_Region_getSkRegion(env, regionObj); |
Michael Wright | a407d6a | 2014-02-05 18:02:40 -0800 | [diff] [blame] | 134 | for (SkRegion::Iterator it(*region); !it.done(); it.next()) { |
| 135 | const SkIRect& rect = it.rect(); |
| 136 | mInfo->addTouchableRegion(Rect(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom)); |
| 137 | } |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 138 | env->DeleteLocalRef(regionObj); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 139 | } |
| 140 | |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 141 | mInfo->visible = env->GetBooleanField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 142 | gInputWindowHandleClassInfo.visible); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 143 | mInfo->canReceiveKeys = env->GetBooleanField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 144 | gInputWindowHandleClassInfo.canReceiveKeys); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 145 | mInfo->hasFocus = env->GetBooleanField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 146 | gInputWindowHandleClassInfo.hasFocus); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 147 | mInfo->hasWallpaper = env->GetBooleanField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 148 | gInputWindowHandleClassInfo.hasWallpaper); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 149 | mInfo->paused = env->GetBooleanField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 150 | gInputWindowHandleClassInfo.paused); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 151 | mInfo->layer = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 152 | gInputWindowHandleClassInfo.layer); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 153 | mInfo->ownerPid = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 154 | gInputWindowHandleClassInfo.ownerPid); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 155 | mInfo->ownerUid = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 156 | gInputWindowHandleClassInfo.ownerUid); |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 157 | mInfo->inputFeatures = env->GetIntField(obj, |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 158 | gInputWindowHandleClassInfo.inputFeatures); |
Jeff Brown | 83d616a | 2012-09-09 20:33:43 -0700 | [diff] [blame] | 159 | mInfo->displayId = env->GetIntField(obj, |
| 160 | gInputWindowHandleClassInfo.displayId); |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 161 | |
| 162 | env->DeleteLocalRef(obj); |
| 163 | return true; |
| 164 | } |
| 165 | |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 166 | |
| 167 | // --- Global functions --- |
| 168 | |
| 169 | sp<NativeInputWindowHandle> android_server_InputWindowHandle_getHandle( |
| 170 | JNIEnv* env, jobject inputWindowHandleObj) { |
| 171 | if (!inputWindowHandleObj) { |
| 172 | return NULL; |
| 173 | } |
| 174 | |
| 175 | AutoMutex _l(gHandleMutex); |
| 176 | |
Ashok Bhat | 7e2a9dc | 2014-01-02 19:43:30 +0000 | [diff] [blame] | 177 | jlong ptr = env->GetLongField(inputWindowHandleObj, gInputWindowHandleClassInfo.ptr); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 178 | NativeInputWindowHandle* handle; |
| 179 | if (ptr) { |
| 180 | handle = reinterpret_cast<NativeInputWindowHandle*>(ptr); |
| 181 | } else { |
| 182 | jobject inputApplicationHandleObj = env->GetObjectField(inputWindowHandleObj, |
| 183 | gInputWindowHandleClassInfo.inputApplicationHandle); |
| 184 | sp<InputApplicationHandle> inputApplicationHandle = |
| 185 | android_server_InputApplicationHandle_getHandle(env, inputApplicationHandleObj); |
| 186 | env->DeleteLocalRef(inputApplicationHandleObj); |
| 187 | |
| 188 | jweak objWeak = env->NewWeakGlobalRef(inputWindowHandleObj); |
| 189 | handle = new NativeInputWindowHandle(inputApplicationHandle, objWeak); |
Mathias Agopian | b1d90c8 | 2013-03-06 17:45:42 -0800 | [diff] [blame] | 190 | handle->incStrong((void*)android_server_InputWindowHandle_getHandle); |
Ashok Bhat | 7e2a9dc | 2014-01-02 19:43:30 +0000 | [diff] [blame] | 191 | env->SetLongField(inputWindowHandleObj, gInputWindowHandleClassInfo.ptr, |
| 192 | reinterpret_cast<jlong>(handle)); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 193 | } |
| 194 | return handle; |
| 195 | } |
| 196 | |
| 197 | |
| 198 | // --- JNI --- |
| 199 | |
| 200 | static void android_server_InputWindowHandle_nativeDispose(JNIEnv* env, jobject obj) { |
| 201 | AutoMutex _l(gHandleMutex); |
| 202 | |
Ashok Bhat | 7e2a9dc | 2014-01-02 19:43:30 +0000 | [diff] [blame] | 203 | jlong ptr = env->GetLongField(obj, gInputWindowHandleClassInfo.ptr); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 204 | if (ptr) { |
Ashok Bhat | 7e2a9dc | 2014-01-02 19:43:30 +0000 | [diff] [blame] | 205 | env->SetLongField(obj, gInputWindowHandleClassInfo.ptr, 0); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 206 | |
| 207 | NativeInputWindowHandle* handle = reinterpret_cast<NativeInputWindowHandle*>(ptr); |
Mathias Agopian | b1d90c8 | 2013-03-06 17:45:42 -0800 | [diff] [blame] | 208 | handle->decStrong((void*)android_server_InputWindowHandle_getHandle); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 209 | } |
| 210 | } |
| 211 | |
| 212 | |
| 213 | static JNINativeMethod gInputWindowHandleMethods[] = { |
| 214 | /* name, signature, funcPtr */ |
| 215 | { "nativeDispose", "()V", |
| 216 | (void*) android_server_InputWindowHandle_nativeDispose }, |
| 217 | }; |
| 218 | |
| 219 | #define FIND_CLASS(var, className) \ |
| 220 | var = env->FindClass(className); \ |
Carl Shapiro | 17cc33a | 2011-03-05 20:53:16 -0800 | [diff] [blame] | 221 | LOG_FATAL_IF(! var, "Unable to find class " className); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 222 | |
| 223 | #define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \ |
| 224 | var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \ |
| 225 | LOG_FATAL_IF(! var, "Unable to find field " fieldName); |
| 226 | |
| 227 | int register_android_server_InputWindowHandle(JNIEnv* env) { |
Jeff Brown | 4532e61 | 2012-04-05 14:27:12 -0700 | [diff] [blame] | 228 | int res = jniRegisterNativeMethods(env, "com/android/server/input/InputWindowHandle", |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 229 | gInputWindowHandleMethods, NELEM(gInputWindowHandleMethods)); |
| 230 | LOG_FATAL_IF(res < 0, "Unable to register native methods."); |
| 231 | |
Carl Shapiro | 17cc33a | 2011-03-05 20:53:16 -0800 | [diff] [blame] | 232 | jclass clazz; |
Jeff Brown | 4532e61 | 2012-04-05 14:27:12 -0700 | [diff] [blame] | 233 | FIND_CLASS(clazz, "com/android/server/input/InputWindowHandle"); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 234 | |
Carl Shapiro | 17cc33a | 2011-03-05 20:53:16 -0800 | [diff] [blame] | 235 | GET_FIELD_ID(gInputWindowHandleClassInfo.ptr, clazz, |
Ashok Bhat | 7e2a9dc | 2014-01-02 19:43:30 +0000 | [diff] [blame] | 236 | "ptr", "J"); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 237 | |
| 238 | GET_FIELD_ID(gInputWindowHandleClassInfo.inputApplicationHandle, |
Carl Shapiro | 17cc33a | 2011-03-05 20:53:16 -0800 | [diff] [blame] | 239 | clazz, |
Jeff Brown | 4532e61 | 2012-04-05 14:27:12 -0700 | [diff] [blame] | 240 | "inputApplicationHandle", "Lcom/android/server/input/InputApplicationHandle;"); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 241 | |
Jeff Brown | 9302c87 | 2011-07-13 22:51:29 -0700 | [diff] [blame] | 242 | GET_FIELD_ID(gInputWindowHandleClassInfo.inputChannel, clazz, |
| 243 | "inputChannel", "Landroid/view/InputChannel;"); |
| 244 | |
| 245 | GET_FIELD_ID(gInputWindowHandleClassInfo.name, clazz, |
| 246 | "name", "Ljava/lang/String;"); |
| 247 | |
| 248 | GET_FIELD_ID(gInputWindowHandleClassInfo.layoutParamsFlags, clazz, |
| 249 | "layoutParamsFlags", "I"); |
| 250 | |
| 251 | GET_FIELD_ID(gInputWindowHandleClassInfo.layoutParamsType, clazz, |
| 252 | "layoutParamsType", "I"); |
| 253 | |
| 254 | GET_FIELD_ID(gInputWindowHandleClassInfo.dispatchingTimeoutNanos, clazz, |
| 255 | "dispatchingTimeoutNanos", "J"); |
| 256 | |
| 257 | GET_FIELD_ID(gInputWindowHandleClassInfo.frameLeft, clazz, |
| 258 | "frameLeft", "I"); |
| 259 | |
| 260 | GET_FIELD_ID(gInputWindowHandleClassInfo.frameTop, clazz, |
| 261 | "frameTop", "I"); |
| 262 | |
| 263 | GET_FIELD_ID(gInputWindowHandleClassInfo.frameRight, clazz, |
| 264 | "frameRight", "I"); |
| 265 | |
| 266 | GET_FIELD_ID(gInputWindowHandleClassInfo.frameBottom, clazz, |
| 267 | "frameBottom", "I"); |
| 268 | |
| 269 | GET_FIELD_ID(gInputWindowHandleClassInfo.scaleFactor, clazz, |
| 270 | "scaleFactor", "F"); |
| 271 | |
| 272 | GET_FIELD_ID(gInputWindowHandleClassInfo.touchableRegion, clazz, |
| 273 | "touchableRegion", "Landroid/graphics/Region;"); |
| 274 | |
| 275 | GET_FIELD_ID(gInputWindowHandleClassInfo.visible, clazz, |
| 276 | "visible", "Z"); |
| 277 | |
| 278 | GET_FIELD_ID(gInputWindowHandleClassInfo.canReceiveKeys, clazz, |
| 279 | "canReceiveKeys", "Z"); |
| 280 | |
| 281 | GET_FIELD_ID(gInputWindowHandleClassInfo.hasFocus, clazz, |
| 282 | "hasFocus", "Z"); |
| 283 | |
| 284 | GET_FIELD_ID(gInputWindowHandleClassInfo.hasWallpaper, clazz, |
| 285 | "hasWallpaper", "Z"); |
| 286 | |
| 287 | GET_FIELD_ID(gInputWindowHandleClassInfo.paused, clazz, |
| 288 | "paused", "Z"); |
| 289 | |
| 290 | GET_FIELD_ID(gInputWindowHandleClassInfo.layer, clazz, |
| 291 | "layer", "I"); |
| 292 | |
| 293 | GET_FIELD_ID(gInputWindowHandleClassInfo.ownerPid, clazz, |
| 294 | "ownerPid", "I"); |
| 295 | |
| 296 | GET_FIELD_ID(gInputWindowHandleClassInfo.ownerUid, clazz, |
| 297 | "ownerUid", "I"); |
| 298 | |
| 299 | GET_FIELD_ID(gInputWindowHandleClassInfo.inputFeatures, clazz, |
| 300 | "inputFeatures", "I"); |
Jeff Brown | 83d616a | 2012-09-09 20:33:43 -0700 | [diff] [blame] | 301 | |
| 302 | GET_FIELD_ID(gInputWindowHandleClassInfo.displayId, clazz, |
| 303 | "displayId", "I"); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 304 | return 0; |
| 305 | } |
| 306 | |
| 307 | } /* namespace android */ |