Merge "Add isClone to InputWindowHandle" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
96f4a2afc2
@@ -157,6 +157,11 @@ public final class InputWindowHandle {
|
||||
*/
|
||||
public Matrix transform;
|
||||
|
||||
/**
|
||||
* Whether this window is a clone or the original window.
|
||||
*/
|
||||
public boolean isClone;
|
||||
|
||||
private native void nativeDispose();
|
||||
|
||||
public InputWindowHandle(InputApplicationHandle inputApplicationHandle, int displayId) {
|
||||
|
||||
@@ -74,6 +74,7 @@ static struct {
|
||||
WeakRefHandleField touchableRegionSurfaceControl;
|
||||
jfieldID transform;
|
||||
jfieldID windowToken;
|
||||
jfieldID isClone;
|
||||
} gInputWindowHandleClassInfo;
|
||||
|
||||
static struct {
|
||||
@@ -317,6 +318,8 @@ jobject android_view_InputWindowHandle_fromWindowInfo(JNIEnv* env, gui::WindowIn
|
||||
env->SetObjectField(inputWindowHandle, gInputWindowHandleClassInfo.windowToken,
|
||||
javaObjectForIBinder(env, windowInfo.windowToken));
|
||||
|
||||
env->SetBooleanField(inputWindowHandle, gInputWindowHandleClassInfo.isClone,
|
||||
windowInfo.isClone);
|
||||
return inputWindowHandle;
|
||||
}
|
||||
|
||||
@@ -433,6 +436,8 @@ int register_android_view_InputWindowHandle(JNIEnv* env) {
|
||||
GET_FIELD_ID(gInputWindowHandleClassInfo.windowToken, clazz, "windowToken",
|
||||
"Landroid/os/IBinder;");
|
||||
|
||||
GET_FIELD_ID(gInputWindowHandleClassInfo.isClone, clazz, "isClone", "Z");
|
||||
|
||||
jclass weakRefClazz;
|
||||
FIND_CLASS(weakRefClazz, "java/lang/ref/Reference");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user