Merge "Convert to using inputConfig for clone info in WindowInfo"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4112366cb8
@@ -64,6 +64,7 @@ public final class InputWindowHandle {
|
||||
InputConfig.DISABLE_USER_ACTIVITY,
|
||||
InputConfig.SPY,
|
||||
InputConfig.INTERCEPTS_STYLUS,
|
||||
InputConfig.CLONE,
|
||||
})
|
||||
public @interface InputConfigFlags {}
|
||||
|
||||
@@ -157,11 +158,6 @@ 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) {
|
||||
@@ -210,7 +206,7 @@ public final class InputWindowHandle {
|
||||
.append(", scaleFactor=").append(scaleFactor)
|
||||
.append(", transform=").append(transform)
|
||||
.append(", windowToken=").append(windowToken)
|
||||
.append(", isClone=").append(isClone)
|
||||
.append(", isClone=").append((inputConfig & InputConfig.CLONE) != 0)
|
||||
.toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ static struct {
|
||||
WeakRefHandleField touchableRegionSurfaceControl;
|
||||
jfieldID transform;
|
||||
jfieldID windowToken;
|
||||
jfieldID isClone;
|
||||
} gInputWindowHandleClassInfo;
|
||||
|
||||
static struct {
|
||||
@@ -318,8 +317,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -436,8 +433,6 @@ 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");
|
||||
|
||||
|
||||
@@ -154,7 +154,8 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener {
|
||||
|
||||
for (InputWindowHandle window : windowHandles) {
|
||||
final boolean visible = (window.inputConfig & InputConfig.NOT_VISIBLE) == 0;
|
||||
if (visible && window.getWindow() != null && !window.isClone) {
|
||||
final boolean isNotClone = (window.inputConfig & InputConfig.CLONE) == 0;
|
||||
if (visible && window.getWindow() != null && isNotClone) {
|
||||
tempVisibleWindows.add(window);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user